MLX quants
Collection
49 items • Updated
How to use Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# if on a CUDA device, also pip install mlx[cuda]
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit")
prompt = "Once upon a time in"
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit" --prompt "Once upon a time"
ai-sage/GigaChat4-37B-A4B-base converted to MLX for mlx-lm, with the MTP layer left out.
pip install mlx==0.32.5 mlx-lm==0.32.2 transformers==5.24.1
curl -q -fL "https://huggingface.co/Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit/resolve/main/gigachat4.py" -o "$(python -c 'from pathlib import Path; import mlx_lm.models as m; print(Path(m.__file__).parent)')/gigachat4.py"
mlx_lm.generate --model Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit --trust-remote-code --ignore-chat-template --prompt 'The capital of Australia is'
| Quant | Size | WikiText-2 KL | top-1 | Held-out KL | top-1 | Completion answers |
|---|---|---|---|---|---|---|
| BF16 | 76.58 GB | 4/7 | ||||
| MLX 8-bit | 39.84 GB | 0.002143 | 98.17% | 0.002689 | 97.37% | 4/7 |
| MLX 4-bit | 22.29 GB | 0.019022 | 94.60% | 0.017665 | 94.22% | 4/7 |
| Hardware | Memory | File | Context |
|---|---|---|---|
| Mac Studio M5 Max | 36 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit |
128K |
| Mac Studio M5 Max | 48 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-4bit |
512K |
| Mac Studio M5 Max | 64 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-8bit |
256K |
| Mac Studio M5 Ultra | 96 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-8bit |
1M |
| Mac Studio M5 Max | 128 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-8bit |
1M |
| Mac Studio M5 Ultra | 256 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-8bit |
1M |
| Mac Studio M5 Ultra | 512 GB unified | Xylolabs/GigaChat4-37B-A4B-base-MLX-8bit |
1M |
Noncommercial License for individuals 1.0 (LICENSE.txt), the source model's license; our quantized files are offered under the same terms. Converted to MLX and quantized by Xylolabs. Copyright (c) 2026 Giga.
4-bit
Base model
ai-sage/GigaChat4-37B-A4B-base