PyCon Lithuania 2024

Customizing LLMs: A Guide to Fine-Tuning Open Source Models
2024-04-05 , Room 111

In today's world, large language models (LLMs) are revolutionizing how we interact with technology, allowing us to have conversations, organize data, write text with minimal human effort.However, It is likely that when using an LLM, you have received incorrect answers or not specialized answers.
For this reason, fine-tuning models that have been pre-trained with this large corpus of data is crucial to: (1) obtain better performance in the quality of responses, and (2) tune the model to a specific domain.


It is likely that when using an LLM, you have received incorrect answers, why is that?
During the training of these models, they often ingest large amounts of unlabelled text from sources such as books, web pages, forums, which develop a great understanding of knowledge but lack specific knowledge. For this reason fine-tuning models that have been pre-trained with this large corpus of data is crucial to: (1) obtain better performance in the quality of responses, and (2) tune the model to a specific domain by providing specific texts for them to specialise on.

So, why is it necessary to understand Fine tuning models?
Among the various reasons, one of the most relevant is data privacy. Since doing the Fine Tuning process locally can teach the model data that is private, such as personal
private data, such as personal data, clinical data, confidential company information, etc., can be taught to the model.
In this talk, attendees will learn step-by-step how Open Source LLM models, such as Mixtral-8x7B or Mistral-7B (multilingual), are a good option to learn how to perform Fine-Tuning and specialise for the domain on their own computer. In addition, the Python role of the process, the application of external modules to have a simple implementation, will be shared to facilitate the Fine-Tuning of LLMs.

General Data Science knowledge is recommended to follow the subject with ease.

She is a passionate biotechnologist, working as a Sr. Data Scientist in Berlin. In her spare time, she loves to develop projects that are beginner-friendly, even with complex topics. She is an active member in the Python Berlin communities, helping to organize workshops and participating actively in mentoring newcomers (specially, people who are changing from career path) and giving talks in many local communities like PyLadies and also in international conferences. Moreover, she participated in the python documentation translation (English-Spanish) and I am coordinator in the discord channel of Python en Español