Upload Your Dataset
For this example, we are teaching the model to answer questions based on context that is supplied in the system prompt. You can follow along with the Tutorials/CoQA dataset containing over 7,000 rows of chat messages. Each row of the dataset contains a conversation between a user and an assistant.

Dataset Format
Oxen.ai supports datasets in a variety of file formats, including jsonl, csv, and parquet. The only requirement is that you have a column where each row is a list of messages. Each message is an dictionary with arole and content key. The role can be βsystemβ, βuserβ, or βassistantβ. The content is the message content.
Fine-Tuning The Model
Once you have uploaded your dataset, click the βActionsβ button and select βFine-tune a modelβ.
For our Advance Options, you can have control over hyper-parameters and model specifications like learning rate, batch size, and number of epochs. These settings can help you optimize for your specific use case, whether you prioritize training speed, model accuracy, or computational efficiency.

Monitoring the Fine-Tune
While weβre fine-tuning your model, youβll be able to see the configuration, logs, and metrics of the fine-tuning. This helps you track the modelβs progress and identify if you need to adjust any hyperparameters or stop training early if the model has converged.
Deploying the Model
Once your fine-tuning is complete, go to the info page and click βDeployβ. Oxen.ai will spin up a dedicated endpoint for your model to access via a chat interface or through the API. After the model is deployed, you can click the βChat with this modelβ button to open a chat interface where you can test multi-turn conversations.

Model API
You can integrate it into your application using the API. The API is OpenAI compatible, so you can use any OpenAI client library to interact with it. The base URL for the API ishttps://hub.oxen.ai/api.
For chat completions, youβll send a list of messages that includes the conversation history. Each message should have a role (either βuserβ, βassistantβ, or βsystemβ) and content.
your-model-id with the ID of your fine-tuned model. The model will use the entire conversation history to generate contextually appropriate responses.