Model tuning
With Yandex AI Studio, you can tune the YandexGPT Lite text generation model, YandexGPT Lite-based classifiers, and the embedding model using the LoRA
Model tuning in Yandex AI Studio is at the Preview stage.
Fine-tuning text generation models
You cannot fine-tune a text generation model based on new data, e.g., the knowledge base of your support service. However, you can train the model to generate responses in a specific format or analyze texts. You can train the model to:
- Summarize and rewrite texts.
- Generate questions and answers from text input.
- Provide responses in a particular format or style.
- Classify texts, queries, and conversations.
- Extract entities from texts.
- Fine-tune classification and embedding models.
Fine-tuning in AI Studio
For more information on tuning data requirements, see Text generation datasets, Text classification datasets, and Embedding datasets.
You need to upload the prepared data to Yandex Cloud as a dataset. By default, you can upload up to 5 GB of tuning data into one dataset. For all limitations, see Yandex AI Studio quotas and limits.
After you upload a dataset, start tuning by specifying its type and parameters (optional). Tuning can take from 1 to 24 hours depending on the amount of data and system workload.
Model tuning examples are presented in Fine-tuning a text generation model, Fine-tuning text classification models, and Fine-tuning an embedding model.
You will need an ai.editor role for model tuning in AI Studio. This role allows you to upload data and start the tuning process.
Requests to fine-tuned models
Once you complete tuning your model, you will get its ID. Provide this ID in the modelUri field of the request body. You can submit requests to a fine-tuned text generation model through the text generation API, AI Assistant API, or from Yandex DataSphere and other applications. To send a request to a fine-tuned classifier, use the classify Text Classification API method. You can also use Yandex Cloud ML SDK to work with fine-tuned models:
Note
To make sure the fine-tuned model works properly, specify the prompt used for training in the message with the system sender role.
To send API requests in DataSphereai.languageModels.user role.