Fine-Tuning Small and Large Language Models with H2O
- Generative AI
- H2O Cascade
This lesson is Lab Three in a hands on fine-tuning series, moving from a simple example to a full large language model workflow. It first walks through fine-tuning a small BERT based model with Hugging Face's open source trainer API on a GLUE benchmark dataset, covering tokenization, training, and generating predictions. It then switches to H2O Cascade to fine-tune a larger language model, covering dataset selection, tokenizer settings, data type, and low-rank fine-tuning options, and monitoring a training run to completion. The lesson closes by comparing the two approaches and pushing a finished model to Hugging Face Hub.
Key takeaways
- How to fine-tune a small BERT based model on a GLUE dataset using Hugging Face's tokenizer, trainer, and predict pipeline
- What dataset, tokenizer, and data type settings to configure before starting a large language model fine-tuning run in H2O Cascade
- Why using float16 rather than a higher precision data type is recommended when fine-tuning a large language model backbone
- How to monitor a running experiment in H2O Cascade, including validation metrics, BLEU score, and chatting with the model mid training
- The steps for pushing a finished fine-tuned model from H2O Cascade to Hugging Face Hub for further use
Start owning your AI