Views
No views yet
| 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 |
1import onnxruntime as ort
2import numpy as np
3
4session = ort.InferenceSession("picotype_base.onnx")
5
6text = b"def hello(): pass"
7ids = np.frombuffer(text[:1024], dtype=np.uint8).astype(np.int64)
8padded = np.zeros(1024, dtype=np.int64)
9padded[:len(ids)] = ids
10mask = np.zeros(1024, dtype=np.bool_)
11mask[:len(ids)] = True
12
13outs = 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