How it compares¶
How does a tinydistill student compare with what people use instead? Each table below is one task, with the same gold budget for every method that trains (8 labelled examples per class, the same texts) and the same test set:
- Gold only: the student's encoder fine-tuned on the gold labels alone, no teacher (tinydistill's
--gold-onlybaseline, trained on the CPU). - SetFit (Tunstall et al., 2022) on the same gold labels, 3 seeds, on the CPU.
- GLiClass zero-shot (
knowledgator/gliclass-base-v3.0) with the task's label names, and with their descriptions where the task has them. No gold labels, no training. - The LLM as the classifier: the teacher itself, read from the saved run, on a GPU.
- tinydistill: the most accurate saved student per task that uses at most 8 gold labels per class, read from
the saved results in
examples/; the table picks up new runs when it is rebuilt.
Latency is per text at batch 1 with 2 CPU threads, on the same machine and the same 100 test texts for every
model. The scripts are in
examples/compare/; run.sh there
reruns everything.
What the tables show¶
- tinydistill is the most accurate method that runs on a CPU on Banking77 (0.875 against SetFit's 0.796; 0.872 as the deployed int8 model) and CLINC150 (0.860 against 0.712; 0.859 deployed); on Danish MASSIVE it reaches 0.815 against 0.586 for gold only. Its int8 student is the fastest and smallest model in every table, level with the gold-only model of the same encoder on three tasks: 0.8 to 2.1 ms per text and 23 to 24 MB, against 4.6 to 6.9 ms and 92 MB for SetFit and 113 to 577 ms and 746 MB for GLiClass.
- The student comes close to its teacher at a fraction of the latency. It is above the LLM that labelled its data on Banking77 (0.875 against 0.859) and Danish MASSIVE (0.815 against 0.808), and below it on CLINC150 (0.860 against 0.941) and financial tweets (0.828 against 0.842), at 0.8 to 2.1 ms on a CPU against 155 ms to 2.6 s on a GPU.
- It needs a GPU and a good teacher; SetFit needs neither. SetFit trained in 7 minutes on the CPU and came
within 0.079 of the best student on Banking77 and 0.148 on CLINC150. The best students took 35 minutes of
labelling on Banking77, with the 7B teacher shown each text's 16 most similar gold examples and averaged with
a linear probe on its hidden states (
--probe), and 7.2 hours on CLINC150, with Gemma 4 12B shown the same examples and averaged with its own probe. - A weak teacher gives a weak student. With a zero-shot teacher and no gold labels, the CLINC150 student (0.573) is below gold only (0.580) and SetFit (0.712); with the 16 most similar gold examples in the prompt of Gemma 4 12B and its probe, it reaches 0.860.
- With very few labels, zero-shot can beat few-shot training. On financial tweets 8 labels per class are 24 texts: SetFit reaches 0.420 and gold only 0.318, below GLiClass zero-shot (0.676). The student, trained on the LLM's labels without any gold labels, reaches 0.828.
- GLiClass is the weakest on the many-label tasks (0.443 on Banking77, 0.530 on CLINC150) and the slowest model on a CPU, because it reads every label name with every text. Label descriptions lowered its accuracy on both tasks where they were tried.
- Against published few-shot results on Banking77 (listed apart, not rerun: 5 or 10 labels per class and larger models), the student's 0.875 with 8 labels per class is above every published 5-shot result and above CPFT (0.872), DNNC (0.8671), RoBERTa-Large (0.8608) and SetFit (0.8451) with 10; it is below SetFit on 10 examples per class that a human expert picked (0.881, micro-F1), LLaMA-2 7B classifying every test text with 20 retrieved examples (0.8945), and RoBERTa-Large with ICDA, which also trains on texts written by OPT-66B (0.8979).
Not run, for time: SetFit with all-mpnet-base-v2 (on Banking77 it ran for 90 minutes on the CPU without
finishing its 3 seeds) and GLiClass large, on every task; SetFit and GLiClass on Danish MASSIVE. The saved
SetFit run with paraphrase-mpnet-base-v2 on Banking77, trained on a GPU, reached 0.789 ± 0.005 with the same
616 labels (examples/banking77/setfit.md).
examples/compare/run.sh includes these runs.
Banking77¶
| Method | Gold labels | Also uses | Accuracy | Macro-F1 | Latency per text, CPU | Size | Build time | GPU needed |
|---|---|---|---|---|---|---|---|---|
Gold only: all-MiniLM-L6-v2 fine-tuned on the gold labels, ONNX int8 |
616 | 0.565 ± 0.035 | 0.530 ± 0.043 | 1.2 ms | 23 MB | 62 s (CPU) | no | |
SetFit, all-MiniLM-L6-v2 |
616 | 0.796 ± 0.002 | 0.792 ± 0.002 | 5.4 ms | 92 MB | 7 min (CPU) | no | |
GLiClass zero-shot, gliclass-base-v3.0 |
0 | label names | 0.443 | 0.460 | 419.7 ms | 746 MB | none | no |
The LLM as the classifier: Qwen2.5-7B-Instruct, 16 similar examples, 4-bit |
616 (in the prompt) | 0.851 | 0.850 | 157 ms (RTX 4090) | 5.4 GB | none | yes, to run it | |
tinydistill: all-MiniLM-L6-v2 student of that LLM, ONNX int8 |
616 | the LLM's labels on 10,003 unlabelled texts | 0.857 ± 0.001 | 0.856 ± 0.001 | 1.3 ms | 23 MB | 35 min labelling + 58 s training (RTX 4090) | yes, to build it |
The LLM as the classifier: Qwen2.5-7B-Instruct, 16 similar examples, 4-bit, probe |
616 (in the prompt) | 0.859 | 0.859 | 155 ms (RTX 4090) | 5.4 GB | none | yes, to run it | |
tinydistill: all-MiniLM-L6-v2 student of that LLM, ONNX int8 |
616 | the LLM's labels on 10,003 unlabelled texts | 0.875 ± 0.001 | 0.875 ± 0.001 | 1.2 ms | 23 MB | 35 min labelling + 58 s training (RTX 4090) | yes, to build it |
Banking77, 3,080 test texts. Every method that trains gets the same 616 gold-labelled texts (8 per class, tinydistill's own pick with seed 0); mean ± standard deviation over 3 training seeds. Latency: batch 1, 2 threads, median over three passes through the same 100 test texts, each library's own inference (tinydistill's Predictor for the ONNX models); the LLM runs on a GPU. The gold-only and tinydistill accuracies are the PyTorch models'; their latency and size are those of the int8 export ("saved": timed when the run was made, not re-timed with the others). Build time is per model; the CPU runs trained with 16 threads. The last tinydistill row is examples/teachers-2026/probe/banking77-7b-similar16-probe.json, the most accurate of 31 saved runs on this test set that use at most 8 gold labels per class (picked on the test set, a tie at three decimals going to the better int8 model, then the smaller); the int8 model it times scores 0.872. The LLM and tinydistill rows before it are an earlier run, kept for reference: examples/banking77/banking77-7b-similar16.json.
Reported in the papers, not rerun. The protocol differs from the table above: 5 or 10 gold labels per class (385 or 770) against our 8 (616), plus what the third column says, and larger models (RoBERTa-Large, 355M parameters; MPNet, 110M; LLaMA-2 7B, an LLM that reads every test text). No paper uses 8 per class, so ours sits between their 5-shot and 10-shot settings. The test set is the same 3,080 texts. Lin et al. sample the 10 per class at random, average 5 seeds and train RoBERTa-Large for 40 epochs; Zhang et al. average 5 runs; Milios et al. average 3 random splits; Loukas et al. train on 10 per class that a human expert picked as representative.
| Method | Gold labels | Also uses | Accuracy | Source |
|---|---|---|---|---|
| SetFit, 5-shot / 10-shot | 385 / 770 | 0.7989 / 0.8451 | Milios et al. 2023, Table 1 (arXiv 2309.10954) | |
| CPFT, 5-shot / 10-shot | 385 / 770 | contrastive pre-training on the unlabelled training texts of six intent datasets | 0.8086 / 0.872 | Zhang et al. 2021, Table 2 (arXiv 2109.06349) |
| LLaMA-2 7B as the classifier, 5-shot / 10-shot | 385 / 770 | each test text's 20 most similar gold examples in the prompt (an LLM per text) | 0.864 / 0.8945 | Milios et al. 2023, Table 1 (arXiv 2309.10954) |
| RoBERTa-Large + classifier, 10-shot | 770 | 0.8608 | Lin et al. 2023, Table 2 (arXiv 2302.05096) | |
| DNNC, 10-shot | 770 | pre-training on natural language inference datasets | 0.8671 | Table 2 of arXiv 2212.00301 and of arXiv 2302.05096 |
| SetFit, MPNet-v2, 10-shot | 770, picked by a human expert | 0.881 | Loukas et al. 2023, Table 4 (arXiv 2311.06102); micro-F1 | |
| RoBERTa-Large + ICDA-XL, 10-shot | 770 | 128x as many texts written by OPT-66B, filtered by PVI on a validation set | 0.8979 | Lin et al. 2023, Table 2 (arXiv 2302.05096) |
CLINC150¶
| Method | Gold labels | Also uses | Accuracy | Macro-F1 | Latency per text, CPU | Size | Build time | GPU needed |
|---|---|---|---|---|---|---|---|---|
Gold only: all-MiniLM-L6-v2 fine-tuned on the gold labels, ONNX int8 |
1208 | 0.580 ± 0.019 | 0.620 ± 0.023 | 1.1 ms | 23 MB | 63 s (CPU) | no | |
SetFit, all-MiniLM-L6-v2 |
1208 | 0.712 ± 0.001 | 0.780 ± 0.000 | 4.6 ms | 92 MB | 7 min (CPU) | no | |
GLiClass zero-shot, gliclass-base-v3.0 |
0 | label names | 0.530 | 0.626 | 577.3 ms | 746 MB | none | no |
GLiClass zero-shot, gliclass-base-v3.0 |
0 | label names and descriptions | 0.520 | 0.616 | 538.3 ms | 746 MB | none | no |
The LLM as the classifier: Qwen2.5-7B-Instruct, zero-shot, 4-bit |
0 | 0.581 | 0.616 | 87 ms (RTX 4090) | 5.4 GB | none | yes, to run it | |
tinydistill: all-MiniLM-L6-v2 student of that LLM, ONNX int8 |
0 | the LLM's labels on 15,250 unlabelled texts | 0.573 ± 0.003 | 0.604 ± 0.005 | 1.2 ms | 23 MB | 15 min labelling + 2 min training (RTX 4090) | yes, to build it |
The LLM as the classifier: gemma-4-12B-it, 16 similar examples, 4-bit, probe |
1208 (in the prompt) | 0.941 | 0.950 | 1300 ms (RTX 4090) | 7.5 GB | none | yes, to run it | |
tinydistill: all-MiniLM-L6-v2 student of that LLM, ONNX int8 |
1208 | the LLM's labels on 15,250 unlabelled texts | 0.860 ± 0.005 | 0.898 ± 0.004 | 0.8 ms | 23 MB | 7.2 h labelling + 82 s training (RTX 4090) | yes, to build it |
CLINC150 (plus, with out of scope), 5,500 test texts. Every method that trains gets the same 1208 gold-labelled texts (8 per class, tinydistill's own pick with seed 0); mean ± standard deviation over 3 training seeds. Latency: batch 1, 2 threads, median over three passes through the same 100 test texts, each library's own inference (tinydistill's Predictor for the ONNX models); the LLM runs on a GPU. The gold-only and tinydistill accuracies are the PyTorch models'; their latency and size are those of the int8 export ("saved": timed when the run was made, not re-timed with the others). Build time is per model; the CPU runs trained with 16 threads. The last tinydistill row is examples/teachers-2026/probe/clinc150-gemma4-12b-similar16-probe.json, the most accurate of 14 saved runs on this test set that use at most 8 gold labels per class (picked on the test set, a tie at three decimals going to the better int8 model, then the smaller); the int8 model it times scores 0.859. The LLM and tinydistill rows before it are an earlier run, kept for reference: examples/clinc150/clinc150-7b-shortlist20-keep-oos.json.
Published few-shot results on CLINC150 are not in this table: the papers score the 150 intents on the 4,500
in-scope test texts, while this table counts out of scope as a 151st label over all 5,500. Scored their way,
the student of the recommended settings (--probe-only, 16 similar examples, 37 minutes of labelling) reaches
0.951 deployed, against 0.9234 and 0.9418 for CPFT with 5 and 10 labels per class, 0.8868 and 0.9067 for
SetFit, and 0.9413 and 0.952 for LLaMA-2 7B classifying every test text with 20 retrieved examples; see
RESULTS.md
for the sources, the other rows and the caveats.
Danish MASSIVE¶
| Method | Gold labels | Also uses | Accuracy | Macro-F1 | Latency per text, CPU | Size | Build time | GPU needed |
|---|---|---|---|---|---|---|---|---|
Gold only: paraphrase-multilingual-MiniLM-L12-v2 fine-tuned on the gold labels, ONNX int8 |
476 | 0.586 ± 0.025 | 0.524 ± 0.016 | 2.5 ms | 118 MB | 80 s (CPU) | no | |
The LLM as the classifier: gemma-4-12B-it, 16 similar examples, 4-bit, probe |
476 (in the prompt) | 0.808 | 0.780 | 2567 ms (RTX 4090) | 7.5 GB | none | yes, to run it | |
tinydistill: paraphrase-multilingual-MiniLM-L12-v2 student of that LLM, ONNX int8 |
476 | the LLM's labels on 11,514 unlabelled texts | 0.815 ± 0.002 | 0.782 ± 0.005 | 2.1 ms | 24 MB | 8.9 h labelling + 2 min training (RTX 4090) | yes, to build it |
Danish MASSIVE, 2,974 test texts. Every method that trains gets the same 476 gold-labelled texts (8 per class, tinydistill's own pick with seed 0); mean ± standard deviation over 3 training seeds. Latency: batch 1, 2 threads, median over three passes through the same 100 test texts, each library's own inference (tinydistill's Predictor for the ONNX models); the LLM runs on a GPU. The gold-only and tinydistill accuracies are the PyTorch models'; their latency and size are those of the int8 export ("saved": timed when the run was made, not re-timed with the others). Build time is per model; the CPU runs trained with 16 threads. The last tinydistill row is examples/massive-da/paraphrase-multilingual-MiniLM-L12-v2-trimmed-gemma4-12b-similar16-probe.json, the most accurate of 12 saved runs on this test set that use at most 8 gold labels per class (picked on the test set, a tie at three decimals going to the better int8 model, then the smaller); the int8 model it times scores 0.815.
Financial tweets¶
| Method | Gold labels | Also uses | Accuracy | Macro-F1 | Latency per text, CPU | Size | Build time | GPU needed |
|---|---|---|---|---|---|---|---|---|
Gold only: all-MiniLM-L6-v2 fine-tuned on the gold labels, ONNX int8 |
24 | 0.318 ± 0.100 | 0.293 ± 0.060 | 1.6 ms | 23 MB | 2 s (CPU) | no | |
SetFit, all-MiniLM-L6-v2 |
24 | 0.420 ± 0.006 | 0.399 ± 0.005 | 6.9 ms | 92 MB | 24 s (CPU) | no | |
GLiClass zero-shot, gliclass-base-v3.0 |
0 | label names | 0.676 | 0.665 | 112.8 ms | 746 MB | none | no |
GLiClass zero-shot, gliclass-base-v3.0 |
0 | label names and descriptions | 0.632 | 0.625 | 142.8 ms | 746 MB | none | no |
The LLM as the classifier: Qwen2.5-7B-Instruct, Mistral-7B-Instruct-v0.3, Phi-3.5-mini-instruct, ensemble of 3, zero-shot, 4-bit |
0 | 0.842 | 0.801 | 242 ms (RTX 4090) | 11.7 GB | none | yes, to run it | |
tinydistill: all-MiniLM-L6-v2 student of that LLM, ONNX int8 |
0 | the LLM's labels on 9,543 unlabelled texts | 0.828 ± 0.006 | 0.778 ± 0.005 | 1.6 ms | 23 MB | 6 min labelling + at most 2 min training (RTX 4090) | yes, to build it |
Financial tweets, 2,388 test texts. Every method that trains gets the same 24 gold-labelled texts (8 per class, tinydistill's own pick with seed 0); mean ± standard deviation over 3 training seeds. Latency: batch 1, 2 threads, median over three passes through the same 100 test texts, each library's own inference (tinydistill's Predictor for the ONNX models); the LLM runs on a GPU. The gold-only and tinydistill accuracies are the PyTorch models'; their latency and size are those of the int8 export ("saved": timed when the run was made, not re-timed with the others). Build time is per model; the CPU runs trained with 8 or 16 threads. The last tinydistill row is examples/financial-tweets/financial-tweets-ensemble.json, the most accurate of 9 saved runs on this test set that use at most 8 gold labels per class (picked on the test set, a tie at three decimals going to the better int8 model, then the smaller); the int8 model it times scores 0.830.