Downloads Β· 30 days
0
sukritvemula/Qwen3-8B-CodeAgent
Qwen3-8B-CodeAgent is a machine learning model from sukritvemula. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A coding & agentic reasoning expert built on Qwen3-8B
Downloads Β· 30 days
0
Access
Public
Updated Apr 30, 2026
Repo size
β
Likes
0
Public
Click a slice to open those files.
.py12.1 KB Β· 67%
From the Hugging Face model README
A coding & agentic reasoning expert built on Qwen3-8B
Expert at coding, step-by-step reasoning, data visualization, tool calling, and research paper analysis
| Capability | How it was trained | Dataset |
|---|---|---|
| Coding (any language) | SFT on code instructions + competitions | CodeFeedback + Magicoder + OpenCodeReasoning |
| Agentic Reasoning | Chain-of-thought with <think> blocks | nvidia/OpenCodeReasoning (R1-style traces) |
| Data Visualization | Chart/graph code generation | TIGER-Lab/VisCode-200K |
| Tool Calling | Function calling with JSON schemas | glaive-function-calling-v2 |
| Anti-hallucination | Step-by-step verification, assistant-only loss masking | All datasets with system prompt enforcement |
Based on research from:
| Parameter | Value |
|---|---|
| Learning rate | 2e-4 (10Γ base for LoRA) |
| LR scheduler | Cosine with 5% warmup |
| Epochs | 2 |
| Batch size | 16 (2 Γ 8 grad accum) |
| Max sequence length | 4096 |
| LoRA rank | 64 |
| LoRA alpha | 16 |
| Weight decay | 0.01 |
| Optimizer | AdamW |
| Precision | BF16 + TF32 |
| Dataset | Samples | Purpose |
|---|---|---|
| TIGER-Lab/VisCode-200K | 12,000 | Visualization & chart generation |
| m-a-p/CodeFeedback-Filtered-Instruction | 10,000 | Code instruction following |
| nvidia/OpenCodeReasoning | 10,000 | Code reasoning with <think> traces |
| glaiveai/glaive-function-calling-v2 | 8,000 | Function/tool calling |
| ise-uiuc/Magicoder-OSS-Instruct-75K | 10,000 | Code generation |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "sukritvemula/Qwen3-8B-CodeAgent"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "system", "content": "You are an expert coding assistant."},
{"role": "user", "content": "Write a Python function to visualize a binary tree using matplotlib."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.6, top_p=0.95, top_k=20)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
| Hardware | Speed (tok/s) | Notes |
|---|---|---|
| A100 80GB (BF16) | ~100-150 | Full precision |
| A10G 24GB (BF16) | ~40-50 | Meets 40 tok/s target |
| RTX 4090 (BF16) | ~60-80 | Consumer GPU |
| Any GPU (AWQ INT4) | 2Γ above | Minimal quality loss |
Recommended deployment: vLLM or SGLang
# vLLM
vllm serve sukritvemula/Qwen3-8B-CodeAgent --enable-reasoning --reasoning-parser deepseek_r1
# SGLang
python -m sglang.launch_server --model-path sukritvemula/Qwen3-8B-CodeAgent --reasoning-parser qwen3
See train_coding_agent.py in this repo for the full training pipeline.
Apache 2.0 (inherited from Qwen3-8B)