alt.freeweights.text / Nanbeige4.2-3B-OptiQ-4bit
From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.textSubject:

Nanbeige4.2-3B-OptiQ-4bit

Date: 2026-11-15Commit: e88d49fSigned: 2DC28CC7B26A283B ✓

Text generation model with 4.2B parameters. Safetensors weights, 3.32 GB in all. Published by mlx-community under Apache-2.0.

4.2B params3.32GBNanbeige4.2-3B-OptiQ-4bitsafetensorspermissive
FactsParams4.2BSize3.32 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get mlx-community/Nanbeige4.2-3B-OptiQ-4bit
# manifest sha256 83166cd1ccd5… · 3.32 GB · 13 files
$ fw verify ./Nanbeige4.2-3B-OptiQ-4bit mlx-community/Nanbeige4.2-3B-OptiQ-4bit
From sourceHosted (signed)mlx-community/Nanbeige4.2-3B-OptiQ-4bitLast check: 2026-11-15 05:16 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of Nanbeige4.2-3B.

Works with

Overview

Size
3.32 GB
Weights
3.30 GB (safetensors)
Parameters
4.2B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
13, each with a sha256
Publisher
mlx-community
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Base model: Nanbeige/Nanbeige4.2-3B

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:16 UTCpassed

Model card

From the publisher at commit e88d49f. Shown as plain text with links; images open at the publisher.

Nanbeige4.2-3B-OptiQ-4bit#

Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. Try the Lab · All OptiQ quants · Docs

An OptiQ mixed-precision 4-bit quant of Nanbeige/Nanbeige4.2-3B for Apple Silicon.

Nanbeige4.2 is a looped transformer. It has a 22-layer decoder stack, but the stack is run twice with the same shared weights (num_loops: 2), so a 3B-parameter model does the compute of a much deeper one. Each loop keeps its own KV cache. Stock mlx-lm has no nanbeige class, so OptiQ (0.4.6+) ships a vendored, mlx-native port of the architecture that registers itself with mlx-lm on import optiq. It is a reasoning model and opens its answers with a short chain of thought before the final response.

Install#

pip install "mlx-optiq>=0.4.6"

The vendored nanbeige architecture ships in the wheel, so this repo loads under stock mlx-lm once optiq is imported. Older OptiQ releases cannot load it.

Usage#

import optiq  # registers the nanbeige architecture with mlx-lm
from mlx_lm import load, generate

model, tok = load("mlx-community/Nanbeige4.2-3B-OptiQ-4bit")
prompt = tok.apply_chat_template(
    [{"role": "user", "content": "What is the capital of France?"}],
    tokenize=False, add_generation_prompt=True)
print(generate(model, tok, prompt, max_tokens=512))

optiq serve --model mlx-community/Nanbeige4.2-3B-OptiQ-4bit serves an OpenAI/Anthropic-compatible API. LoRA fine-tuning uses optiq lora train.

The quant#

OptiQ measures each layer's sensitivity to quantization and assigns per-layer bit-widths, rather than putting every layer at the same width. Here that gives a mix of 4-bit and 8-bit layers:

Base modelNanbeige/Nanbeige4.2-3B (bf16)
Quantized layers155 (93 at 4-bit, 62 at 8-bit)
Average precision5.5 bits/weight
Size on disk3.15 GB
Group size64

The full per-layer bit assignment is in optiq_metadata.json.

Files

