Classification with a few labels and short texts is a simple task: the model reads a short text and picks one label from a small list. A small model does this well, faster and cheaper than a large one, because the task needs pattern matching, not deep reasoning. The test is to run the small model on your real labels and count its errors; if the errors are few and understandable, the small model is enough.
Prerequisites
- The label list: the categories the task uses.
- A set of texts to classify, with known correct labels.
- A small model to test, with access to run it.
Steps
Step 1: Count the labels
Count the labels: 2 to 5 labels is a simple task, and a small model is the right starting point. More than 20 labels, or labels that need judgement, is a harder task that may need a larger model.
Step 2: Test the small model
Run the small model on your test texts and count the correct labels. A small model that scores 9 of 10 on your labels is doing the job; a large model would need to beat it clearly to be worth the cost.
Step 3: Check the errors
Read the errors the small model makes. If the errors are borderline cases that a person would also find hard, the model is fine; if the errors are basic, the task needs a larger model or better labels.
Worked example: Cedar Street Library book sorting
The fictional Cedar Street Library classifies 20 new books into 3 sections: fiction, non-fiction and children’s.
| Model | Books classified | Correct | Errors |
|---|---|---|---|
| Small model | 20 | 19 of 20 | 1 borderline case |
| Large model | 20 | 20 of 20 | None |
The small model classifies 19 of 20 books correctly, with the 1 error a borderline case, so the library keeps the small model for sorting.
Expected result. The small model scores well on your real labels, and its errors are borderline cases, not basic mistakes. UNTESTED: this guide was not run against a live model or API. The worked example below is fictional practice material, and its result is the expected result, not a measured one.
Limits
- A small test set can flatter a model; test at least 20 items before deciding.
- Labels that overlap or need specialist knowledge are not simple tasks.
- This guide does not cover fine-tuning, which can lift a small model further.
