Overview

Whether you are looking to classify text, answer questions, interact with internal tools, or solve other language tasks, our step-by-step workflow will take you from initial concept to production-ready model with remarkable ease. Let’s dive in and transform how you build AI-powered features!

Step 0: Register a model

The first component of the workflow is registering a new model - this helps us keep track of all our experiments down the line (Get your token):

1import json
2import requests
3from pprint import pprint
4
5# Register a new model
6auth_header = {"Authorization": f"Bearer {distil_bearer_token()}"}
7response = requests.post(
8 "https://api.distillabs.ai/models",
9 data=json.dumps({"name": "testmodel-123"}),
10 headers={"Content-Type": "application/json", **auth_header},
11)
12pprint(response.json())
13model_id = response.json()["id"]
14print(f"Registered a model with ID={model_id}")

You can inspect your models with

1from pprint import pprint
2
3response = requests.get(
4 "https://api.distillabs.ai/models",
5 headers=auth_header,
6)
7pprint(response.json())

1. Task selection

Begin by identifying the specific task you want your model to perform. Different tasks require different approaches to data preparation and model configuration.

Learn more about task selection →

2. Input preparation

Prepare your data and configuration files according to your chosen task type.

Input preparation overview →

3. Teacher evaluation

Before training your specialized small model, validate whether a large language model can accurately solve your task with the provided examples.

Learn about teacher evaluation →

4. Model training

Once your teacher evaluation shows promising results, train your specialized small language model using knowledge distillation.

Understand the model training process →

5. Model deployment

Deploy your trained model in your infrastructure or a 3rd party provider for immediate integration with your applications.

Explore deployment options →