Downloads · 30 days
0
0% of all-time downloads
mlx-community/DeepSeek-R1-Distill-Qwen-32B-MLX
DeepSeek-R1-Distill-Qwen-32B-MLX is a text generation model from mlx-community. Use it when you need the model to write or continue text. It is set up for mlx.
This Model mlx-community/DeepSeek-R1-Distill-Qwen-32B contains multiple quantized variants of the base model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B. The model was converted to MLX format using mlx-lm version 0.21.5.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
22
Public
Repo size
424 GB
Likes
3
Public
Click a slice to open those files.
.safetensors308 GB · 100%
From the Hugging Face model README
This Model mlx-community/DeepSeek-R1-Distill-Qwen-32B contains multiple quantized variants of the base model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B. The model was converted to MLX format using mlx-lm version 0.21.5.
The conversion process applied different quantization strategies to produce variants that offer trade-offs between memory footprint, inference speed, and accuracy. In addition to the default 4-bit conversion, you will find both uniform and mixed quantized files at various bit widths (2-bit, 3-bit, 6-bit, and 8-bit). This multi-quantized approach allows users to select the best variant for their deployment scenario, balancing precision and performance.
The model conversion uses a range of quantization configurations defined via mlx_lm.convert. These configurations fall into three main categories:
Uniform Quantization: Applies the same bit width to all layers.
Mixed Quantization: Uses a custom predicate function to decide the bit width for each layer—allowing different layers to use different precisions.
mixed_2_6 predicate to choose between 2-bit and 6-bit quantization.mixed_3_6 predicate to choose between 3-bit and 6-bit quantization.mixed_quant_predicate_builder(3, 4, group_size), it mixes 3-bit and 4-bit precision.mixed_quant_predicate_builder(4, 6, group_size), it mixes 4-bit and 6-bit precision.mixed_quant_predicate_builder(4, 8, group_size), it mixes 4-bit and 8-bit precision.Where group_size = 64 (which is default for other quantization methods).
Non-Quantized Conversions: Converts the model to a different floating point precision without quantizing weights.
Install the MLX library:
pip install mlx-lm
Load the model and generate text:
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/DeepSeek-R1-Distill-Qwen-32B-MLX")
prompt = "hello"
if tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
Each configuration is optimized to meet specific requirements, enabling a forward-thinking approach in model deployment where resource constraints and performance targets are key considerations.