Downloads · 30 days
321
9% of all-time downloads
MercuriusDream/Nanbeige4.2-3B-mlx-8bit
Nanbeige4.2-3B-mlx-8bit is a text generation model from MercuriusDream. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
Quantized to 8 bits per weight, group size 64 (4.2 GB, 8.5 effective bpw).
Downloads · 30 days
321
9% of all-time downloads
All-time downloads
3.6K
Public
Parameters
4.2B
4.4 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors4.4 GB · 100%
How the weights are stored.
U324.2B · 100%
From the Hugging Face model README
Quantized to 8 bits per weight, group size 64 (4.2 GB, 8.5 effective bpw).
Converted from Nanbeige/Nanbeige4.2-3B using mlx-lm. Logits of the MLX port match the reference implementation to a max abs difference of 9.5e-05 (fp32, CPU).
Nanbeige4.2-3B is a Looped Transformer: its 22 decoder layers run twice per
forward pass (num_loops=2) with shared weights, giving 4B total parameters
with the capacity of a deeper model.
The nanbeige model type is pending upstream support in mlx-lm
(ml-explore/mlx-lm#1597).
Until that merges, install from the PR branch:
pip install git+https://github.com/MercuriusDream/mlx-lm.git@add-nanbeige-model
mlx_lm.generate --model MercuriusDream/Nanbeige4.2-3B-mlx-8bit --prompt "hello"
from mlx_lm import load, generate
model, tokenizer = load("MercuriusDream/Nanbeige4.2-3B-mlx-8bit")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "hello"}], add_generation_prompt=True
)
print(generate(model, tokenizer, prompt=prompt))