CoolFace
Modelpublic

eulogik/pico-type-v02

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
1likes26downloads
Model Card

<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

![License](LICENSE) ![Python]() ![PyPI](https://pypi.org/project/pico-type/) ![ONNX]() ![Paper](https://arxiv.org/abs/2608.14658)

</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:

TierDimSizeParams
tiny169.09 MB1,434,344
small649.13 MB1,445,480
base1929.25 MB1,475,176
pro5769.61 MB1,564,264

Load directly with onnxruntime:

python
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)

HeadClassesAccuracyDataset
coarse12100%Synthetic eval
modality8100%Synthetic eval
subtype2493.8%Synthetic eval
code_lang6260.3%The Heap โ€” 24 real-world langs
text_lang3098.3%Wikipedia โ€” 30 langs
file_mime90100%Synthetic eval
risk (multi-label)6100%Synthetic eval

Links