xlm-roberta-large-xnli-anli, 8-bit MLX (Swift)
vicgalle/xlm-roberta-large-xnli-anli (revision 85981da85b85045fecd6e81e501767de7da370eb), quantized to 8-bit for MLX Swift:
0.63 GB instead of about 2.2 GB in fp32.
Stilltone, a local-first meeting-notes app for macOS, uses it as the multilingual NLI classifier (does a new statement contradict or settle an old one?). It runs entirely on the Mac.
How it was made and checked
- Made: the original fp32 weights were loaded by Stilltone's own MLX Swift loader and quantized in memory
(
MLXNN.quantize, affine, 8-bit, group size 64, its defaultLinearandEmbeddinglayers). The resulting module parameters were saved unchanged asmodel.safetensors.quantization.jsonrecords the scheme. - Checked: Stilltone's memory-diff benchmark (four packs: English, Czech and a multilingual parliament pack) produced byte-identical results with these files and with the original fp32 weights. That benchmark exercises the embedder, the reranker and the NLI model together.
Format: read this before using it elsewhere
These files are MLX Swift weights, not a Transformers checkpoint. Parameter names follow MLXEmbedders'
BertModel after its sanitize step, and quantized layers store weight / scales / biases. To load them,
build the same module, call quantize(model:groupSize:64,bits:8,mode:.affine) on it first, then load the
arrays. That's what Stilltone does when quantization.json is present. transformers and sentence-transformers
cannot load them directly; use the original repo for those.
config.json and the tokenizer files are unchanged from the source (listed below).
Files
model.safetensors: the 8-bit parameters.quantization.json:{"bits": 8, "groupSize": 64, "mode": "affine"}.config.jsonis copied from the source revision. The source repo ships notokenizer.json. XLM-RoBERTa-large models share one tokenizer (same SentencePiece vocabulary), sotokenizer.json,tokenizer_config.jsonandspecial_tokens_map.jsonare taken fromBAAI/bge-reranker-v2-m3at revision953dc6f6f85a1b2dbfca4c34a2796e7dde08d41e(Apache-2.0). These are the exact files every Stilltone evaluation used.
License and attribution
MIT, the same as the original vicgalle/xlm-roberta-large-xnli-anli, itself fine-tuned from FacebookAI/xlm-roberta-large (MIT). All credit for the model goes to its authors. The tokenizer files come from BAAI/bge-reranker-v2-m3 (Apache-2.0).