Run this model with HF Jobs

Run QuantLLM/Llama-3.2-3B-2bit-mlx on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/QuantLLM/Llama-3.2-3B-2bit-mlx. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/QuantLLM/Llama-3.2-3B-2bit-mlx on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/QuantLLM/Llama-3.2-3B-2bit-mlx. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
How to use from
SGLang
Install from pip and serve model
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
    --model-path "QuantLLM/Llama-3.2-3B-2bit-mlx" \
    --host 0.0.0.0 \
    --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "QuantLLM/Llama-3.2-3B-2bit-mlx",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Use Docker images
docker run --gpus all \
    --shm-size 32g \
    -p 30000:30000 \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    --env "HF_TOKEN=<secret>" \
    --ipc=host \
    lmsysorg/sglang:latest \
    python3 -m sglang.launch_server \
        --model-path "QuantLLM/Llama-3.2-3B-2bit-mlx" \
        --host 0.0.0.0 \
        --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "QuantLLM/Llama-3.2-3B-2bit-mlx",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Llama-3.2-3B-2bit-mlx

Format Quantization QuantLLM

Description

This is meta-llama/Llama-3.2-3B converted to MLX format optimized for Apple Silicon (M1/M2/M3) Macs.

Usage

Generate text with mlx-lm

from mlx_lm import load, generate

model, tokenizer = load("QuantLLM/Llama-3.2-3B-2bit-mlx")

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)

With streaming

from mlx_lm import load, stream_generate

model, tokenizer = load("QuantLLM/Llama-3.2-3B-2bit-mlx")

prompt = "Explain quantum computing"
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True
)

for token in stream_generate(model, tokenizer, prompt=prompt, max_tokens=500):
    print(token, end="", flush=True)

Command Line

# Install mlx-lm
pip install mlx-lm

# Generate text
python -m mlx_lm.generate --model QuantLLM/Llama-3.2-3B-2bit-mlx --prompt "Hello!"

# Chat mode
python -m mlx_lm.chat --model QuantLLM/Llama-3.2-3B-2bit-mlx

Requirements

  • Apple Silicon Mac (M1/M2/M3/M4)
  • macOS 13.0 or later
  • Python 3.10+
  • mlx-lm: pip install mlx-lm

Model Details

Property Value
Base Model meta-llama/Llama-3.2-3B
Format MLX
Quantization Q2_K
License apache-2.0
Created 2025-12-20

About QuantLLM

This model was converted using QuantLLM - the ultra-fast LLM quantization and export library.

from quantllm import turbo

# Load and quantize any model
model = turbo("meta-llama/Llama-3.2-3B")

# Export to any format
model.export("mlx", quantization="Q2_K")

⭐ Star us on GitHub!

Downloads last month
14
Safetensors
Model size
3B params
Tensor type
F32
·
F16
·
U8
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for QuantLLM/Llama-3.2-3B-2bit-mlx

Quantized
(167)
this model