# Model training

Tutorials for training, fine-tuning, and hyperparameter optimization of models at scale.

### [Hyperparameter optimization](https://www.union.ai/docs/v2/union/tutorials/model-training/hpo/page.md)

Run large-scale HPO experiments with zero manual tracking, deterministic results, and automatic recovery.

### [LLM fine-tuning with LoRA and QLoRA](https://www.union.ai/docs/v2/union/tutorials/model-training/llm-fine-tuning-lora-qlora/page.md)

Fine-tune a language model for SQL generation using full, LoRA, or QLoRA methods in one Flyte pipeline.

### [BERT emotion classification](https://www.union.ai/docs/v2/union/tutorials/model-training/bert-fine-tuning-emotion/page.md)

Fine-tune ModernBERT on Twitter emotion labels with confusion-matrix evaluation and attention visualizations.

## Subpages

- [LLM fine-tuning with LoRA and QLoRA](https://www.union.ai/docs/v2/union/tutorials/model-training/llm-fine-tuning-lora-qlora/page.md)
  - Define the task environments
  - Orchestrate the pipeline
  - Run the workflow
- [BERT emotion classification](https://www.union.ai/docs/v2/union/tutorials/model-training/bert-fine-tuning-emotion/page.md)
  - Define the task environments
  - Orchestrate the pipeline
  - Run the workflow
- [Hyperparameter optimization](https://www.union.ai/docs/v2/union/tutorials/model-training/hpo/page.md)
  - A better way to run HPO
  - Declare dependencies
  - Define the task environment
  - Define the optimizer
  - Define the objective function
  - Define the main optimization loop
  - Run the experiment

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/tutorials/model-training/_index.md
**HTML**: https://www.union.ai/docs/v2/union/tutorials/model-training/
