eulogik/pico-type-v02
125
<div align="center">
pico-type 🔍 (v02)
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
 ![Python]()  ![ONNX]() 
</div>
Paper: pico-type: A 1.5M-Parameter Byte-Level Multi-Head Content Classifier (arXiv:2608.14658, 2026)
What's here
Single-file IR-8 ONNX exports (FP32, opset 18) for all 4 Matryoshka tiers — tiny / small / base / pro — sharing the same trunk:
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, :]})Evaluation (v2 — trained on real data)
Links
- arXiv paper
- GitHub
- Main HF model repo
- HF Space (live demo)
- PyPI:
pip install pico-type
