Downloads · 30 days
28
2% of all-time downloads
petergilani/Qwen3-Coder-Next-8bit-g128
Qwen3-Coder-Next-8bit-g128 is a text generation model from petergilani. Use it when you need the model to write or continue text. It is set up for mlx-lm. The card lists the license as apache-2.0.
Quantized Qwen/Qwen3-Coder-Next using mlx-lm to 8-bit with groupsize 128 for main weights and fine-grained groupsize 64 for MoE weights, with the aim of maximum accuracy for 8-bit quantization.
Downloads · 30 days
28
2% of all-time downloads
All-time downloads
1.6K
Public
Parameters
79.7B
82.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors82.2 GB · 100%
How the weights are stored.
U3219.9B · 94%
From the Hugging Face model README
Quantized Qwen/Qwen3-Coder-Next using mlx-lm to 8-bit with group_size 128 for main weights and fine-grained group_size 64 for MoE weights, with the aim of maximum accuracy for 8-bit quantization.
Comprehensive evaluation results from thorough testing using mlx_lm.evaluate with mmlu_pro (200 questions per domain, num_shots=1, temp=1.0, top_p=0.95, top_k=40, seed=123):
| Domain | 8-bit g64 | 8-bit g128 (this model) | Difference |
|---|---|---|---|
| Computer Science | 85.0% | 87.5% | +2.5% |
| Math | 93.0% | 92.5% | -0.5% |
| Physics | 92.0% | 88.5% | -3.5% |
| Engineering | 71.0% | 68.5% | -2.5% |
| Chemistry | 87.5% | 88.5% | +1.0% |
8-bit g64:
8-bit g128 (this model):
| Domain | 3-bit default | 3-bit g128 | 4-bit default | 4-bit g128 | 6-bit default | 6-bit g128 | 8-bit g64 | 8-bit g128 (this model) |
|---|---|---|---|---|---|---|---|---|
| Math | 0.94 | 0.90 | 0.92 | 0.92 | 0.90 | 0.94 | 0.930 | 0.925 |
| Computer Science | 0.82 | 0.84 | 0.80 | 0.84 | 0.82 | 0.86 | 0.850 | 0.875 |
| Engineering | 0.70 | 0.64 | 0.70 | 0.76 | 0.74 | 0.72 | 0.710 | 0.685 |
| Physics | 0.94 | 0.92 | 0.94 | 0.96 | 0.96 | 0.94 | 0.920 | 0.885 |
| Chemistry | 0.86 | 0.88 | 0.90 | 0.90 | 0.94 | 0.92 | 0.875 | 0.885 |
| Average | 0.852 | 0.836 | 0.835 | 0.865 | 0.872 | 0.876 | 0.870 | 0.870 |
Testing with mlx_lm.evaluate using mmlu_pro with 50 Qs for each topic, comparing the 8-bit g128 quant with the 8-bit g64 quant:
| Domain | g64 | g128 | Improvement |
|---|---|---|---|
| Math | 0.92 | 0.94 | +2% |
| Computer Science | 0.84 | 0.90 | +6% |
| Engineering | 0.80 | 0.80 | = |
| Physics | 0.96 | 0.96 | = |
| Chemistry | 0.90 | 0.94 | +4% |
import mlx_lm
from mlx_lm.sample_utils import make_sampler
model_path = "petergilani/qwen3-coder-next-8bit-g128"
model, tokenizer = mlx_lm.load(model_path)
sampler = make_sampler(temp=1.0, top_p=0.95, top_k=40)
prompt = "Write a Python function to calculate the factorial of a number."
response = mlx_lm.generate(
model,
tokenizer,
prompt=prompt,
sampler=sampler,
max_tokens=512
)
print(response)