Instructions to use amd/tiny-qwen3-moe-w8a8-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amd/tiny-qwen3-moe-w8a8-int8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amd/tiny-qwen3-moe-w8a8-int8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amd/tiny-qwen3-moe-w8a8-int8") model = AutoModelForCausalLM.from_pretrained("amd/tiny-qwen3-moe-w8a8-int8", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amd/tiny-qwen3-moe-w8a8-int8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amd/tiny-qwen3-moe-w8a8-int8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/tiny-qwen3-moe-w8a8-int8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amd/tiny-qwen3-moe-w8a8-int8
- SGLang
How to use amd/tiny-qwen3-moe-w8a8-int8 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 "amd/tiny-qwen3-moe-w8a8-int8" \ --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": "amd/tiny-qwen3-moe-w8a8-int8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "amd/tiny-qwen3-moe-w8a8-int8" \ --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": "amd/tiny-qwen3-moe-w8a8-int8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amd/tiny-qwen3-moe-w8a8-int8 with Docker Model Runner:
docker model run hf.co/amd/tiny-qwen3-moe-w8a8-int8
| library_name: transformers | |
| license: apache-2.0 | |
| pipeline_tag: text-generation | |
| tags: [vllm_ci] | |
| # Model Overview | |
| - **Model Architecture:** Qwen3MoeForCausalLM (tiny, randomly initialized) | |
| - **Input:** Text | |
| - **Output:** Text | |
| - **Supported Hardware Microarchitecture:** AMD MI300 / MI350 / MI355 (gfx942 / gfx950), NVIDIA (SM ≥ 7.5) | |
| - **Inference Engine:** [vLLM](https://docs.vllm.ai/en/latest/) | |
| - **Model Optimizer:** [AMD-Quark](https://quark.docs.amd.com/latest/index.html) | |
| - **Weight quantization:** INT8, per-channel, static, symmetric | |
| - **Activation quantization:** INT8, per-token, dynamic, symmetric | |
| - **Quantized layers:** attention (`self_attn`) and the routed MoE experts. | |
| The MoE router (`mlp.gate`) and `lm_head` are kept in the original precision. | |
| This is a **tiny, randomly-initialized** Qwen3-MoE model quantized to W8A8-INT8, | |
| used purely as **vLLM CI coverage** for the Quark INT8 fused-MoE path | |
| (`QuarkW8A8Int8MoEMethod`), which dispatches through the modular Triton INT8 MoE | |
| kernel. It is not intended to produce meaningful text. | |
| > Note: the router (`mlp.gate`) is intentionally left in bf16. Its weight is | |
| > `[num_experts, hidden]` and `num_experts` (8) is not a multiple of 16, which | |
| > would trip AITER's INT8 linear-kernel shape assertion. Routers are normally | |
| > left in high precision anyway. | |
| # Model Creation | |
| Built and quantized with [AMD-Quark](https://quark.docs.amd.com/latest/index.html): | |
| per-channel INT8 weights (static) + per-token INT8 activations (dynamic), | |
| symmetric, on a tiny `qwen3_moe` model. Attention and routed experts are | |
| quantized; `mlp.gate` and `lm_head` are excluded. `vocab_size` matches the | |
| tokenizer so token ids stay within the embedding table. | |
| # Usage in vLLM | |
| ```bash | |
| vllm serve amd/tiny-qwen3-moe-w8a8-int8 --enforce-eager | |
| ``` | |
| Because the weights are random, outputs are not meaningful — this model is a | |
| structural / smoke-test fixture only. | |
| # License | |
| Apache-2.0. The tiny model is randomly initialized and derives no weights from | |
| any base model. | |
| Modifications Copyright(c) 2026 Advanced Micro Devices, Inc. All rights reserved. | |