Text Generation
MLX
Safetensors
qwen2
turboquant
apple-silicon
quantized
conversational
4-bit precision
Instructions to use ekovshilovsky/Qwen2.5-32B-TQ8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ekovshilovsky/Qwen2.5-32B-TQ8 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ekovshilovsky/Qwen2.5-32B-TQ8") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use ekovshilovsky/Qwen2.5-32B-TQ8 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ekovshilovsky/Qwen2.5-32B-TQ8"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ekovshilovsky/Qwen2.5-32B-TQ8" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ekovshilovsky/Qwen2.5-32B-TQ8 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ekovshilovsky/Qwen2.5-32B-TQ8"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ekovshilovsky/Qwen2.5-32B-TQ8
Run Hermes
hermes
- MLX LM
How to use ekovshilovsky/Qwen2.5-32B-TQ8 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ekovshilovsky/Qwen2.5-32B-TQ8"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ekovshilovsky/Qwen2.5-32B-TQ8" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ekovshilovsky/Qwen2.5-32B-TQ8", "messages": [ {"role": "user", "content": "Hello"} ] }'
Qwen2.5-32B-TQ8
TurboQuant-compressed version of Qwen/Qwen2.5-32B for near-lossless inference on Apple Silicon.
Compressed with turboquant-mlx-core using the TurboQuant algorithm (Zandieh et al., ICLR 2026).
Quality
| Metric | Value |
|---|---|
| fp16 PPL | 1.41 |
| TQ8 PPL | 1.42 |
| PPL delta | 0.09% |
| Compression | 56% of original size |
Quantization Config
| Property | Value |
|---|---|
| Method | TurboQuant 4+4 residual (8 effective bits) |
| Rotation | Dual Walsh-Hadamard (per-pass seeds) |
| Codebooks | Per-layer Lloyd-Max fitted |
| Sensitive layers | First/last 4 at fp16 |
| Block size | Adaptive (largest power-of-2 dividing in_features) |
Usage
# Serve via SwiftLM (dequants to BF16 on first load, cached for subsequent runs)
SwiftLM --model ekovshilovsky/Qwen2.5-32B-TQ8 --port 5413
# Dequant to fp16 for use with any MLX/HuggingFace loader
tq-dequant ./Qwen2.5-32B-TQ8 ./Qwen2.5-32B-fp16
Hardware Requirements
- Apple Silicon Mac (M1 Pro+ recommended)
- 64 GB unified memory minimum (34 GB model + KV cache + overhead)
- macOS 14+
Original Model
This is a quantized version of Qwen/Qwen2.5-32B by Alibaba Cloud. The original model is released under the Apache 2.0 License. All original model terms and conditions apply.
Quantization
Quantization performed by Eugene Kovshilovsky using turboquant-mlx-core (MIT License).
- Downloads last month
- 72
Model size
58B params
Tensor type
F32
路
U8 路
U32 路
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for ekovshilovsky/Qwen2.5-32B-TQ8
Base model
Qwen/Qwen2.5-32B