Replace an LLM call with your own model
Upload a file of examples and get a small model that picks one answer from a short list.
File
Drop a file of examples herespam-texts.docx2,300 texts, spam or not spam
Progress
- Reading your files
- Labeling examples
- Training on a GPU
- Scoring and saving
Waiting for a file
Saved spam-filter, 31 MB
Waiting for a score
Macro-F1 on the same 240 held-out rows
OpenDecision-Small--.-base model
spam-filter--.-labeled by AI
Try it
A spam text from the file--
Looks better, on AI labels
Score out of 100 (macro F1). Both models ran on the same 240 rows of your text, labeled by AI, and neither trained on them. AI labels can be wrong, so this does not show it is right on your text.
OpenDecision-Small48.3
spam-filterlabeled by AI99.2
Try it
A spam text from the filespam 99.9999%
Hey, are we still on for dinner tonight? I can pick you up around 7not spam 99.9984%
- One CPU thread
- About 42 ms
- Model file
- 31 MB
Request
curl https://api.tokz.si/v1/decide \
-H "Authorization: Bearer $TOKZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "spam-filter", "inputs": "Hey, are we still on for dinner tonight? I can pick you up around 7"}'Or run it free and offline on your machine through the same SDK.
Response about 42 ms on one CPU thread
{
"id": "dec_3f9a...",
"model": "spam-filter",
"results": [{
"decision": {
"type": "choice",
"best": "not spam",
"policy": { "spam": 0.000016, "not spam": 0.999984 }
}
}],
"usage": { "billed_tokens": 256, "cost_usd": 0.0000064 }
}How it worksFrom a file to an API call
spam-texts.docx2,300 texts
Labeling examples
| Text | Label |
|---|---|
| A spam text from the file | spam |
| Hey, are we still on for dinner tonight? I can pick you up around 7 | not spam |
| 2,298 more rows | |
Macro-F1 on public datasets, before and after
- SMS spamhuman labels48.2 to 97.5
- Arabic tweetsAI labels40.8 to 70.7
- Spanish reviews57.1 to 65.8
- Emotion47.2 to 59.8
- BankingNot clear70.3 to 69.1
POST /v1/decide
"best": "not spam"- One CPU thread
- About 42 ms
- Model file
- 31 MB
- Fine tune with a fileOnly if it beats OpenDecision-Small on rows you labeled.
- $2.00
- Fine tune with no fileNo charge.
- $0
- Hosted callsPer 1M billed tokens, at least 256 tokens a request, the same as OpenDecision-Small.
- $0.025
- Local calls and downloadsFree.
- $0
Bring a file of examplesLeave with a model you own
Macro-F1 out of 100 on the same 240 held-out rows