Instructions to use amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="amd/Qwen3.8-27B-Quark-Qronos-INT4-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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16") model = AutoModelForMultimodalLM.from_pretrained("amd/Qwen3.8-27B-Quark-Qronos-INT4-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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amd/Qwen3.8-27B-Quark-Qronos-INT4-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": "amd/Qwen3.8-27B-Quark-Qronos-INT4-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/amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16
- SGLang
How to use amd/Qwen3.8-27B-Quark-Qronos-INT4-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 "amd/Qwen3.8-27B-Quark-Qronos-INT4-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": "amd/Qwen3.8-27B-Quark-Qronos-INT4-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 "amd/Qwen3.8-27B-Quark-Qronos-INT4-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": "amd/Qwen3.8-27B-Quark-Qronos-INT4-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 amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16 with Docker Model Runner:
docker model run hf.co/amd/Qwen3.8-27B-Quark-Qronos-INT4-W4A16
vllm quark does not support the scheme.
As I checked the quark.py, int4-w4a16 is not supported, and the following not implemented error was thrown.
(EngineCore pid=224) File "/workspace/vllm/model_executor/models/qwen3_5.py", line 144, in init
(EngineCore pid=224) self.linear_attn = QwenGatedDeltaNetAttention(
(EngineCore pid=224) ^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py", line 406, in init
(EngineCore pid=224) self.in_proj_qkvz = self.create_qkvz_proj(
(EngineCore pid=224) ^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py", line 511, in create_qkvz_proj
(EngineCore pid=224) return MergedColumnParallelLinear(
(EngineCore pid=224) ^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/linear.py", line 684, in init
(EngineCore pid=224) super().init(
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/linear.py", line 469, in init
(EngineCore pid=224) super().init(
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/linear.py", line 260, in init
(EngineCore pid=224) elif quant_method := quant_config.get_quant_method(self, prefix=prefix):
(EngineCore pid=224) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/quantization/quark/quark.py", line 188, in get_quant_method
(EngineCore pid=224) scheme = self.get_scheme(layer=layer, layer_name=prefix)
(EngineCore pid=224) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/quantization/quark/quark.py", line 716, in get_scheme
(EngineCore pid=224) scheme = self._get_scheme_from_config(
(EngineCore pid=224) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(EngineCore pid=224) File "/workspace/vllm/model_executor/layers/quantization/quark/quark.py", line 704, in _get_scheme_from_config
(EngineCore pid=224) raise NotImplementedError(
(EngineCore pid=224) NotImplementedError: No quark compatible scheme was found. Weight config: {'block_size': None, 'ch_axis': -1, 'dtype': 'int4', 'enable_buffer_reuse': False, 'group_size': 128, 'is_dynamic': False, 'is_scale_quant': False, 'max_input_numel': 4194304, 'mx_element_dtype': None, 'observer_cls': 'PerGroupMinMaxObserver', 'qscheme': 'per_group', 'round_method': 'half_even', 'scale_calculation_mode': None, 'scale_format': None, 'scale_type': 'float', 'symmetric': True}, Input config: None