Instructions to use DhruvalLabs/qwen3-8b-claude-agentic-fable5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DhruvalLabs/qwen3-8b-claude-agentic-fable5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DhruvalLabs/qwen3-8b-claude-agentic-fable5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DhruvalLabs/qwen3-8b-claude-agentic-fable5") model = AutoModelForCausalLM.from_pretrained("DhruvalLabs/qwen3-8b-claude-agentic-fable5", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DhruvalLabs/qwen3-8b-claude-agentic-fable5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DhruvalLabs/qwen3-8b-claude-agentic-fable5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DhruvalLabs/qwen3-8b-claude-agentic-fable5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DhruvalLabs/qwen3-8b-claude-agentic-fable5
- SGLang
How to use DhruvalLabs/qwen3-8b-claude-agentic-fable5 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 "DhruvalLabs/qwen3-8b-claude-agentic-fable5" \ --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": "DhruvalLabs/qwen3-8b-claude-agentic-fable5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "DhruvalLabs/qwen3-8b-claude-agentic-fable5" \ --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": "DhruvalLabs/qwen3-8b-claude-agentic-fable5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use DhruvalLabs/qwen3-8b-claude-agentic-fable5 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DhruvalLabs/qwen3-8b-claude-agentic-fable5 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DhruvalLabs/qwen3-8b-claude-agentic-fable5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for DhruvalLabs/qwen3-8b-claude-agentic-fable5 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="DhruvalLabs/qwen3-8b-claude-agentic-fable5", max_seq_length=2048, ) - Docker Model Runner
How to use DhruvalLabs/qwen3-8b-claude-agentic-fable5 with Docker Model Runner:
docker model run hf.co/DhruvalLabs/qwen3-8b-claude-agentic-fable5
qwen3-8b-claude-agentic-fable5
A Qwen3-8B model fine-tuned on Claude Fable-5 agent traces for agentic coding tasks.
Fine-tuned by DhruvalLabs using LoRA on real coding agent trajectories from the Glint-Research/Fable-5-traces dataset.
What is this model?
This model is fine-tuned to behave like an agentic coding assistant — it reasons step by step
inside <think> tags before taking any action, then calls the appropriate tool to complete the task.
Unlike a standard chat model that just replies with text, this model:
- Thinks before acting — every response includes a reasoning chain
- Calls tools correctly — uses
bash,read_file,write_file,edit_file,web_searchand more - Works multi-step — plans and executes complex tasks autonomously
- Follows the Fable-5 agent style — trained on real Claude Fable-5 coding sessions
Training Details
| Base model | Qwen/Qwen3-8B |
| Dataset | Glint-Research/Fable-5-traces |
| Dataset size | 4,665 rows |
| Method | QLoRA (LoRA fine-tuning on 4-bit quantized model) |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Training steps | 580 |
| Batch size | 2 × 8 grad accum = 16 effective |
| Learning rate | 2e-4 |
| Sequence length | 8192 |
| GPU | NVIDIA RTX 4000 Ada (20GB) |
| Framework | Unsloth + TRL |
| Final loss | ~0.27 |
What it learned
The model was trained on real Fable-5 (Claude) coding agent sessions. Each training example contains:
- A coding task from a real user
- The agent's step-by-step reasoning (
<think>block) - The tool call the agent made (
bash,read_file,write_file, etc.)
Tools present in training data:
| Tool | Count |
|---|---|
| bash | 1,544 |
| edit_file | 960 |
| text_response | 866 |
| read_file | 443 |
| write_file | 311 |
| web_search | 72 |
| + others | ~200 |
How to use
Basic inference
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"DhruvalLabs/qwen3-8b-claude-agentic-fable5",
torch_dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("DhruvalLabs/qwen3-8b-claude-agentic-fable5")
messages = [
{
"role": "system",
"content": (
"You are an expert agentic coding assistant. "
"Before every action, reason carefully inside <think>...</think> tags. "
"Then call the appropriate tool to complete the task step by step."
)
},
{
"role": "user",
"content": "/think\nRead the file main.py and summarize what it does."
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
outputs = model.generate(
input_ids=inputs,
max_new_tokens=500,
temperature=0.7,
do_sample=True,
)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
With Unsloth (faster, less VRAM)
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "DhruvalLabs/qwen3-8b-claude-agentic-fable5",
max_seq_length = 8192,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
With vLLM (for serving as API)
python -m vllm.entrypoints.openai.api_server \
--model DhruvalLabs/qwen3-8b-claude-agentic-fable5 \
--port 8000 \
--max-model-len 8192
Then connect any OpenAI-compatible client to http://localhost:8000/v1.
Example output
Input:
Check if Node.js is installed and what version it is.
Output:
<tool_call>
{"name": "bash", "arguments": {"command": "node --version 2>/dev/null || echo 'Node.js not installed'"}}
</tool_call>
Tips for best results
- Always add
/thinkat the start of your user message to trigger reasoning mode - Use a system prompt that tells the model it's an agentic assistant
- Set
temperature=0.7for a good balance of creativity and consistency - Set
max_new_tokensto at least 400 for complex tasks
Dataset
Trained on Glint-Research/Fable-5-traces — a dataset of real Fable-5 (Claude) coding agent traces converted to Qwen3 chat format.
Data preprocessing and format conversion done by DhruvalLabs.
License
This model inherits the Apache 2.0 license from the base Qwen3-8B model. Free to use for personal, research, and commercial purposes.
Citation
If you use this model in your research or project, please cite:
@misc{dhruval2026qwen3fable5,
author = {DhruvalLabs},
title = {qwen3-8b-claude-agentic-fable5: Qwen3-8B Fine-tuned on Fable-5 Agent Traces},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/DhruvalLabs/qwen3-8b-claude-agentic-fable5}
}
Made with ❤️ by DhruvalLabs
- Downloads last month
- 800