Qwen3.5-0.8B-Python-SFT
Python code generation model — Qwen3.5-0.8B-Base fine-tuned with QLoRA
(Supervised Fine-Tuning) on CodeSearchNet (Python): docstring → function
code pairs.
Model Details
Training Results
Evaluation
pass@1 (temperature 0.2), official test harness, both models in bf16.
Full report with example solutions: reports/evaluation_report.md in the training repo.
Training Details
- Method: QLoRA — 4-bit quantized base + LoRA (r=16, alpha=32, dropout=0)
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Optimizer: adamw_8bit (bitsandbytes), cosine schedule, 3% warmup
- Batch: 2 per device × 8 grad accumulation (effective 16)
- Max sequence length: 2048
- Hardware: NVIDIA RTX 4060 8GB, ~25.7h
- Data: CodeSearchNet Python filtered to ≤2048 tokens (408,377 train samples)
Usage
Transformers (LoRA adapter)
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"Qwen/Qwen3.5-0.8B-Base",
max_seq_length=2048,
load_in_4bit=True,
)
model, tokenizer = FastLanguageModel.from_pretrained(
"jaweed123/Qwen3.5-0.8B-Python-SFT",
max_seq_length=2048,
load_in_4bit=True,
)
GGUF (ollama / llama.cpp / vLLM)
# llama.cpp
llama-cli -m qwen3.5-0.8b-python-sft-q4_k_m.gguf -p "Write a Python function that..."
# Ollama
ollama create qwen3.5-python -f Modelfile
# Modelfile
FROM qwen3.5-0.8b-python-sft-q4_k_m.gguf
TEMPLATE "{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"
Files
Limitations
- Fine-tuned for Python function generation from docstrings
- Trained on 2019-era open-source code
- 0.8B scale — limited reasoning; best for straightforward code tasks