Views
No views yet
(code premise, prose claim)
pair it predicts {entailment, neutral, contradiction}. Fine-tuned from
microsoft/unixcoder-base,
then exported to ONNX and dynamically quantized to int8 (per-channel,
avx512_vnni) for portable CPU inference.model_quantized.onnx (~121 MB, ~4× smaller than the fp32 checkpoint)0=entailment, 1=neutral, 2=contradiction1from optimum.onnxruntime import ORTModelForSequenceClassification
2from transformers import AutoTokenizer
3
4repo = "Arthur920/staleguard"
5tok = AutoTokenizer.from_pretrained(repo)
6model = ORTModelForSequenceClassification.from_pretrained(
7 repo, file_name="model_quantized.onnx")
8
9inputs = tok("def add(a, b): return a + b",
10 "The function returns the sum of a and b.",
11 truncation=True, max_length=192, return_tensors="pt")
12logits = model(**inputs).logits
13print(model.config.id2label[int(logits.argmax(-1))])model/quantize.py.