> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inference.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Train and Deploy a Custom Model

> Train a task-specific model using demo data, deploy it, and see how it performs.

When off-the-shelf models aren't good enough for a specific task, fine-tune one that is. A task-specific model is typically smaller, faster, and cheaper to run than the general-purpose model it replaces, while being more accurate for your workload.

This guide uses the **Customer Support Chatbot** demo project to walk through the full loop: launching a training job, monitoring progress, deploying the result, and evaluating the trained model. No data of your own is needed — the demo project comes with everything pre-loaded.

## Start the demo project

If you already created the demo project during [Run Your First Eval](/get-started/run-first-eval), you're all set — open it from the dashboard and skip to the next section.

Otherwise:

1. From the dashboard, navigate to the **Learn** page (or the **Create a Project** page).
2. Find **Customer Support Chatbot** and click **Start with demo project**.

The project comes pre-loaded with three artifacts that map directly to what a training job requires:

| Artifact         | Name                     | Role in training                                                                             |
| ---------------- | ------------------------ | -------------------------------------------------------------------------------------------- |
| Training dataset | `customer-support-train` | The data the model learns from                                                               |
| Eval dataset     | `customer-support-eval`  | A held-out set used to measure learning progress — must have zero overlap with training data |
| Rubric           | Customer support rubric  | Defines the quality criteria the LLM judge scores against during and after training          |

## Train a model

<Steps>
  <Step title="Create a new training job">
    Open the **Training** tab in your project and click **New Training Job**.

    Select the three inputs from your demo project:

    1. **Training dataset** — `customer-support-train`
    2. **Eval dataset** — `customer-support-eval`
    3. **Rubric** — the customer support rubric

    <Frame>
      <img src="https://mintcdn.com/kuzco/eBkhV7xueuLgf0f-/images/customer-support/cs-training-form.png?fit=max&auto=format&n=eBkhV7xueuLgf0f-&q=85&s=1589b034a3cf220153a684d30e728c9b" alt="Training job setup form with demo datasets and rubric selected" width="2068" height="1614" data-path="images/customer-support/cs-training-form.png" />
    </Frame>
  </Step>

  <Step title="Choose a recipe">
    Next, pick a [recipe](/platform/train/choose-a-recipe) — a pre-configured training setup with a base model, optimized parameters, and compute config. For this demo, the **smallest recipe** works well and will finish the fastest.
  </Step>

  <Step title="Launch training">
    Review your selections and click **Start Training**. The job will begin shortly.
  </Step>

  <Step title="Monitor training progress">
    During training, the platform periodically runs the `customer-support-eval` dataset through your model-in-progress and scores the outputs using the rubric. You can watch these mid-training eval scores update in real time.

    * **Scores improving** — training is on track and continues
    * **Scores degrading** — training stops early to prevent overfitting

    <Frame>
      <img src="https://mintcdn.com/kuzco/eBkhV7xueuLgf0f-/images/customer-support/cs-training-graph-scores.png?fit=max&auto=format&n=eBkhV7xueuLgf0f-&q=85&s=0a3b33d2d7a6c7f258c091c262031b45" alt="Mid-training eval chart showing scores improving over time" width="1666" height="1306" data-path="images/customer-support/cs-training-graph-scores.png" />
    </Frame>

    See [Monitor a Training Run](/platform/train/mid-training-evals) for more on reading these charts.
  </Step>
</Steps>

## Deploy the trained model

<Steps>
  <Step title="Deploy">
    When training completes, your model is automatically registered and ready to deploy. Navigate to **Deployments**, name your deployment, and click **Deploy**. The GPU spins up in a few minutes depending on model size.
  </Step>

  <Step title="Call your model">
    Once deployed, you call it the same way you'd call any model through the Inference API — same base URL, same headers — just swap the `model` parameter to your trained model's identifier.

    <CodeGroup>
      <Metadata text="get-started/train-deploy-call[series=train-deploy]" />

      ```typescript TypeScript theme={"system"}
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.inference.net/v1",
        apiKey: process.env.INFERENCE_API_KEY,
      });

      const response = await client.chat.completions.create({
        model: "your-org/your-trained-model",
        messages: [
          {
            role: "user",
            content: "I was charged twice for my subscription, can you help?",
          },
        ],
      });
      ```

      <Metadata text="get-started/train-deploy-call[series=train-deploy]" />

      ```python Python theme={"system"}
      import os
      from openai import OpenAI

      client = OpenAI(
          base_url="https://api.inference.net/v1",
          api_key=os.environ["INFERENCE_API_KEY"],
      )

      response = client.chat.completions.create(
          model="your-org/your-trained-model",
          messages=[
              {
                  "role": "user",
                  "content": "I was charged twice for my subscription, can you help?",
              }
          ],
      )
      ```

      <Metadata text="get-started/train-deploy-call" />

      ```bash cURL theme={"system"}
      curl https://api.inference.net/v1/chat/completions \
        -H "Authorization: Bearer $INFERENCE_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "your-org/your-trained-model",
          "messages": [
            {
              "role": "user",
              "content": "I was charged twice for my subscription, can you help?"
            }
          ]
        }'
      ```
    </CodeGroup>

    Replace `your-org/your-trained-model` with the model identifier shown on your deployment page. See [Call Your Deployment](/platform/deploy/call-your-deployment) for the full setup guide.
  </Step>
</Steps>

## Evaluate the trained model

Once a model has finished training, you can run evals against it alongside any other model — no deployment required. This lets you iterate on your data and retrain for better results before you deploy and take it to production.

<Steps>
  <Step title="Run an eval with your trained model">
    Go to the **Evals** tab and create a new eval. Select the `customer-support-eval` dataset and the project rubric — the same ones used during training. This time, add your **trained model** alongside one or more off-the-shelf models.
  </Step>

  <Step title="Compare the results">
    The comparison view shows how your trained model scores against the others on the same rubric. Since the model was trained specifically on this task, you should see it perform competitively — often matching or beating larger general-purpose models on quality, while being smaller and cheaper to run. If the results aren't where you want them, refine your training data and retrain before deploying.

    <Frame>
      <img src="https://mintcdn.com/kuzco/eBkhV7xueuLgf0f-/images/customer-support/cs-training-eval-scores.png?fit=max&auto=format&n=eBkhV7xueuLgf0f-&q=85&s=9d266fed14b87d7e482efb3da6b288e9" alt="Eval comparison view showing trained model scores vs off-the-shelf models" width="2122" height="660" data-path="images/customer-support/cs-training-eval-scores.png" />
    </Frame>
  </Step>
</Steps>

## What you just learned

* **Training** teaches a model your specific task using your data, with the rubric guiding quality during the process
* **Mid-training evals** give you visibility into whether training is working before it finishes
* **Deployment** puts the trained model behind the same API you already use — no code changes beyond swapping the model name
* **Post-training evals** let you validate that the trained model actually outperforms alternatives on your criteria

## Next steps

<CardGroup cols={2}>
  <Card title="Choose a recipe" icon="book-open" href="/platform/train/choose-a-recipe">
    Understand recipe tiers and how to pick the right one for your task.
  </Card>

  <Card title="Launch a training run" icon="rocket" href="/platform/train/launch-a-run">
    The full training flow with your own data — cost and duration estimates included.
  </Card>

  <Card title="Call your deployment" icon="code" href="/platform/deploy/call-your-deployment">
    Full production setup for calling your deployed model.
  </Card>

  <Card title="Monitor with Gateway" icon="chart-line" href="/platform/gateway/overview">
    Track your deployed model's cost, latency, and quality over time.
  </Card>
</CardGroup>
