icon icon

Fine-tuning and Training LLM Models – Practical Fine-Tuning of Large Language Models

icon

Training process

Training needs analysis

If you have specific requirements regarding the training programme, we will carry out a training needs analysis for you. This will guide us on which aspects of the programme should receive greater emphasis, so that the training programme meets your specific needs.

What will you gain?

icon

Choose the right approach - You will learn when fine-tuning makes sense and when prompting or RAG is the better option, so you can avoid expensive experiments that add complexity without real business value.

icon

Understand how LLMs work - You will clarify concepts such as tokenization, embeddings, attention, and context windows, making it easier to judge model limits and explain their behavior in practical use cases.

icon

Set up your workspace - You will configure the core tools used with LLMs, including Python, PyTorch, and Hugging Face libraries, so you can run and test models on local machines or in the cloud.

icon

Pick a solid base model - You will learn how to match a model to the target language, task, license, and hardware budget, giving you a realistic and efficient starting point for further tuning work.

icon

Build training-ready data - You will learn how to design and clean a dataset, remove duplicates, split data properly, and format instruction-response pairs so the model can learn from consistent examples.

icon

Fine-tune with limited resources - You will master LoRA, QLoRA, quantization, and training setup for constrained GPUs, allowing you to adapt large models without relying on large-scale infrastructure.

icon

Evaluate models properly - You will learn how to compare base and tuned models, prepare test sets, detect quality regressions, and check instruction following as well as the risk of hallucinations.

icon

Deploy your tuned model - You will learn how to save adapters and checkpoints, expose a model through an API, run an inference server, and monitor the solution once it is deployed in practice.

Training programme

1. Introduction to training and fine-tuning LLM models

At the outset, it is essential to separate pre-training, fine-tuning, instruction tuning, and alignment, because each solves a different problem. This section also compares prompting, RAG, closed models, and open-source model families to clarify when custom tuning is justified.

  • what is the difference between training a model and fine-tuning it,
  • pre-training, fine-tuning, instruction tuning i alignment,
  • when it is worth fine-tuning a model, and when to use prompting or RAG,
  • closed models i open-source models,
  • overview of popular families of models LLM.

2. Architecture and operation of large language models

Transformer architecture explains how large language models process text, build context, and generate outputs. The section connects tokenization, text representation, embeddings, attention, context window length, and parameter counts with the resulting hardware requirements.

  • Transformer architecture,
  • tokenization and text representation,
  • embeddings,
  • attention mechanism,
  • context and context window length,
  • model parameters and their impact on hardware requirements.

3. Preparing the environment for working with LLM

Python tooling defines the practical setup for working with LLMs in both local and cloud environments. The section introduces Hugging Face Transformers, Hugging Face Datasets, PyTorch, GPU work, and the configuration choices needed to prepare an effective development environment.

  • Python and libraries used when working with models,
  • Hugging Face Transformers,
  • Hugging Face Datasets,
  • PyTorch,
  • working with GPU,
  • use of local and cloud environments.

4. Selection of the base model

Choosing a base model means balancing application needs with model class, hardware limits, and usage constraints. This section compares instruct and base variants, reviews multilingual options, explains licenses, and shows how to obtain and run models from Hugging Face.

  • selection of the model for a specific application,
  • model size and hardware requirements,
  • instruct and base models,
  • multilingual models,
  • licenses and limitations of the use of models,
  • downloading and running models from Hugging Face.

5. Preparation of training data

Training quality depends heavily on how the dataset is designed, cleaned, and structured before any model update begins. The section covers instruction-response formatting, duplicate and error removal, preparation of domain data, dataset splits, and tokenization for training workflows.

  • dataset design,
  • data formatting answer–response instruction,
  • data cleaning,
  • removal of duplicates and erroneous records,
  • preparation of domain data,
  • division into training, validation and test sets,
  • dataset tokenization.

6. LLM model fine-tuning

Running a fine-tuning job requires precise control over the training configuration and its trade-offs. This section covers learning rate, batch size, epochs, gradient accumulation, checkpoints, and training monitoring, ending with launching a complete fine-tuning process.

  • configuration of the training process,
  • selection of learning rate,
  • batch size,
  • number of epochs,
  • gradient accumulation,
  • checkpoints,
  • monitoring of the training process,
  • launching your own fine-tuning process.

7. Parameter-Efficient Fine-Tuning

When full fine-tuning is too expensive, parameter-efficient methods make adaptation feasible on limited hardware. The section explains PEFT, LoRA, QLoRA, adapter-based training, and the selection of LoRA parameters for working with constrained GPU resources.

  • limitations of full fine-tuning,
  • PEFT,
  • LoRA,
  • QLoRA,
  • selection of LoRA parameters,
  • adapters,
  • training a model with limited GPU resources.

8. Model quantization

Quantization changes the numerical representation of a model to reduce memory usage and infrastructure demands. Participants work with FP16, BF16, INT8, and INT4, examine effects on speed and capacity, and review quantization-aware fine-tuning for smaller environments.

  • basics of quantization,
  • FP16, BF16, INT8 and INT4,
  • the impact of quantization on memory and performance speed,
  • quantization-aware fine-tuning,
  • preparing the model to work on smaller infrastructure.

