Instructions to use mattbucci/Qwen3.6-REAM-A3B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mattbucci/Qwen3.6-REAM-A3B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mattbucci/Qwen3.6-REAM-A3B-AWQ") 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("mattbucci/Qwen3.6-REAM-A3B-AWQ") model = AutoModelForMultimodalLM.from_pretrained("mattbucci/Qwen3.6-REAM-A3B-AWQ", 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 mattbucci/Qwen3.6-REAM-A3B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mattbucci/Qwen3.6-REAM-A3B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mattbucci/Qwen3.6-REAM-A3B-AWQ", "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/mattbucci/Qwen3.6-REAM-A3B-AWQ
- SGLang
How to use mattbucci/Qwen3.6-REAM-A3B-AWQ 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 "mattbucci/Qwen3.6-REAM-A3B-AWQ" \ --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": "mattbucci/Qwen3.6-REAM-A3B-AWQ", "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 "mattbucci/Qwen3.6-REAM-A3B-AWQ" \ --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": "mattbucci/Qwen3.6-REAM-A3B-AWQ", "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 mattbucci/Qwen3.6-REAM-A3B-AWQ with Docker Model Runner:
docker model run hf.co/mattbucci/Qwen3.6-REAM-A3B-AWQ
Qwen3.6-REAM-A3B AWQ 4-bit
REAM-pruned and AWQ-quantized variant of Qwen/Qwen3.6-35B-A3B. Built end-to-end from the upstream BF16 base on AMD ROCm hardware.
- Architecture:
Qwen3_5MoeForConditionalGeneration(multimodal MoE + DeltaNet hybrid, 40 layers, 192 experts post-prune, top-8) - Context: 262,144 tokens native
- Quantization: AWQ INT4, group-size 128, symmetric (zero-point packed). Vision tower, DeltaNet projections, MoE router and shared-expert stay BF16/FP16 per the ignore list.
- Format: SGLang
moe_wna16/ Hugging Face AWQ-compatible - Capabilities: thinking, text, vision (image + video) — validated 4/4 (basic + thinking + image + video). See Vision below.
- Recipe: GPTQModifier with 1024 calibration samples mixing
AM-Thinking-v1-Distilled,glaiveai/reasoning-v1-20m, and ultrachat.
Vision (restored 2026-05-28)
Earlier revisions of this repo shipped text-only: the quantization path dropped the vision-tower weights (0 model.visual.* tensors) while the config still declared the multimodal architecture, so image inputs produced NaN logits. This was not a structural REAM limitation — REAM only merges the MoE experts and leaves the vision tower untouched; the tower was simply lost in a text-only build step.
Fix: splice the 333-tensor model.visual.* tower back from the upstream BF16 base into model-vision.safetensors (FP16). The pruned INT4 experts are unchanged. validate_capabilities.py now passes 4/4 — basic, thinking, image, and video.
Build provenance
Built on 2× AMD Radeon AI PRO R9700 (gfx1201, RDNA4):
- Pull upstream
Qwen/Qwen3.6-35B-A3BBF16 weights. - REAM-merge experts (256 → 192) using Samsung SAIL
merge.py(saliency=reap, grouping=ream, merging=logits+weights). - Calibrate with
llmcompressorGPTQModifier, 1024 samples, balanced thinking/text mix. - Convert compressed-tensors output to native AWQ INT4 (group-size 128).
- Splice the vision tower (
model.visual.*) back from the upstream BF16 base asmodel-vision.safetensors(FP16) so the multimodal path works.
A few layer-0 expert scales are flagged low-density by the calibration audit — a benign artifact of the REAM merge in the first transformer block (router top-k routes around them; the tiny merged experts contribute ≈0). This does not affect vision: an earlier hypothesis blaming these scales for the image NaNs was ruled out — the real cause was the missing vision tower, now restored.
Usage
SGLang (recommended on AMD ROCm)
python -m sglang.launch_server \
--model-path mattbucci/Qwen3.6-REAM-A3B-AWQ \
--quantization moe_wna16 \
--dtype bfloat16 \
--context-length 262144 \
--reasoning-parser qwen3 \
--port 23334
Post chat completions with enable_thinking: true for the thinking path; image inputs use the standard OpenAI image_url content type (base64 data URL or URL):
import openai
client = openai.OpenAI(base_url="http://localhost:23334/v1", api_key="x")
resp = client.chat.completions.create(
model="mattbucci/Qwen3.6-REAM-A3B-AWQ",
messages=[{"role": "user", "content": [
{"type": "text", "text": "What's in this image?"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}},
]}],
extra_body={"chat_template_kwargs": {"enable_thinking": True}},
)
vLLM / Transformers
Loads under standard AWQ paths in vLLM (≥0.6) and transformers with auto-awq installed.
Notes
- Single-user 256K decode ≈ 20–21 tok/s on a 2× R9700 (RDNA4) box with SGLang; ≈ 133 tok/s (text/thinking) with the parent
Qwen3.6-35B-A3BDFlash draft via speculative decode. - For NVIDIA Ampere or Apple Silicon cross-validation, see the sister-team READMEs linked from the project repo.
- Downloads last month
- 252
Model tree for mattbucci/Qwen3.6-REAM-A3B-AWQ
Base model
Qwen/Qwen3.6-35B-A3B