Instructions to use LarrisX/kev-0.8b-selfteach with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use LarrisX/kev-0.8b-selfteach with PEFT:
from peft import PeftModel from transformers import AutoModel base_model = AutoModel.from_pretrained("Qwen/Qwen3.5-0.8B-Base") model = PeftModel.from_pretrained(base_model, "LarrisX/kev-0.8b-selfteach") - Notebooks
- Google Colab
- Kaggle
Self-taught Kev-0.8B (up to 256k tokens)
Kev-0.8B 1.0 taught by its own answers to read hundreds of documents at once. No human labels, no bigger model, no hosted model outputs.
Kev is a decision model: it reads an input once and answers typed questions about it with a probability per option. Ask Kev-0.8B about every complaint in a 64k-token input (e.g. a document packed with 246 complaints) and the base model scores 12%. However, answering each individual complaint scores 80% out of the box, serving as free training signal.
This model uses a teacher-student training method to reach 79% with 490 complaints in one read (128k tokens) and 75% with 990 (256k), surpassing Kev-9B, a model 11× its size, and handling context windows beyond what current decision models support (usually limited to 64k).
Results
Packed-complaints test (LarrisX/packed-complaints): 1,980 CFPB complaints, one product question each, scored alone and packed into long documents. Scored with Kev's own scorer.
| Complaints in one read | 1 (alone) | 123 (32k) | 246 (64k) | 490 (128k) | 990 (256k) |
|---|---|---|---|---|---|
| Kev-0.8B 1.0 | 0.803 | 0.143 | 0.121 | 0.118 | 0.112 |
| Kev-9B 1.0 | 0.849 | 0.583 | 0.513 | — | — |
| Kev-27B 1.0 | 0.857 | 0.853 | 0.854 | — | — |
| Self-taught Kev-0.8B | 0.804 | 0.798 | 0.791 | 0.788 | 0.748 |
Kev-9B and Kev-27B were scored to 64k. Kev-27B, the only released Kev trained on long documents, holds; it is also better on a complaint read alone (0.86 vs 0.80).
Kev's own short-question suites show no significant regression in its general capabilities: decision-v7 −0.1 [−1.2, +1.0], transfer-v4 −2.0 [−4.2, +0.3].
How it was trained
- Teacher. Released Kev-0.8B reads each training item alone: 5,219 fresh CFPB complaints (none in the test, none in Kev's training data) and 3,432 decision records from Kev's public training set. Its full answer distribution for each item is kept as the target. No dataset label is read.
- Student. The same model reads those items packed into long documents and is trained (Kev's trainer, LoRA r16 and Kev's answer head) to give each packed item the answer it gave alone.
- Rounds. The same teacher answers, longer documents each round. Each round holds up to about twice its longest training document.
| Round | Starts from | Training documents | Steps | Time (one H100 NVL) |
|---|---|---|---|---|
| 1 | Kev-0.8B 1.0 | 1k–31k tokens | 598 | 46 min |
| 2 | round 1 | 8k–63k tokens | 200 | 42 min |
| 3 (this model) | round 2 | 32k–125k tokens | 100 | 45 min |
Round 3 lifts Kev's 64k training cap to 128k for that run; it peaked at 80.5 GB.
Try the model
Same layout as jaredpalmer/kev-0.8b (a LoRA adapter on Qwen3.5-0.8B-Base plus Kev's answer head), so Kev's own server runs it: a TypeSafe-compatible API on your machine (CUDA, or MLX on Apple Silicon).
git clone https://github.com/jaredpalmer/kev.git && cd kev
uv sync --extra serve
uv run --extra serve python -m kev.serve --run LarrisX/kev-0.8b-selfteach --port 8009
Put every item in one input, give each an ID, and ask about each item by its ID:
curl -s localhost:8009/v1/systemone -H 'content-type: application/json' -d '{
"model": "kev-latest",
"state": "Ticket T-101:\nMy mortgage servicer added a late fee even though my payment cleared on time.\n\nTicket T-102:\nA collector keeps calling about a medical debt I already paid off.",
"questions": {
"T-101": {"type": "choice", "instructions": "Which kind of financial product is ticket T-101 about?",
"criteria": {"mortgage": "A mortgage or home loan", "debt_collection": "Collection of a debt", "card": "A credit card"}},
"T-102": {"type": "choice", "instructions": "Which kind of financial product is ticket T-102 about?",
"criteria": {"mortgage": "A mortgage or home loan", "debt_collection": "Collection of a debt", "card": "A credit card"}}
}}'
Kev's server refuses inputs over 64k tokens so to read longer ones, raise that limit in your Kev checkout before starting the server:
sed -i.bak 's/^SERVE_MAX_STATE = 65536$/SERVE_MAX_STATE = 262144/' kev/model.py
On an Apple M5 laptop (MLX, bf16), a 122k token input with 509 questions took 84 seconds and a 244k token input with 997 questions took 6 minutes.
Tips. Label each item with an ID and name it in its question; training used headers like Complaint 1234: and
[Complaint 1234]. Each question is answered on its own, so one input with 500 questions gives the same answers as 500
separate requests, for a fraction of the cost. The full guide and a Python example are in the
repo.
Licence and credit
Apache-2.0. Built on Kev by Jared Palmer (Apache-2.0) and Qwen3.5-0.8B-Base (Apache-2.0). Training complaints come from the public CFPB complaint database (US government work).
- Downloads last month
- 23