Downloads · 30 days
35
5% of all-time downloads
08210821iy/Qwen3-4B-Coder
Qwen3-4B-Coder is a text generation model from 08210821iy. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A fine-tuned Qwen3-4B model specialized for Python code generation, trained by an elementary school student on an RTX 4060 Laptop GPU (8 GB VRAM).
Downloads · 30 days
35
5% of all-time downloads
All-time downloads
657
Public
Repo size
2.5 GB
Likes
1
Public
Click a slice to open those files.
.gguf2.5 GB · 100%
From the Hugging Face model README
A fine-tuned Qwen3-4B model specialized for Python code generation, trained by an elementary school student on an RTX 4060 Laptop GPU (8 GB VRAM).
Qwen3-4Bをベースに、Pythonコード生成に特化してファインチューニングしたモデルです。小学生がRTX 4060 Laptop GPU (VRAM 8GB) で学習しました。
| Model | MBPP pass@1 | Condition |
|---|---|---|
| Qwen3-4B-Coder (this model) | 69.3% (178/257) | Q4_K_M, temperature=0.0 |
| Qwen3-4B (official) | 62.0% | FP16, EvalPlus |
+7.3 points improvement on practical coding tasks.
| Model | HumanEval pass@1 | Condition |
|---|---|---|
| Qwen3-4B-Coder (this model) | 47.6% (78/164) | Q4_K_M, temperature=0.0 |
| Qwen3-4B (official) | 65.6% | FP16, EvalPlus |
| Benchmark | Qwen3-4B-Coder | Qwen3-4B (Q4_K_M) | Speed Ratio |
|---|---|---|---|
| HumanEval (164 tasks) | 793s | 3623s | 4.6x faster |
| MBPP (257 tasks) | 1274s | - | - |
Syntax error rate on HumanEval: 0% (164/164)
This model demonstrates that SFT for code-only output has two major benefits:
| Parameter | Value |
|---|---|
| Base Model | Qwen/Qwen3-4B |
| Method | SFT with LoRA (r=16, alpha=32) |
| Dataset | PersonalAILab/AFM-CodeAgent-SFT-Dataset |
| Training Samples | 8,869 (filtered to 512 tokens) |
| Epochs | 3 |
| Final Loss | 0.72 |
| MAX_SEQ | 512 |
| GPU | NVIDIA RTX 4060 Laptop (8 GB VRAM) |
| Training Time | ~5.5 hours |
| Quantization | Q4_K_M (~2.4 GB) |
An interactive CLI tool that uses this model to generate, execute, and auto-fix Python code.
git clone https://github.com/jiexiang018-tech/ai-python-agent.git
cd ai-python-agent
pip install -r requirements.txt
python setup.py
python agent.py