StaticKD-compact
a compact news classifier
2 min readupdated
The model is designed for automatic news classification across 17 basic themes of the international IPTC Media Topic taxonomy (politics, sports, economics, science, and others). It was created using knowledge distillation (transferring knowledge from a large model to a compact one) and subsequent pruning of rare tokens from the base model's vocabulary. As a result, its memory footprint has nearly halved, and processing speed has increased. Inference requires only basic Python libraries without heavy frameworks.
Key features
- High speed: processes over 600 articles per second on a single CPU core.
- Lightweight: the model file is only 23 MiB, and RAM usage is around 277 MiB.
- 17 categories: categorizes article text into key news topics.
- Easy deployment: requires only
numpy,tokenizers, andsafetensorslibraries to run.
What you can do
- Stream filtering: set up automatic routing and sorting of news feeds on a CPU server.
- Content analysis: quickly tag large text arrays by topic for media monitoring.
- Pipeline integration: embed the model into lightweight backend services for on-the-fly classification of headlines and texts.
Example
from statickd_inference import StaticKDClassifier
model = StaticKDClassifier(".")
texts = [
"The central bank raised its key interest rate by half a percentage point on Thursday.",
"El delantero marcó dos goles en la segunda parte y el equipo se clasificó."
]
print(model.predict(texts, top_k=2))
Read more
Details• Accuracy (Macro-F1): 0.484 on the test dataset.
• Hardware requirements: runs on CPU, requires about 277 MiB of RAM.
• Limitations: accuracy drops sharply on languages with a high proportion of rare tokens (for example, Bengali, Malayalam, Odia, Punjabi).
• Base model:
minishlab/potion-multilingual-128M.









Comments