Banking77 intent classifier
A 23 MB model distilled from a large language model with tinydistill. It runs in your browser, and nothing you type leaves this page. Test accuracy 0.814 on 3080 held-out texts. Distilled from Qwen/Qwen2.5-7B-Instruct (8-shot, 4-bit) into sentence-transformers/all-MiniLM-L6-v2.
Inside the model
Every step below is computed by the model in this page as it classifies your text. Change the text or pick an example and watch the steps fill in.
The tokenizer splits the text
The model never sees letters or words, only pieces from a fixed vocabulary of 30,522 pieces. Rare words are split into several pieces (marked with a blue edge); hover a piece for its number. [CLS] is added at the start: the classifier reads the model's output at that position.
Layer by layer
The pieces pass through 6 transformer layers. Each layer lets every piece look at the others and update itself. If we stop after a layer and apply the final classifier, we see what the model would answer at that depth: early layers usually do not know yet, and the answer forms on the way up.
Where the classifier looks
Attention: how strongly the [CLS] position draws on each piece, averaged over the layer's attention heads. Darker means more. Pick a layer. [CLS] and [SEP] often collect much of the attention as a resting place, so compare the word pieces with each other.
From scores to probabilities
The classifier gives one score per label (77 labels) and a softmax turns them into probabilities. The top five are below; the strip shows all of them, largest first. The small probabilities on other labels are what distillation passes on: the teacher's soft labels tell the student which labels are similar, not just which one is right.
Which words matter
Each word is removed in turn and the model runs again on what is left. Words whose removal lowers the probability of support it; words whose removal raises it count against it. Hover a word for the change.
supports the answer counts against itTeacher and student
The student learned to imitate the soft labels of the teacher, Qwen/Qwen2.5-7B-Instruct (8-shot, 4-bit). The teacher is far too large to run here, but its saved soft labels for the examples are in this page.
When to ask the teacher
In a cascade the student answers and passes the texts it is least sure about to the teacher. The slider sets how many; accuracy and the confidence threshold are measured on the held-out test set.