Image-Text-to-Text
Transformers
Safetensors
English
multilingual
qwen3_5
gptq
int4
w4a16
4-bit precision
quantized
vllm
intel-xpu
arc-pro-b70
mtp
speculative-decoding
gated-deltanet
tool-calling
conversational
Instructions to use bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16") 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("bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16") model = AutoModelForMultimodalLM.from_pretrained("bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16", 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 bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16", "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/bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16
- SGLang
How to use bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16 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 "bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16" \ --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": "bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16", "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 "bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16" \ --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": "bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16", "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 bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16 with Docker Model Runner:
docker model run hf.co/bjonor/Swift-Qwen3.8-27B-GPTQ-Int4-sym-G128-MTP-BF16
Model card: surface SergiioB cookbook link (code row + patch notes)
Browse files
README.md
CHANGED
|
@@ -55,7 +55,7 @@ models below continue to apply (see [License](#license-and-attribution)).
|
|
| 55 |
| Source revision | `048328f4059015b63f860a453bf94834af0db683` |
|
| 56 |
| Calibration | `HuggingFaceH4/ultrachat_200k` `train_sft[:256]`, truncated to 2048 tokens |
|
| 57 |
| Calibration revision | `8049631c405ae6576f93f445c6b8166f76f5505a` |
|
| 58 |
-
| Code | quantization, verification and Intel-XPU serving recipe: [BjornNordblom/intel-arc-b70-quant](https://github.com/BjornNordblom/intel-arc-b70-quant) |
|
| 59 |
|
| 60 |
The `quantize_config.json` is field-for-field identical to the community
|
| 61 |
reference artifact
|
|
@@ -113,7 +113,9 @@ Notes for this base model on XPU:
|
|
| 113 |
|
| 114 |
- **MTP draft must be built unquantized.** The checkpoint flags this via the
|
| 115 |
`dynamic` exclusion, but the XPU build tested here also needs the draft layer
|
| 116 |
-
built without `quant_config` (
|
|
|
|
|
|
|
| 117 |
repo](https://github.com/BjornNordblom/intel-arc-b70-quant):
|
| 118 |
`B70_MTP_BF16_DRAFT=1` gate plus a small metadata patch for the
|
| 119 |
max-model-length boundary).
|
|
|
|
| 55 |
| Source revision | `048328f4059015b63f860a453bf94834af0db683` |
|
| 56 |
| Calibration | `HuggingFaceH4/ultrachat_200k` `train_sft[:256]`, truncated to 2048 tokens |
|
| 57 |
| Calibration revision | `8049631c405ae6576f93f445c6b8166f76f5505a` |
|
| 58 |
+
| Code | quantization, verification and Intel-XPU serving recipe: [BjornNordblom/intel-arc-b70-quant](https://github.com/BjornNordblom/intel-arc-b70-quant); serving patches from [SergiioB/intel-arc-pro-b70-inference-cookbook](https://github.com/SergiioB/intel-arc-pro-b70-inference-cookbook) |
|
| 59 |
|
| 60 |
The `quantize_config.json` is field-for-field identical to the community
|
| 61 |
reference artifact
|
|
|
|
| 113 |
|
| 114 |
- **MTP draft must be built unquantized.** The checkpoint flags this via the
|
| 115 |
`dynamic` exclusion, but the XPU build tested here also needs the draft layer
|
| 116 |
+
built without `quant_config` (patch from [SergiioB's Intel Arc Pro B70
|
| 117 |
+
cookbook](https://github.com/SergiioB/intel-arc-pro-b70-inference-cookbook),
|
| 118 |
+
vendored in [the recipe
|
| 119 |
repo](https://github.com/BjornNordblom/intel-arc-b70-quant):
|
| 120 |
`B70_MTP_BF16_DRAFT=1` gate plus a small metadata patch for the
|
| 121 |
max-model-length boundary).
|