Many blogs talk about fine-tuning models for specific use cases, cost savings, and increased privacy. Until recently, there were many challenges in fine-tuning your own models:
• Acquiring the data
• preparing the data
• Fine Tuning infrastructure GPUs)
• Deployment and Inference Infrastructure
• Cost Factors
Because of these hurdles, many people and companies choose to use the foundation models as they are, through vendor apps like ChatGPT or Claude. Some are also interested in more advanced AI chat applications like OpenWebUI with Ollama or other open-source models. Of course, there are plenty more apps out there, but you get the idea.
If you are thinking of going one step further and fine-tuning your own model — whether from synthetic data, labeled data, or even from your existing conversations — you can now use open-source technologies like Argilla and OpenPipe to do so with just a few clicks and almost zero code.
Tools we use in this tutorial
Data generation
- The synthetic data generation space https://huggingface.co/spaces/argilla/synthetic-data-generator
- The Argilla HF space https://huggingface.co/spaces/argilla/argilla-template-space
Fine tuning
- OpenPipe
- OpenAI (optional)
Inference
- OpenPipe
- Openai (optional)
- Ollama (optional)
What is the Dataset Generating and Argilla
In a nutshell, the Dataset Generator uses AI to generate data. That is, the user specifies what the data should be about (e.g. a customer support request) and lets the (smart) AI guess the response of a human, e.g. the appropriate response to the request. Artgille takes this a step further and allows you to take the same generated dataset and have a human review and correct it if necessary. The final dataset is then used to fine-tune a model, which then becomes an expert at performing this task.
Let’s go.
Part I — Data Generation
Step-by-step Guide
- Clone the HF Space for Argilla and start it. Make sure it is public so the dataset generator can publish the dataset.
In the Space’s settings, set a username and password that you will use later to log in. If everything worked, you should see something like this:
- Sign in using the username and password you provided.
Click on “Import from Python,” as shown below, and save the Argilla URL and key to enter later in the dataset generator:
> Please note that the API key changes every time the Space restarts, which is why it is probably better to make Argilla’s settings persistent, as described here. You can see the startup progress in the log.
- Go to the synthetic data generator space and clone it as well.
- Open the settings and provide at least the four environment variables shown:
The Argilla space looks something like this: https://airabbitx-argilla.hf.space
The default model is meta-llama/Llama-3.1–8B-Instruct.
Top comments (0)