Instructions to use andrzejmontano/Nemotron-3.5-Rerank-8B-mlx-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use andrzejmontano/Nemotron-3.5-Rerank-8B-mlx-8bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download andrzejmontano/Nemotron-3.5-Rerank-8B-mlx-8bit --local-dir Nemotron-3.5-Rerank-8B-mlx-8bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Nemotron-3.5-Rerank-8B-mlx-8bit
8-bit MLX quantization of NVIDIA's Nemotron-3.5-Rerank-8B-BF16 — an 8B-parameter, multimodal (text + image) cross-encoder reranker — for Apple Silicon via MLX.
| Task | relevance scoring of (query, document) pairs — one logit, higher = more relevant |
| Modality | text, page image, or image+text documents |
| Precision | 8-bit affine (group 64) linears over BF16 backbone; score head kept BF16 |
| Size on disk | 8.76 GB (from ~15.6 GB BF16) |
| Text | bidirectional (non-causal), masked mean pooling (no normalization) |
| Context | YaRN-scaled positions (llama_4 attention scaling), full joint query+document sequence |
| Language | multilingual (per base model card) |
What this checkpoint is
A Mistral3ForSequenceClassification cross-encoder: the exact multimodal tower stack as the Nemotron-3.5-Embed models (Pixtral-style ViT vision tower + Ministral3 text backbone, hidden 4096, 34 layers) plus a single bias-free score head (Linear(4096 → 1)). Forward: embed tokens → replace [IMG] placeholders with projected image features → bidirectional layers → final norm → masked mean pool (no L2 normalization) → score dot computed in float32.
This is not a generative LLM and not an embedding model — it will not run under mlx_lm, and mlx_vlm's generative mistral3 cannot load it. It needs a reranker-specific MLX loader.
Unlike a bi-encoder, the cross-encoder reads the query and the document together, so it is agnostic to whatever embedding model produced the candidate list — no vector-dimension coupling, no corpus migration. Use it as stage two behind any first-stage retriever (bi-encoder top-K, e.g. K=50), reordering by relevance. Per NVIDIA's model card, reranking the top-50 of Nemotron-3.5-Embed-1B lifts ViDoRe v3 NDCG@10 from 57.80 → 66.89 (text) and 58.02 → 67.22 (image), and MIRACL-VISION from 68.93 → 78.69.
Input contract
Chat template with two roles — the rendered sequence is [IMG]…[IMG_END] query: {q}\n\npassage: {doc} (image block at the start, no BOS/EOS):
messages = [
{"role": "query", "content": [{"type": "text", "text": QUERY}]},
{"role": "document", "content": [{"type": "image"}, {"type": "text", "text": DOC}]},
]
# -> input_ids / attention_mask / pixel_values / image_sizes
# (same tensor set as the Nemotron-3.5-Embed processor contract)
Quantization policy
- All
nn.Linear→ 8-bit affine, group 64 (409 linears): text attention + MLP, vision attention + FFN, projector + patch_merger. - Kept BF16:
embed_tokens, all RMSNorms,patch_conv(Conv2d), and the score head (4096×1 = 16 KB — it is the output; highest sensitivity).
Validation (vs the official torch checkpoint, transformers 5.14.1)
Six (query, document) pairs spanning text-only / image-only / image+text (the model card's four published examples plus two stress pairs):
| leg | max |logit Δ| vs torch | ranking (6 pairs) |
|---|---|---|
| MLX BF16 port | 0.0066 | exact match |
| MLX 8-bit (this repo) | 0.0111 | exact match |
| MLX 8-bit, torch-free runtime processor | 0.0111 | exact match, sequence lengths 6/6 identical |
Warm per-pair latency (M3-class, 8-bit): text ~66–144 ms, page image ~490–740 ms.
- Downloads last month
- 34
Quantized
Model tree for andrzejmontano/Nemotron-3.5-Rerank-8B-mlx-8bit
Base model
mistralai/Ministral-3-8B-Base-2512