Views
No views yet
mlx-lm._moe_gen siblings. This checkpoint contains only the understanding path weights, re-packaged as a standard Qwen2 LLM so mlx-lm accepts it._moe_gen path (separate quantization, not in this repo)| Repo | Format | Group size | Bits/weight | DWQ refined |
|---|---|---|---|---|
…-MLX-4bit | affine INT4 | 64 | 4.50 | no |
…-MLX-4bit-DWQ | affine INT4 (distilled) | 64 | 4.50 | yes |
…-MLX-NVFP4 | NVFP4 (E2M1) | 16 | 4.50 | no |
1from mlx_lm import load, generate
2
3model, tokenizer = load("Reza2kn/Lance-3B-Video-und-MLX-4bit-DWQ")
4print(generate(
5 model, tokenizer,
6 prompt="What is the capital of France?",
7 max_tokens=64, verbose=True,
8))1mlx_lm.generate --model Reza2kn/Lance-3B-Video-und-MLX-4bit-DWQ \
2 --prompt "Describe Persian cuisine in one paragraph."1# scripts/extract_und_to_qwen.py from https://github.com/Reza2kn/lance-quant
2python extract_und_to_qwen.py \
3 --src downloads/Lance_3B_Video/model.safetensors \
4 --llm_config downloads/Lance_3B_Video/llm_config.json \
5 --tokenizer_src downloads/Lance_3B_Video \
6 --out Lance_3B_Video-und-qwen \
7 --variant und
8
9# Then drop the qk_norm weights (mlx-lm's Qwen2 doesn't have them) and
10# convert to MLX 4-bit
11mlx_lm.convert --hf-path Lance_3B_Video-und-qwen \
12 --mlx-path Lance_3B_Video-und-MLX-4bit \
13 -q --q-bits 4 --q-group-size 64
14
15# Optional: DWQ refinement
16mlx_lm.dwq --model Lance_3B_Video-und-qwen \
17 --quantized-model Lance_3B_Video-und-MLX-4bit \
18 --mlx-path Lance_3B_Video-und-MLX-4bit-DWQ \
19 --bits 4 --group-size 64 --num-samples 256_moe_gen weights which aren't in this checkpoint.qwen2 model class doesn't define them). Small but measurable quality cost vs the original FP32.Reza2kn/Lance-3B-AWQ-INT4Reza2kn/Lance-3B-Video-AWQ-INT4Reza2kn/Lance-3B-NVFP4Reza2kn/Lance-3B-Video-NVFP4