Instructions to use khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled") 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("khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled") model = AutoModelForMultimodalLM.from_pretrained("khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled", 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 khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled", "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/khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled
- SGLang
How to use khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled 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 "khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled" \ --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": "khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled", "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 "khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled" \ --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": "khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled with Docker Model Runner:
docker model run hf.co/khazarai/Qwen3.8-27B-Fable-5-Coding-Distilled
Qwen3.8-27B-Coding-Distilled
Qwen3.8-27B-Coding-Distilled is a coding- and agentic-reasoning-focused fine-tune of
Qwen/Qwen3.8-27B, trained on 195M tokens
of distilled reasoning traces for software-engineering and debugging tasks.
The goal of this fine-tune is to push the base model toward grounded, tool-using reasoning — reading actual files, verifying assumptions against real state, and avoiding speculative "guess-and-write" behavior — rather than producing long, free-floating chains of thought that reason about a problem without ever checking it.
⚠️ Fill in / verify before publishing: exact license inheritance from the base model, full dataset composition and sourcing, training hyperparameters, and hardware — placeholders for these are marked below.
Model Details
| Base model | Qwen/Qwen3.8-27B (dense, ~27B params, Apache 2.0) |
| Fine-tuning method | Distillation on curated reasoning traces *(SFT / LoRA |
| Training data size | 195M tokens |
| Domain focus | Coding, debugging, agentic tool-use (shell, test harnesses, CI/lint workflows) |
| Context length | Inherits base model context window (confirm exact value) |
| License | Apache 2.0 (inherited from base — confirm) |
| Languages | English (code + natural language) |
Training Data
The model was fine-tuned on 195M tokens of reasoning traces distilled for coding and agentic-debugging scenarios. Traces emphasize:
- Reading and verifying project state (files, test harnesses, CI configs) before proposing a fix
- Working within existing code/output constraints instead of unnecessary rewrites
- Concise, evidence-grounded reasoning over long speculative chains
Intended Use
This model is intended for:
- Agentic coding assistants that need to inspect a repository before acting
- Debugging and root-cause analysis tasks (e.g., CI failures, lint errors, shell script bugs)
- Code review and refactoring within existing project constraints
It is not intended for use as a general-purpose chat assistant without further evaluation.
Example: Grounded vs. Speculative Reasoning
The distillation objective specifically targets the difference below, observed when comparing this fine-tune against the undistilled base model on an agentic bash-debugging task (a CI pipeline failing on a shell script with quoting bugs):
- This model (fine-tuned): Immediately inspects the actual project files (test harness, target script) before forming a fix, keeping its response short and grounded in verified state rather than assumptions.
- Base model: Reasons at length about what the script might contain, repeatedly acknowledges it hasn't seen the files, and ultimately proposes a fix based on guesses rather than a tool call — risking a rewrite that breaks pinned output formats the task explicitly asked to preserve.
This kind of "check before you fix" behavior is the primary signal the 195M-token distillation set was built to reinforce.
Limitations
- Inherits the general limitations of the Qwen3.8-27B base model (knowledge cutoff, potential hallucination on unfamiliar codebases, no execution sandboxing on its own).
- Distillation was focused on coding/agentic-debugging traces — general chat and non-coding reasoning quality has not been separately evaluated.
- As with any fine-tune, behavior on out-of-distribution tasks (outside shell/CI/test-harness-style debugging) should be validated before production use.
Citation
If you use this model, please cite:
@misc{qwen38_27b_coding_distilled,
title = {Qwen3.8-27B-Coding-Distilled},
author = {khazarai},
year = {2026},
note = {Fine-tune of Qwen/Qwen3.8-27B, distilled on 195M tokens of agentic coding reasoning traces},
url = {https://huggingface.co/khazarai/Qwen3.8-27B-Coding-Distilled}
}
Acknowledgements
Built on top of Qwen/Qwen3.8-27B by the Qwen team.
- Downloads last month
- 160