CoolFace
Modelpublic

saigyo-hoshi/smollm2-135m-attn-onnx

sourceHugging Faceapache-2.0updated 25d agoView on Hugging Face
0likes363downloads
Model Card

SmolLM2-135M-Instruct with attention outputs (ONNX)

Derived from HuggingFaceTB/SmolLM2-135M-Instruct: same weights, ONNX graph re-exported with per-layer attention-probability outputs (attentions.0 … attentions.29) alongside logits and the KV cache, for in-browser attention visualization in Tsumugi.

Also exposes the embedding lookup as inputs_embeds ([batch, seq, 576]), and ships geometry/ — exact top-12 cosine neighbours, a PCA-64 int8 copy of the embedding table, decoded token texts and a manifest — for the Embeddings card in Tsumugi.

Validation (see validation-report.json): logits parity with the stock export, row-stochastic causal attention rows, cached-vs-full-matrix equivalence.

Variants: onnx/model_quantized.onnx (dynamic int8, dtype: 'q8', with /lm_head/MatMul excluded from quantization) is the sole published variant: it is greedy-token-identical to the stock fp32 export on the validation prompts — better than the official stock q4, which diverges at step 4. q4 and fp16 variants were produced and deliberately withheld (q4: on par with stock q4 but strictly worse than this q8; fp16: computes incorrectly on the WebGPU execution provider despite loading).