pulpie-orange-small (ONNX int8)
Quantized ONNX export of pulpie-small (EuroBERT token classifier).
- Graph: 2 inputs (
input_ids,attention_mask, int64[batch, seq]) βlogits[batch, seq, 2].position_ids = arange(seq)is computed inside the graph (matches the EuroBERT default). - Recipe: fp32
torch.onnxexport (opset 17, dynamic batch β€ 64 / seq β€ 8192) β token-embedding cast bf16 β int8 block-32 weight-only MatMuls (MatMulNBits, classifier head kept fp32). - Parity: fp32 ONNX vs torch
max|d| ~ 8e-06; int8 argmax agreement 100% (short) / 99.77% (long).
from optimum.onnxruntime import ORTModelForTokenClassification
from transformers import AutoTokenizer
m = ORTModelForTokenClassification.from_pretrained("REPO_ID", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("REPO_ID", trust_remote_code=True)
out = m(**tok("some page html", return_tensors="pt")) # out.logits
- Downloads last month
- 32