pico-type: A 1.5M-Parameter Byte-Level Multi-Head Content Classifier
Paper β’ 2608.14658 β’ Published β’ 1
A tiny byte-level multi-head content classifier β ~1.5M params, ~9MB single-file ONNX (FP32), ~18ms CPU inference.
Classifies any content from raw bytes: coarse type Β· modality Β· subtype Β· code language Β· text language Β· file MIME Β· risk flags
Paper: pico-type: A 1.5M-Parameter Byte-Level Multi-Head Content Classifier (arXiv:2608.14658, 2026)
Single-file IR-8 ONNX exports (FP32, opset 18) for all 4 Matryoshka tiers β tiny / small / base / pro β sharing the same trunk:
| Tier | Dim | Size | Params |
|---|---|---|---|
| tiny | 16 | 9.09 MB | 1,434,344 |
| small | 64 | 9.13 MB | 1,445,480 |
| base | 192 | 9.25 MB | 1,475,176 |
| pro | 576 | 9.61 MB | 1,564,264 |
Load directly with onnxruntime:
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession("picotype_base.onnx")
text = b"def hello(): pass"
ids = np.frombuffer(text[:1024], dtype=np.uint8).astype(np.int64)
padded = np.zeros(1024, dtype=np.int64)
padded[:len(ids)] = ids
mask = np.zeros(1024, dtype=np.bool_)
mask[:len(ids)] = True
outs = session.run(None, {"input_ids": padded[None, :], "attention_mask": mask[None, :]})
| Head | Classes | Accuracy | Dataset |
|---|---|---|---|
| coarse | 12 | 100% | Synthetic eval |
| modality | 8 | 100% | Synthetic eval |
| subtype | 24 | 93.8% | Synthetic eval |
| code_lang | 62 | 60.3% | The Heap β 24 real-world langs |
| text_lang | 30 | 98.3% | Wikipedia β 30 langs |
| file_mime | 90 | 100% | Synthetic eval |
| risk (multi-label) | 6 | 100% | Synthetic eval |
pip install pico-type