9. Instruction tuning and fine-tuning the model for specific tasks

Instruction tuning adapts an LLM to concrete tasks by shaping both data structure and expected behavior. The section covers creating instructional datasets and tuning models for classification, text generation, information extraction, document work, and the language and terminology used in an organization.

  • creating instructional data,
  • fine-tuning the model for classification,
  • fine-tuning for text generation,
  • fine-tuning for information extraction,
  • fine-tuning for working with documents,
  • fine-tuning the model to the organization's language and terminology.

10. Evaluation of the fine-tuned model

Reliable assessment starts with a well-prepared test set and a clear baseline for comparison. This section combines automatic metrics with response quality review, instruction-following checks, regression detection, and hallucination assessment to judge the effect of fine-tuning.

  • comparison of the base model and the fine-tuned one,
  • preparation of the test set,
  • automatic metrics,
  • evaluation of response quality,
  • testing compliance with instructions,
  • detection of quality regression,
  • assessment of hallucinations.

11. Optimization of the fine-tuning process

Improving a fine-tuned model is an iterative process based on evidence rather than one-time parameter changes. The section focuses on detecting overfitting, selecting hyperparameters, experimenting with the dataset, analyzing model errors, and raising data quality to improve later runs.

  • identifying overfitting,
  • selection of hyperparameters,
  • experimenting with the dataset,
  • analysis of model errors,
  • improving the quality of training data,
  • iterative improvement of the model.

12. Fine-tuning a RAG

The choice between fine-tuning and RAG depends on whether the goal is changing model behavior or grounding responses in external knowledge. This part compares both approaches, shows when to use each one, and explains how to combine them in domain models built on organizational knowledge.

  • differences between fine-tuning and and RAG,
  • when to use RAG,
  • when to use fine-tuning,
  • combining fine-tuning with RAG,
  • domain models working on the organization's knowledge.

13. Data security and quality

Sensitive training data creates legal and technical risk if it is copied into datasets without proper controls. This section addresses anonymization, protection of confidential information, memorization risk, copyright issues around training data, and security considerations for open-source models.

  • sensitive data in training datasets,
  • data anonymization,
  • the risk of data being memorized by the model,
  • protection of confidential information,
  • copyrights to training data,
  • security of models open-source.

14. Saving and versioning models

Checkpoints, LoRA adapters, and merged model artifacts need a consistent storage strategy to keep work reproducible. Here the focus is on model and dataset versioning, along with documenting experiments so each training run and resulting variant can be traced reliably.

  • saving checkpoints,
  • LoRA adapters,
  • merging the adapter with the model,
  • versioning models,
  • versioning datasets,
  • documenting experiments.

15. Deployment of the fine-tuned model

Moving a tuned model into use involves more than exporting weights. The section covers preparing the model for inference, running it locally, exposing it through an API or inference server, and using containerization, production deployment basics, and operational monitoring.

  • preparation of the model for inference,
  • running the model locally,
  • making the model available via API,
  • inference server,
  • containerization,
  • basics of deploying the model in a production environment,
  • monitoring the operation of the model.

16. Cost and performance optimization

Cost decisions in LLM projects depend on the relationship between model size, GPU requirements, memory usage, and inference patterns. This part explains batch inference, training and serving costs, and how to choose between local models and cloud services for a given application.

  • GPU requirements for various models,
  • memory usage optimization,
  • batch anference,
  • selection of model size for the application,
  • training costs and inference,
  • local models versus cloud services.

17. Practical workshop – your own LLM model

Participants build a complete fine-tuning workflow for their own LLM, from selecting a base model and preparing a dataset to configuring LoRA or QLoRA. The workshop also includes result evaluation, before-and-after comparison, and saving and launching the tuned model version.

  • selection of the base model,
  • preparation of your own dataset,
  • configuration of LoRA or QLoRA,
  • carrying out fine-tuning,
  • evaluation of results,
  • comparison of the model before and after tuning,
  • saving and launching your own version of the model.

18. Good practices for working with LLM models

Operational work with LLMs requires deciding when custom training adds value and when it only increases complexity. The section covers experiment management, change documentation, quality control, and the ongoing maintenance, updating, and post-deployment development of models.

  • when it is not worth training your own model,
  • experiment management,
  • documenting changes,
  • quality control,
  • maintaining and updating models,
  • further development of the model after deployment.

What are the prerequisites for participating in the training?

icon

Python basics - You should be comfortable reading and editing simple Python code, running scripts, and working with libraries so you can complete the hands-on exercises on your own.

icon

Machine learning basics - You should understand core machine learning concepts such as models, training, validation, overfitting, and hyperparameters to follow the LLM tuning workflow smoothly.

icon

Text data experience - You should have some experience preparing or analyzing text data, because the training includes working with datasets, record formatting, and assessing data quality.

icon

Terminal and environment skills - You should know how to use a terminal, install packages, and run a development environment so you can configure tools and work with models and GPUs without friction.