Instructions to use tcclaviger/Qwen3.8-27B-RFI8-AA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tcclaviger/Qwen3.8-27B-RFI8-AA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tcclaviger/Qwen3.8-27B-RFI8-AA") 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("tcclaviger/Qwen3.8-27B-RFI8-AA") model = AutoModelForMultimodalLM.from_pretrained("tcclaviger/Qwen3.8-27B-RFI8-AA", 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 tcclaviger/Qwen3.8-27B-RFI8-AA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tcclaviger/Qwen3.8-27B-RFI8-AA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tcclaviger/Qwen3.8-27B-RFI8-AA", "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/tcclaviger/Qwen3.8-27B-RFI8-AA
- SGLang
How to use tcclaviger/Qwen3.8-27B-RFI8-AA 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 "tcclaviger/Qwen3.8-27B-RFI8-AA" \ --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": "tcclaviger/Qwen3.8-27B-RFI8-AA", "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 "tcclaviger/Qwen3.8-27B-RFI8-AA" \ --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": "tcclaviger/Qwen3.8-27B-RFI8-AA", "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 tcclaviger/Qwen3.8-27B-RFI8-AA with Docker Model Runner:
docker model run hf.co/tcclaviger/Qwen3.8-27B-RFI8-AA
README: full PPL matrix (A8/A16 x fp8/bf16 KV), styling, prose cleanup
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ license: apache-2.0
|
|
| 4 |
pipeline_tag: image-text-to-text
|
| 5 |
---
|
| 6 |
|
| 7 |
-
<div style="background:
|
| 8 |
|
| 9 |
## RFI8 Activation-Aware Quant — read this first
|
| 10 |
|
|
@@ -12,7 +12,7 @@ This is an **RFI8 activation-aware quantization** of Qwen3.8-27B (8-bit weights,
|
|
| 12 |
Hadamard-32 rotation, group-32 block-float scales).
|
| 13 |
|
| 14 |
This checkpoint includes **calibrated KV-cache scales for both the main model and
|
| 15 |
-
the MTP speculative-decoding draft model**. Serving with
|
| 16 |
is nearly lossless for quality, and brings long-context speed uplifts and KV
|
| 17 |
cache space savings (roughly double the context in the same VRAM).
|
| 18 |
|
|
@@ -30,24 +30,22 @@ falls back to Triton reference kernels and runs substantially slower.
|
|
| 30 |
| checkpoint | PPL |
|
| 31 |
|---|---|
|
| 32 |
| BF16 original | 6.9224 |
|
| 33 |
-
|
|
| 34 |
-
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
fp8 KV quantization (with this checkpoint's calibrated scales) on the
|
| 40 |
-
full-attention layers. This is the as-shipped serving configuration, not an
|
| 41 |
-
idealized one. (bf16-KV numbers for A8 and A16, isolating pure weight/activation
|
| 42 |
-
error, coming soon.)
|
| 43 |
|
| 44 |
### W8A8 vs W8A16
|
| 45 |
|
| 46 |
The checkpoint ships in **W8A8** mode (int8 activations). A8 vs A16 is a
|
| 47 |
quality/throughput tradeoff: **W8A16 (fp16 activations) is nearly
|
| 48 |
indistinguishable from the BF16 checkpoint** in quality, at lower throughput
|
| 49 |
-
than A8. To switch to W8A16, edit
|
| 50 |
-
from
|
| 51 |
|
| 52 |
```json
|
| 53 |
"quantization_config": {
|
|
@@ -61,8 +59,8 @@ from `int8` to `fp16`:
|
|
| 61 |
}
|
| 62 |
```
|
| 63 |
|
| 64 |
-
(That is the single
|
| 65 |
-
|
| 66 |
|
| 67 |
</div>
|
| 68 |
|
|
|
|
| 4 |
pipeline_tag: image-text-to-text
|
| 5 |
---
|
| 6 |
|
| 7 |
+
<div style="background: rgba(45, 10, 70, 0.5); border: 2px solid #4a148c; border-radius: 12px; padding: 20px; margin-bottom: 24px;">
|
| 8 |
|
| 9 |
## RFI8 Activation-Aware Quant — read this first
|
| 10 |
|
|
|
|
| 12 |
Hadamard-32 rotation, group-32 block-float scales).
|
| 13 |
|
| 14 |
This checkpoint includes **calibrated KV-cache scales for both the main model and
|
| 15 |
+
the MTP speculative-decoding draft model**. Serving with --kv-cache-dtype fp8
|
| 16 |
is nearly lossless for quality, and brings long-context speed uplifts and KV
|
| 17 |
cache space savings (roughly double the context in the same VRAM).
|
| 18 |
|
|
|
|
| 30 |
| checkpoint | PPL |
|
| 31 |
|---|---|
|
| 32 |
| BF16 original | 6.9224 |
|
| 33 |
+
| this quant, W8A16, bf16 KV cache | 6.8978 |
|
| 34 |
+
| this quant, W8A8, bf16 KV cache | 6.9034 |
|
| 35 |
+
| this quant, W8A16, fp8 KV cache | 6.9369 |
|
| 36 |
+
| **this quant, W8A8, fp8 KV cache (as shipped)** | **6.9392** |
|
| 37 |
|
| 38 |
+
The fp8 KV rows include the KV-cache quantization, not just weight/activation
|
| 39 |
+
error. All rows measured on the served model; the PPL tool is included in the
|
| 40 |
+
docker image.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
### W8A8 vs W8A16
|
| 43 |
|
| 44 |
The checkpoint ships in **W8A8** mode (int8 activations). A8 vs A16 is a
|
| 45 |
quality/throughput tradeoff: **W8A16 (fp16 activations) is nearly
|
| 46 |
indistinguishable from the BF16 checkpoint** in quality, at lower throughput
|
| 47 |
+
than A8. To switch to W8A16, edit config.json and change the activation dtype
|
| 48 |
+
from int8 to fp16:
|
| 49 |
|
| 50 |
```json
|
| 51 |
"quantization_config": {
|
|
|
|
| 59 |
}
|
| 60 |
```
|
| 61 |
|
| 62 |
+
(That is the single "act_dtype": "int8" value under
|
| 63 |
+
quantization_config.config_groups.group_0.weights — nothing else changes.)
|
| 64 |
|
| 65 |
</div>
|
| 66 |
|