13 files · 3.32 GBWeights 3.30 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 13 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md2.69 KBbcb7c53342adf3c1594de1515fc73c2612c061cfead36b3edf7cb24d2697604e
chat_template.jinja8.36 KBcb1699773afe04d17eacf8d0802feabac9ec10c3061e280f3121754aa749d87d
config.json34.6 KBfc14b824cb824d393d33ca7396532692f8d1ed5667fd10d9d0516bd45d630ee9
configuration_nanbeige.py26.0 KBc517227741f0fc007061bde1873138545ce15e67716a062513193c06300c7685
generation_config.json187 B68c690ce23efb6caae30c006ff3c1efd826297ff1df4338c04f7ac6f685d8746
kv_config.json1.44 KB55114537bf49bd51681f30f827fa26fca271281aad40ff8883f3c133fadb7de1
model.safetensors3.30 GBd80f969f9609ee53e5904f611a875c40ee5785c07594d3926200a66b78effca0
model.safetensors.index.json36.1 KB28f19af55ad2b167c4c74077d2542a12d4b0704d564610f5b7f98d8fcd11facd
modeling_nanbeige.py122 KB547737f989f5cb741c1a568acaf85f83521fa67a8f7268e19f9a37e60127c0d5
optiq_metadata.json13.7 KBa8599a8adb53ec5e336bda366ec52504ff49b028950114f3fbb9886e3f397d2e
tokenizer.json18.5 MBa002676e923776f5a59d21320d667920e732000f7762fb72e6be6e911790e060
tokenizer_config.json492 Bb94dfdd9f7b774c3770a7722dea064a11207d8e8812563968161c51151832f25
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
e88d49fdd9 pinned now2026-11-15 05:16 UTC13 files · 3.32 GB

Use it

$ fw get mlx-community/Nanbeige4.2-3B-OptiQ-4bit
# manifest sha256 83166cd1ccd5… · 3.32 GB · 13 files
$ fw verify ./Nanbeige4.2-3B-OptiQ-4bit mlx-community/Nanbeige4.2-3B-OptiQ-4bit
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/mlx-community/Nanbeige4.2-3B-OptiQ-4bit.json --dir ./Nanbeige4.2-3B-OptiQ-4bit $ python3 fw.py verify ./Nanbeige4.2-3B-OptiQ-4bit ./mlx-community__Nanbeige4.2-3B-OptiQ-4bit.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/Nanbeige4.2-3B-OptiQ-4bit --revision e88d49fdd9cd67629c712fc2b4d845ad403ae9b4 --local-dir ./Nanbeige4.2-3B-OptiQ-4bit
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("mlx-community/Nanbeige4.2-3B-OptiQ-4bit", revision="e88d49fdd9cd67629c712fc2b4d845ad403ae9b4") model = AutoModelForCausalLM.from_pretrained("mlx-community/Nanbeige4.2-3B-OptiQ-4bit", revision="e88d49fdd9cd67629c712fc2b4d845ad403ae9b4", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve mlx-community/Nanbeige4.2-3B-OptiQ-4bit --revision e88d49fdd9cd67629c712fc2b4d845ad403ae9b4

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
bcb7c53342adf3c1594de1515fc73c2612c061cfead36b3edf7cb24d2697604e
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: mlx-community <huggingface.co/mlx-community>Newsgroups: alt.freeweights.textSubject: Nanbeige4.2-3B-OptiQ-4bitDate: 2026-11-15Commit: e88d49fSigned: 2DC28CC7B26A283B ✓
Upstream
mlx-community/Nanbeige4.2-3B-OptiQ-4bit
Pinned commit
e88d49fdd9cd67629c712fc2b4d845ad403ae9b4
Manifest
Nanbeige4.2-3B-OptiQ-4bit.json · .minisig
Manifest sha256
83166cd1ccd519d09aeb392f10a3d973c495a7a269be5db779281ea6367f776d
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:16 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/mlx-community/Nanbeige4.2-3B-OptiQ-4bit.json $ curl -O https://freeweights.allternit.com/manifests/mlx-community/Nanbeige4.2-3B-OptiQ-4bit.json.minisig $ minisign -Vm Nanbeige4.2-3B-OptiQ-4bit.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

Nanbeige/Nanbeige4.2-3B · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download mlx-community/Nanbeige4.2-3B-OptiQ-4bit
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. Nanbeige4.2-3B-OptiQ-4bit.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B