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

Model

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

0

stars

4

commits

1

linked in READMEs

Sep 2, 2026

updated

conversational
llama
onnx
text-generation
transformers.js

README

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.0attentions.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).

Contributors

saigyo-hoshi

4 commits

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

Model

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

0

stars

4

commits

1

linked in READMEs

Sep 2, 2026

updated

conversational
llama
onnx
text-generation
transformers.js

README

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.0attentions.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).

Contributors

saigyo-hoshi

4 commits