CoolFace
Modelpublic

petergilani/Qwen3-Coder-Next-8bit-g128

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
1likes29downloads
Model Card

Model Card for Qwen3-Coder-Next-8bit-g128

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.

Updated Evaluation Results (February 13, 2026)

Comprehensive evaluation results from thorough testing using mlxlm.evaluate with mmlupro (200 questions per domain, numshots=1, temp=1.0, topp=0.95, top_k=40, seed=123):

Direct Comparison Summary (8-bit g64 vs g128)

Domain8-bit g648-bit g128 (this model)Difference
Computer Science85.0%87.5%+2.5%
Math93.0%92.5%-0.5%
Physics92.0%88.5%-3.5%
Engineering71.0%68.5%-2.5%
Chemistry87.5%88.5%+1.0%

Average Performance

  • —8-bit g64: 87.0% average
  • —8-bit g128 (this model): 87.0% average
  • —Difference: 0.0 percentage points (virtually identical)

Key Observations

  • —Both 8-bit models show nearly identical average performance (87.0%)
  • —Performance differences are domain-specific rather than model-specific
  • —8-bit g64 performs better in Math, Engineering, and Physics
  • —8-bit g128 (this model) performs better in Computer Science and Chemistry, with Computer Science being the most significant improvement (+2.5%)

Memory Usage Comparison

  • —8-bit g64:
  • —Peak memory usage: 95.374 GB (Math) to 100.740 GB (Engineering)
  • —Average memory usage: ~98.6 GB
  • —8-bit g128 (this model):
  • —Peak memory usage: 97.702 GB (Computer Science) to 98.510 GB (Engineering)
  • —Average memory usage: ~97.8 GB

Full Quantization Spectrum Comparison (Updated)

Domain3-bit default3-bit g1284-bit default4-bit g1286-bit default6-bit g1288-bit g648-bit g128 (this model)
Math0.940.900.920.920.900.940.9300.925
Computer Science0.820.840.800.840.820.860.8500.875
Engineering0.700.640.700.760.740.720.7100.685
Physics0.940.920.940.960.960.940.9200.885
Chemistry0.860.880.900.900.940.920.8750.885
Average0.8520.8360.8350.8650.8720.8760.8700.870

Original Evaluation Results

Testing with mlxlm.evaluate using mmlupro with 50 Qs for each topic, comparing the 8-bit g128 quant with the 8-bit g64 quant:

Domaing64g128Improvement
Math0.920.94+2%
Computer Science0.840.90+6%
Engineering0.800.80=
Physics0.960.96=
Chemistry0.900.94+4%

Average Performance

  • —8-bit g64: 84.4% average
  • —8-bit g128: 88.0% average
  • —Improvement: +3.6 percentage points with group size 128 (main weights) with fine-grained 64 (MoE weights)

Key Benefits

  • —The g128 group_size applied to main weights (with fine-grained g64 for MoE weights) is also ~2GB smaller than the g64 version
  • —At the time of uploading, there were not any 8bit g128 quants of this model available on HF
  • —Also tried MXFP8 but found equal or lower accuracy than g64 for all topics (Engineering dropped to 0.76 and Chemistry dropped to 0.88 (-4% and -2% compared to g64))

Model Details

  • —Base Model: Qwen/Qwen3-Coder-Next
  • —Library: mlx-lm
  • —Quantization: 8-bit with groupsize 128 for main weights and groupsize 64 for MoE weights
  • —License: apache-2.0
  • —Pipeline Tag: text-generation

Usage

python
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)