Run this model with HF Jobs
Run Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4") 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("Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4") model = AutoModelForMultimodalLM.from_pretrained("Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4", 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 Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4", "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/Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4
- SGLang
How to use Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 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 "Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4" \ --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": "Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4", "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 "Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4" \ --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": "Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4", "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 Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4 with Docker Model Runner:
docker model run hf.co/Capicua25x/Qwen3.8-27B-MXFP4-Quark-RDNA4
Add calibrated KV-cache scales (51 F32 scalars, weights unchanged)
Browse filesmodel-kvscales.safetensors: {q,k,v}_scale for the 16 full-attention layers + the MTP draft.
Captured at --kv-cache-dtype auto on Attention.forward (post-norm, post-RoPE) over 1.4M tokens
/ 170,905 calls; scale = amax*1.1/{200,200,100}. Weight shards are byte-identical -- only the
index gains 51 entries. Inert under bf16 KV; active only with --kv-cache-dtype fp8.
Largest amax is 147 vs e4m3's 448, so scale-1.0 was never clipping: this is hygiene, not a
quality fix. Vision tower not calibrated (text-only corpus); no accuracy re-run yet.
Files changed (3)
122 unmodified lines123124125126127128206 unmodified lines335336337338339340122 unmodified linesSampling follows the base model card: thinking `temp 1.0, top_p 0.95, top_k 20, min_p 0`;non-thinking `temp 0.7, top_p 0.8, top_k 20, presence_penalty 1.5`.## What it took to run this on RDNA4These weights are the small half of the work. RDNA4 (gfx1200/gfx1201) is outside the official ROCm206 unmodified lines## Reproducing the quantisationData-free, CPU-only, file-to-file — no calibration set, no GPU, ~3 minutes for this model.```pythonfrom quark.torch.export.api import direct_quantize_checkpoint122 unmodified lines123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174206 unmodified lines381382383384385386387388122 unmodified linesSampling follows the base model card: thinking `temp 1.0, top_p 0.95, top_k 20, min_p 0`;non-thinking `temp 0.7, top_p 0.8, top_k 20, presence_penalty 1.5`.## KV-cache scales (added 2026-08-18)The weight shards are **unchanged**. This repo additionally carries **51 F32 KV-cache scalars** in`model-kvscales.safetensors` (5,708 bytes) plus matching `model.safetensors.index.json` entries —`{q,k,v}_scale` for each of the 16 full-attention layers and for the MTP draft layer.**They do nothing unless you serve with `--kv-cache-dtype fp8`.** Under the default bf16 KV cache —which is every number elsewhere on this card — they load and sit unused. Without them vLLM falls backto `k_scale = v_scale = q_scale = 1.0` and logs `Using KV cache scaling factor 1.0 for fp8_e4m3`:correct bytes, wrong numbers. With them, that line is **absent**, and its absence is the only reliableproof they loaded — `.q_scale/.k_scale/.v_scale` are in vLLM's `_ignore_unexpected_suffixes`, so amis-named scale is dropped silently instead of erroring.**How they were captured.** Served at `--kv-cache-dtype auto` with a recorder on `Attention.forward`taking a running amax of q/k/v *as the cache sees them* — post `q_norm`/`k_norm`, post-RoPE — over**1.4M tokens / 170,905 attention calls**: 354 requests spanning long documents (8k–96k), multi-subjectQA, maths, code, instruction-following and a Spanish business slice, plus production traffic. Bothtensor-parallel ranks recorded, per-layer maximum taken. `scale = amax × 1.1 / {200, 200, 100}` forq/k/v, matching vLLM's `Q/K/V_SCALE_CONSTANT`.| | q | k | v ||---|---|---|---|| range over the 16 attention layers | 11.50 – 19.50 | 12.19 – 23.12 | 8.44 – **147.00** || MTP draft layer | 19.50 | 20.88 | 51.50 |`v` grows monotonically with depth (12.06 at layer 3 → 147.00 at layer 63).**What this is worth — read this before assuming it is an upgrade.** The largest amax anywhere is**147 against e4m3's maximum of 448**, so the uncalibrated cache was never *clipping*. The scales shiftwhere the distribution sits rather than rescue it, and on a float format that is a small effect —consistent with the published finding of ≤0.7 points from an uncalibrated fp8 KV cache on a model ofthis class. Treat this as hygiene that closes a question, not as a quality fix.**Not measured, not covered:*** **No accuracy re-run of the calibrated build** (GSM8K / long-context / task suites). The numbers under*Quality* below are the bf16-KV build and are unaffected by this addition.* **The vision tower is not calibrated** — the capture corpus is text-only.* **No `prob_scale` is shipped.** No v1 ROCm attention backend consumes one, so vLLM's`…and/or prob_scale 1.0 with fp8 attention` warning still fires and can be ignored.* **fp8 KV doubles the attention block on this architecture.** vLLM aligns the attention page to themamba page, so halving the bytes per token pushes the block from 800 to 1600 tokens, which coarsensprefix-cache reuse: only whole blocks are reused. If your requests share a long prefix, pad it to amultiple of the block size — otherwise the remainder is recomputed on every request. Measured here ona 7,299-token prompt: 99 tokens recomputed at block 800 vs 899 at block 1600.## What it took to run this on RDNA4These weights are the small half of the work. RDNA4 (gfx1200/gfx1201) is outside the official ROCm206 unmodified lines## Reproducing the quantisationData-free, CPU-only, file-to-file — no calibration set, no GPU, ~3 minutes for this model.(This describes the **weights**. The KV-cache scalars above are the one calibrated artefact in therepo and came from a separate capture pass on the served model; they do not touch the shards.)```pythonfrom quark.torch.export.api import direct_quantize_checkpoint
123version https://git-lfs.github.com/spec/v1oid sha256:a8e738b76c92943bcccbccf2f204e0d327caff970fabc889a6daee6e01107aaasize 5708