Follow this blog post for a comprehensive tutorial on how to fine-tune a Mistral 7B model.
These are some of the supported models:
- Mistral7B
- Llama-2-7b
- Llama-2-13b
- Llama-2-70b
- Code Llama
Let’s connect to a DB that hosts a table we’ll use to fine-tune our model:Now we can take a look at the fine-tuning data:And here are the first few rows:
Notice it is formatted as a series of chats that conform to the standard OpenAI chat format. Every message has a “role” and some “content”. By chaining together a series of messages, we can create a conversation.
| message_id | role | content | ||
|---|---|---|---|---|
| 0 | system | You are a helpful assistant. Your task is to answer a user’s question regarding the SQL syntax supported by MindsDB, a machine learning product for training models and seamlessly deploying them where your data lives. | ||
| 1 | user | In the context of MindsDB: 1. Testing CREATE DATABASE | ||
| 2 | assistant | CREATE DATABASE example_db WITH ENGINE = "postgres", PARAMETERS = { "user": "demo_user", "password": "demo_password", "host": "3.220.66.106", ... }; | ||
| Output: | ||||
| status | ||||
| ------ | ||||
| Query successfully completed | ||||
| 3 | system | You are a helpful assistant. Your task is to answer a user’s question regarding the SQL syntax supported by MindsDB, a machine learning product for… | ||
| 4 | user | In the context of MindsDB: 2. Testing Preview the Available Data Using SELECT |
FINETUNE command creates a new version of the mistralai/Mistral-7B-Instruct-v0.1 model. You can query all available versions as below: