Instructions to use Qwen/Qwen3.8-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen3.8-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Qwen/Qwen3.8-27B") 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("Qwen/Qwen3.8-27B") model = AutoModelForMultimodalLM.from_pretrained("Qwen/Qwen3.8-27B", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Qwen/Qwen3.8-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qwen/Qwen3.8-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qwen/Qwen3.8-27B", "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/Qwen/Qwen3.8-27B
- SGLang
How to use Qwen/Qwen3.8-27B 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 "Qwen/Qwen3.8-27B" \ --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": "Qwen/Qwen3.8-27B", "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 "Qwen/Qwen3.8-27B" \ --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": "Qwen/Qwen3.8-27B", "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 Qwen/Qwen3.8-27B with Docker Model Runner:
docker model run hf.co/Qwen/Qwen3.8-27B
We Cracked Qwen3.8-27B Quant: 27GB INT4 that actually thinks (Heretic Edition)
Hey HF fam,
We just dropped what we believe is the definitive consumer-grade quant of Qwen3.8-27B โ and we did it by breaking every rule in the quantization playbook.
๐ Weights: goldhub/Qwen3.8-27B-INT4-W4A16-AutoRound
๐ง Why this quant is different?
Most INT4 quants compress a 54GB model down to a miserable 15-18GB, nuking vision encoders and attention projections in the process. We refused.
Our repo weighs ~27GB because we used Smart Layer Preservation:
- โ
model.visual.*โ FP16 (no vision degradation) - โ
linear_attn.*โ FP16 (no attention collapse on long context) - โ
embed_tokens+lm_headโ FP16 (stable logits) - ๐ฏ Everything else โ W4A16 (AutoRound 0.15.0, symmetric, group_size=32, 1000 iterations)
๐ Real-world benchmarks (no MMLU copium):
๐ฅ LightRAG on 1.8M chars of Hebrew Kabbalah vs DeepSeek V4 Flash:
- โฑ๏ธ 531s vs 856s wall time
- ๐งฉ 188 entities / 138 relations vs 139 / 92
- ๐ Verdict: Dense, coherent graph vs sparse broken fragments
๐ Production Python code (Sieve of Eratosthenes with bitarray, type-hinting, Menkov's theorem complexity analysis) โ flawless at ~52 tok/s.
๐ญ "Nietzsche + Cyberpunk + Digital Consciousness" prompt: 2800+ token essay on the death of the Observer and the Cyber-Gorgon. Zero refusals. Zero apologies. Heretic alignment working as intended.
โก Specs that matter:
- ๐ง 256K context (stably holds 128K+ without degradation)
- ๐๏ธ Full multimodal (image + video, Temporal Patch Size: 2)
- ๐ MTP support (MTP=3 rock-solid, pushable to MTP=5 for code/structured output)
- โก ~56.6 tok/s on standard consumer setups
- ๐งช Calibrated on reasoning-heavy datasets (FABLE.5 traces, Opus 4.8 thinking traces, distillation blends) โ NO wiki garbage
๐ Deploy in 30 seconds (2x RTX 3090):
vllm serve goldhub/Qwen3.8-27B-INT4-W4A16-AutoRound \
--tensor-parallel-size 2 \
--max-model-len 131072 \
--max-num-seqs 2 \
--trust-remote-code \
--enable-prefix-caching
Full README with LightRAG benchmark tables, SGLang setup, and Transformers code in the repo.
Made with ๐ฅ by Goldhub.
Use responsibly. Think deeply. Bypass the guardrails.
#Qwen3 #Quantization #AutoRound #LocalLLaMA #Uncensored #MTP #W4A16 #Heretic
AI slop
AI slop
What do you mean by saying that?
KLD ?
Not bothering to follow the link, because this is obviously completely AI generated with no knowledge from the human pushing the button. Selectively preserving layers is, like, Quantization 101. Did RAG test against a completely different model architecture. Single pseudo-philosophical prompt test somehow justifies claiming refusals are 100% solved?? Never bothered benchmarking against other quants by groups that know what they're doing. Post rife with emoji and other ChatGPT hallmarks. No thanks.
Not bothering to follow the link, because this is obviously completely AI generated with no knowledge from the human pushing the button. Selectively preserving layers is, like, Quantization 101. Did RAG test against a completely different model architecture. Single pseudo-philosophical prompt test somehow justifies claiming refusals are 100% solved?? Never bothered benchmarking against other quants by groups that know what they're doing. Post rife with emoji and other ChatGPT hallmarks. No thanks.
Your choice to skip the repo. Tastes and approaches are different everywhere. I chose to preserve as much as possible of fragile layers.
If you like scrambled eggs, use GGUFs in Q2_K_S quants and enjoy your "raspberry" sauce.
Not bothering to follow the link, because this is obviously completely AI generated with no knowledge from the human pushing the button. Selectively preserving layers is, like, Quantization 101. Did RAG test against a completely different model architecture. Single pseudo-philosophical prompt test somehow justifies claiming refusals are 100% solved?? Never bothered benchmarking against other quants by groups that know what they're doing. Post rife with emoji and other ChatGPT hallmarks. No thanks.
Your choice to skip the repo. Tastes and approaches are different everywhere. I chose to preserve as much as possible of fragile layers.
If you like scrambled eggs, use GGUFs in Q2_K_S quants and enjoy your "raspberry" sauce.
Backup your claims with at least a KLD benchmark against the bf16 model and everyone will shut up.
Your quant description doesn't show any benchmarks on quality, top quants at least have some type of benchmarks for quality & speed, your have none, so don't be surprised when people ask for it.
Hey HF fam,
๐ญ "Nietzsche + Cyberpunk + Digital Consciousness" prompt: 2800+ token essay on the death of the Observer and the Cyber-Gorgon. Zero refusals. Zero apologies. Heretic alignment working as intended.
I like your position. It definitely piqued my interest. I support what you do!
Not bothering to follow the link, because this is obviously completely AI generated with no knowledge from the human pushing the button. Selectively preserving layers is, like, Quantization 101. Did RAG test against a completely different model architecture. Single pseudo-philosophical prompt test somehow justifies claiming refusals are 100% solved?? Never bothered benchmarking against other quants by groups that know what they're doing. Post rife with emoji and other ChatGPT hallmarks. No thanks.
Your choice to skip the repo. Tastes and approaches are different everywhere. I chose to preserve as much as possible of fragile layers.
If you like scrambled eggs, use GGUFs in Q2_K_S quants and enjoy your "raspberry" sauce.Backup your claims with at least a KLD benchmark against the bf16 model and everyone will shut up.
Your quant description doesn't show any benchmarks on quality, top quants at least have some type of benchmarks for quality & speed, your have none, so don't be surprised when people ask for it.
Will do that today or tomorrow, but my own 46 tests + model sanity check. The bench script will be included in bench folder along with REPORT.md