How do you train and use your own model?
You can train a model on your own data, try it on a small share of requests, and switch it off again.
In short
- What it does: teaches a model from your own data, then lets it answer a small share of your requests in one place. If it stumbles, your usual model answers.
- What you need: a workspace admin, and examples to learn from: your workspace's work, a file, a table or a connected service.
- What it costs: free while charges are off.
What happens when you train?
A run trains the model and records it. Before you switch it on, you can ask for a comparison with the model you use now; it is advice, not a condition. A person makes each switch decision, and each one is recorded.
Training starts from the data you chose. The run exports it, trains the model, then checks the model on examples it wasn't trained on. It passes only if it predicts them better than the model it started from, by a set margin; otherwise it is not validated and can't be switched on. That is not a comparison with the model you use now. Before you switch it on you can ask for one, which is advice and not a test, and you can judge it yourself on a small share of requests.
POST /api/v1/cadreen/training/startGET /api/v1/cadreen/training/jobs/{id}If training isn't available for your workspace, starting a run says so and nothing is queued.
Can you try a small version first?
Yes. A first taste trains a small model on as much of your data as fits under a $0.50 ceiling for the training. Once charges start, you can talk to it before you pay for the full size, and talking to it is charged separately, at what each message shows. A taste is made on the sft recipe, from one workspace, with no made-up examples, and not from checked questions: the start refuses anything else with a sentence and starts nothing.
POST /api/v1/cadreen/training/start
{ "recipe_type": "sft", "taste": true }POST /api/v1/cadreen/training/jobs/{id}/try
{ "message": "How do I ask for a refund?" }A taste takes 20 messages in all, each at most 2,000 characters. When you are happy, the full size is its own run, and the full size needs the taste to have finished (until it has a trained model the request is refused with 409 taste_not_finished). It uses all of your data and asks for its own approval before anything is sent.
POST /api/v1/cadreen/training/jobs/{id}/full-sizeHow do you switch a model on?
Choose where it should answer, with use_for, and the share of this workspace's requests there that it gets. chat_answers is answering in chat; agent_steps is an agent deciding each step. The rest keep using what answers there now. Only a workspace admin or the owner, signed in as a person, can do this. An API key can't.
GET /api/v1/cadreen/training/jobs/{id}/rolesPOST /api/v1/cadreen/training/jobs/{id}/deploy
{ "use_for": "chat_answers", "share_pct": 5 }To skip the choice, one request switches the model on for a tenth of the requests for one place (chat answers unless you name another with use_for), and says so in words:
POST /api/v1/cadreen/training/jobs/{id}/use
{}The share is a whole number from 1 to 100. A request is placed by its id, so every step of one request goes the same way, and raising the share keeps every request the smaller share had. If the model fails, the request goes on to the model that answered before.
The answer says where the model is in use. The job's own answer says it too, under serving, and says serving_unknown when that couldn't be read, so you never see “not in use” for something that couldn't be checked.
409 gate_not_passed: the model hasn't passed its checks.409 no_serving_model: the model has no copy that can answer, so it can't be switched on. Nothing was changed.
What does a training run cost?
Training is free while charges are off.
Once charges start, a run is charged to your Cadreen balance for what it used, when it ends. Before anything is sent, the approval step shows the most the run could cost, and a run is never charged more than that. While Cadreen is free during launch, nothing is taken from your balance, and the run says so.
What is counted: the tokens the run trains on, and the held-out examples used to check the result. A run that fails, is cancelled or is abandoned is charged for what ran, and says so: "This run stopped after 1,200 of 3,000 steps. It made no model, but it still used compute, so you were charged for what ran: $1.84." A run that used nothing is not charged.
A preference run also pays for the model calls that make its comparison pairs. The most they can cost is shown when the run starts, and you accept it then; those calls are paid as they are made, even if the run is cancelled at its approval.
What is not charged: checkpoint storage. A trained model you switch on answers inside your requests, and those are charged like any other request. Talking to a taste is charged per message. If what a run used wasn't recorded, you aren't charged.
How do you switch it off?
Say why. The reason is kept with who did it and when, and requests go back to what answered there before the model. Raising a model's share and then switching it off still goes back to what was there before the model, not to its earlier share.
POST /api/v1/cadreen/training/jobs/{id}/take-down
{ "use_for": "chat_answers", "reason": "Answers got worse on refunds" }Can you download the weights?
Yes, when Cadreen holds them: a run saves its weights in Cadreen's storage when it finishes. A workspace admin or the owner, signed in as a person, can download the archive the run made:
GET /api/v1/cadreen/training/artifacts/{id}/download?acknowledge_licence={licence_id}Before any weights are sent, the admin confirms that we may take them outside Cadreen under the base model's licence and the rights of the data they were trained on. The licence and its licence_id are on GET /api/v1/cadreen/training/artifacts/{id}; a download without the current licence_id is refused with 428 licence_not_acknowledged, and the confirmation is recorded with who made it and when.
The answer carries the licence of the base model the weights were trained from, in X-Model-Licence, and the hash the run recorded, in X-Content-SHA256. Their terms still apply to the weights. Each download is recorded.
A model whose weights Cadreen doesn't hold can't be downloaded: the answer is 409 not_downloadable.
What else should you know?
Before you switch a model on you can ask for a comparison: Cadreen asks your model and the model you use now the same 30 questions your model wasn't trained on, and a third model says whose answer is closer to the answer in your data. The page shows the most it can cost before it runs, and your workspace pays for what it uses like any model call. It is advice from one model on 30 questions, never a condition of switching on, and it isn't offered for choosing tools.
While a model is switched on, Cadreen keeps its weights. If they might expire, the page says so and when.
If a model that is switched on keeps failing, Cadreen pauses it: requests go back to what answered there before, the model stays saved, and the run's page says what happened and when Cadreen will try it again. Cadreen tries it again on a few requests and puts it back at the share you set once it answers well. If it keeps failing, Cadreen stops retrying and says so; switch it on again to try it.
Training and trained models are in preview. Calls that use tools, sent to a trained model, are in preview too.