Downloads · 30 days
142
100% of all-time downloads
oraculumai/Manchego-MLX-4bit
Manchego-MLX-4bit is a text classification model from oraculumai. Use it when you need a label for a piece of text. It is set up for mlx. The card lists the license as apache-2.0.
<p align="center"<img src="manchego.jpg" alt="The Manchego mascot: a smiling wedge of Manchego cheese in a black beret, waving" width="420"</p
Downloads · 30 days
142
100% of all-time downloads
All-time downloads
142
Public
Parameters
4.2B
4.8 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
How the weights are stored.
U324.2B · 100%
From the Hugging Face model README
Manchego v3 converted with mlx_lm at 4 bits (group size 64; 2.4 GB) for Apple silicon. A 4B decision model: state +
question + options in, a probability per option out, one forward pass, no generated text. v3 was trained under the
SemIf prompt and must be prompted with it (below). This repository's main is v3 (tag v3); Manchego v2.1 stays at
tag v2.1. What v3 is, how it was trained, every result and every weakness: the main card.
| Rows | 80 task rows: accuracy (CE) | 200 real-text rows: accuracy (CE) |
|---|---|---|
| Manchego v3, MLX 8-bit, SemIf prompt | 0.963 (0.136) | 0.785 (0.602) |
| Manchego v3, MLX 4-bit (this model), SemIf prompt | 0.887 (0.239) | 0.765 (0.715) |
| Manchego v3, bf16, SemIf prompt | 0.963 (0.141) | 0.785 (0.602) |
| Manchego v2.1, MLX 8-bit, its own short prompt (for context) | 0.938 (0.180) | 0.910 (0.279) |
| Manchego v2.1, MLX 4-bit, its own short prompt (for context) | 0.875 (0.288) | 0.900 (0.290) |
Accuracy with cross-entropy in brackets, one prompt per forward pass, temperature 1. Four bits cost 5 of the 80 task rows and 4 of the 200 real-text rows against the 8-bit conversion; prefer the 8-bit conversion unless memory decides.
eval/formats.json for completeness, not as a way to use
the model.semif, yes/no true
first), one question per forward pass at temperature 1.0: the MLX builds on Apple silicon, bf16 on an RTX 5090.pip install "mlx-lm==0.31.3" huggingface_hub (tested with mlx-lm 0.31.3). Text-only conversion: the vision tower and
the multi-token-prediction head are dropped, so load it with mlx_lm, not mlx-vlm. English. The SemIf prompt handles
2 to 16 options (contract_semif.py, in the main repository).
import importlib.util
import mlx.core as mx
from huggingface_hub import hf_hub_download, snapshot_download
from mlx_lm import load
spec = importlib.util.spec_from_file_location(
"contract_semif", hf_hub_download("oraculumai/Manchego", "contract_semif.py", revision="v3"))
semif = importlib.util.module_from_spec(spec); spec.loader.exec_module(semif)
model, tok = load(snapshot_download("oraculumai/Manchego-MLX-4bit", revision="v3"))
r = semif.render("WIN a free cruise! Reply YES now.", "Is this message spam?", [("true", None), ("false", None)], "noul")
text = tok.apply_chat_template(r["messages"], tokenize=False, add_generation_prompt=True, enable_thinking=False)
logits = model(mx.array([tok.encode(text, add_special_tokens=False)]))[0, -1]
codes = mx.array([tok.encode(L, add_special_tokens=False)[0] for L in r["letters"]])
print(dict(zip(r["keys"], mx.softmax(logits[codes].astype(mx.float32)).tolist()))) # {"true": P(yes), "false": P(no)}
Or serve it with manchego-serve 0.2 (System One wire contract, offline):
pip install ".[mlx]" # in a manchego-serve v0.2.0 checkout
manchego-serve-download --repo oraculumai/Manchego-MLX-4bit --revision v3 --out ./manchego-v3-mlx4
manchego-serve --backend mlx --model ./manchego-v3-mlx4 --revision v3 --contract semif
17 to 255 options, or an empty state, go through the state-first prompt (contract_v2.py), which v3 never trained on.
Scoring several prompts as one padded batch moves probabilities slightly; score one prompt at a time when exact
reproducibility matters.
The most important points, from the main card: on the 231 public JevBench decisions and on Public8, v3 is ahead of v2.1 (our runs, not official JevBench scores; v3 has no official JevBench result yet). On unfamiliar task types it is level with v2.1 and overconfident. It is below v2.1 on fresh out-of-distribution draws of the project's own families. Questions with more than 16 options go through a prompt it never trained on.
Training data attribution and licences (WANLI, MultiNLI, Bitext, GSM8K, MathDial, Spider, ToolACE, When2Call,
NVD/CVE/CWE, ProsocialDialog, deepset prompt-injections, the 42 upstream datasets of the Natural Instructions tasks,
ViZDoom/Freedoom) are in NOTICE and on the main card, with the declarations the account holder's release decisions
rest on. Illustration: the Manchego mascot, an AI-generated image (ChatGPT image generation) supplied by the project's
author.