Image-Text-to-Text
Transformers
Safetensors
llava
quantized
compressed-tensors
gptq
w4a16
vllm
ampere
conversational
Instructions to use aleada/Pixtral-12B-W4A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aleada/Pixtral-12B-W4A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="aleada/Pixtral-12B-W4A16") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("aleada/Pixtral-12B-W4A16") model = AutoModelForMultimodalLM.from_pretrained("aleada/Pixtral-12B-W4A16", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aleada/Pixtral-12B-W4A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aleada/Pixtral-12B-W4A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aleada/Pixtral-12B-W4A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/aleada/Pixtral-12B-W4A16
- SGLang
How to use aleada/Pixtral-12B-W4A16 with 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 "aleada/Pixtral-12B-W4A16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aleada/Pixtral-12B-W4A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "aleada/Pixtral-12B-W4A16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aleada/Pixtral-12B-W4A16", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use aleada/Pixtral-12B-W4A16 with Docker Model Runner:
docker model run hf.co/aleada/Pixtral-12B-W4A16
fix(card): substitute repo placeholders + drop vision note for text models
Browse files
README.md
CHANGED
|
@@ -26,11 +26,10 @@ shims; vLLM auto-detects the quantization config from the embedded
|
|
| 26 |
`config.json` at load time.
|
| 27 |
|
| 28 |
This release is part of an ongoing series of vLLM-friendly quantized
|
| 29 |
-
packs maintained by
|
|
|
|
| 30 |
[**Alex Adamopoulos**](https://huggingface.co/aleada) at
|
| 31 |
-
[**assert.gr**](https://assert.gr)
|
| 32 |
-
ecosystem where the most popular base models lack production-ready
|
| 33 |
-
compressed-tensors weights.
|
| 34 |
|
| 35 |
## Reproducibility
|
| 36 |
|
|
@@ -41,12 +40,18 @@ compressed-tensors weights.
|
|
| 41 |
| Quantization recipe | GPTQModifier |
|
| 42 |
| `scheme` | `W4A16` |
|
| 43 |
| `targets` | `Linear` |
|
| 44 |
-
| `ignore` |
|
| 45 |
| `sequential_targets` | — |
|
| 46 |
| Calibration dataset | `lmms-lab/flickr30k` |
|
| 47 |
| Calibration samples | 512 |
|
| 48 |
| `max_seq_length` | 2048 |
|
| 49 |
-
| Quantized size | 8.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
## License
|
| 52 |
|
|
@@ -61,20 +66,36 @@ docker run --runtime=nvidia --gpus all \
|
|
| 61 |
-p 8000:8000 \
|
| 62 |
-e HF_TOKEN=hf_XXX \
|
| 63 |
vllm/vllm-openai:latest \
|
| 64 |
-
--model aleada/
|
|
|
|
|
|
|
| 65 |
--gpu-memory-utilization 0.92 \
|
| 66 |
--enable-prefix-caching
|
| 67 |
```
|
| 68 |
|
| 69 |
-
vLLM auto-detects `compressed-tensors` from the model's
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
## Hardware target
|
| 73 |
|
| 74 |
Requires CUDA compute-capability ≥ 8.0 (Ampere or newer). Verified on
|
| 75 |
**NVIDIA RTX 3090** (compute 8.6) where the W4A16 path runs the
|
| 76 |
language tower at INT4 weights / BF16 activations through vLLM's
|
| 77 |
-
compressed-tensors kernels.
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
## About the maintainer
|
| 80 |
|
|
@@ -82,8 +103,9 @@ Alex Adamopoulos is the founder of [assert.gr](https://assert.gr) and
|
|
| 82 |
the engineer behind the **atlas** self-evolving AI agent platform.
|
| 83 |
Atlas runs a planner→executor→supervisor loop over a skill registry,
|
| 84 |
backed by Postgres, Redis, Qdrant, and a multi-LLM vLLM deployment.
|
| 85 |
-
Quantization releases like this one keep the open-source
|
| 86 |
-
usable on consumer-grade hardware for self-hosted agent
|
|
|
|
| 87 |
|
| 88 |
Connect:
|
| 89 |
|
|
|
|
| 26 |
`config.json` at load time.
|
| 27 |
|
| 28 |
This release is part of an ongoing series of vLLM-friendly quantized
|
| 29 |
+
packs maintained by the [**atlas**](https://github.com/) self-evolving
|
| 30 |
+
agent project, run by
|
| 31 |
[**Alex Adamopoulos**](https://huggingface.co/aleada) at
|
| 32 |
+
[**assert.gr**](https://assert.gr).
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## Reproducibility
|
| 35 |
|
|
|
|
| 40 |
| Quantization recipe | GPTQModifier |
|
| 41 |
| `scheme` | `W4A16` |
|
| 42 |
| `targets` | `Linear` |
|
| 43 |
+
| `ignore` | `re:.*lm_head`, `re:.*vision_tower.*`, `re:.*multi_modal_projector.*` |
|
| 44 |
| `sequential_targets` | — |
|
| 45 |
| Calibration dataset | `lmms-lab/flickr30k` |
|
| 46 |
| Calibration samples | 512 |
|
| 47 |
| `max_seq_length` | 2048 |
|
| 48 |
+
| Quantized size | 8.55 GiB |
|
| 49 |
+
| Quantization time | 0.0 min (dual RTX 3090) |
|
| 50 |
+
|
| 51 |
+
The pipeline that produced this artifact lives at
|
| 52 |
+
[`tools/quantize/`](https://github.com/) in the atlas repository — see
|
| 53 |
+
the README there for the full Docker build + run sequence and the
|
| 54 |
+
per-model env-var recipes.
|
| 55 |
|
| 56 |
## License
|
| 57 |
|
|
|
|
| 66 |
-p 8000:8000 \
|
| 67 |
-e HF_TOKEN=hf_XXX \
|
| 68 |
vllm/vllm-openai:latest \
|
| 69 |
+
--model aleada/Pixtral-12B-W4A16 \
|
| 70 |
+
--max-model-len 8192 \
|
| 71 |
+
--limit-mm-per-prompt 'image=1' \
|
| 72 |
--gpu-memory-utilization 0.92 \
|
| 73 |
--enable-prefix-caching
|
| 74 |
```
|
| 75 |
|
| 76 |
+
vLLM auto-detects `compressed-tensors` from the model's config — no
|
| 77 |
+
`--quantization` flag required (it is accepted as a redundant hint).
|
| 78 |
+
Once vLLM is running, hit it with any OpenAI client:
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
from openai import OpenAI
|
| 82 |
+
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
| 83 |
+
resp = client.chat.completions.create(
|
| 84 |
+
model="aleada/Pixtral-12B-W4A16",
|
| 85 |
+
messages=[{"role": "user", "content": "Hello"}],
|
| 86 |
+
)
|
| 87 |
+
print(resp.choices[0].message.content)
|
| 88 |
+
```
|
| 89 |
|
| 90 |
## Hardware target
|
| 91 |
|
| 92 |
Requires CUDA compute-capability ≥ 8.0 (Ampere or newer). Verified on
|
| 93 |
**NVIDIA RTX 3090** (compute 8.6) where the W4A16 path runs the
|
| 94 |
language tower at INT4 weights / BF16 activations through vLLM's
|
| 95 |
+
compressed-tensors kernels. Vision encoder + multimodal projector
|
| 96 |
+
remain BF16 by design — quantizing them gives negligible memory
|
| 97 |
+
benefit relative to accuracy cost (matches the upstream
|
| 98 |
+
llm-compressor multimodal-vision recommendation).
|
| 99 |
|
| 100 |
## About the maintainer
|
| 101 |
|
|
|
|
| 103 |
the engineer behind the **atlas** self-evolving AI agent platform.
|
| 104 |
Atlas runs a planner→executor→supervisor loop over a skill registry,
|
| 105 |
backed by Postgres, Redis, Qdrant, and a multi-LLM vLLM deployment.
|
| 106 |
+
Quantization releases like this one keep the open-source VLM
|
| 107 |
+
ecosystem usable on consumer-grade hardware for self-hosted agent
|
| 108 |
+
research.
|
| 109 |
|
| 110 |
Connect:
|
| 111 |
|