A LoRA adapter for Qwen3-0.6B, fine-tuned for TypeScript code generation. It is a 596M-parameter model, so it runs on CPU and on very small GPUs.
This repository contains the PEFT/LoRA adapter only. Load it on top of
unsloth/Qwen3-0.6B (or any
Qwen/Qwen3-0.6B-compatible base).
Measured with greedy decoding, pass@1, executed against the official tests of each benchmark, identical runner for baseline and fine-tune.
| Benchmark | N | Qwen3-0.6B baseline | Novex-nano-ts-1 | Δ |
|---|---|---|---|---|
| mbpp-ts holdout (held-out, never trained on) | 71 | 43.66% | 59.15% | +15.49 pp |
| humaneval-ts | 159 | 24.53% | 25.16% | +0.63 pp |
For comparison, a sibling run of the same recipe with a larger general-TS mix
(ft#12) reaches 25.79% on humaneval-ts and 56.34% on the holdout. The two are
within noise of each other on humaneval-ts (SE ≈ ±3.4 pp at n=159); this adapter
was kept because it has the best average of the two.
Sample-level headroom: pass@4 on humaneval-ts is 32.08% (51/159) versus 25.16% greedy, i.e. a large part of the remaining gap is decoding/selection, not capability. 96.3% of failures are logical, only 3.7% syntactic.
The mbpp-ts holdout split (71 tasks) was fully excluded from both the distilled data and the general-TS mix, and humaneval-ts was never used for generation or training.
| Base model | unsloth/Qwen3-0.6B (bfloat16, 596.0M params) |
| Method | LoRA / QLoRA (Unsloth), no merge in this repo |
| LoRA | r=16, α=16, dropout 0.0, all projections (q,k,v,o,gate,up,down) |
| Epochs | 1 |
| Learning rate | 5e-5, linear schedule, warmup 3% |
| Batch | 2 × grad-accum 4 (effective 8), packing disabled |
| Max sequence | 1024 |
train_on_completions |
false (masking completions was measurably harmful here) |
| Data | 895 test-verified solutions distilled from Qwen2.5-Coder-3B-Instruct on mbpp tasks + ~2000 general TypeScript instructions |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "unsloth/Qwen3-0.6B"
repo = "kla857/Novex-nano-ts-1"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, repo)
messages = [{"role": "user", "content": "Write a TypeScript function that merges two sorted arrays."}]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
enable_thinking=False matters: the adapter was trained on direct code answers,
and with Qwen3's default thinking mode the model tends to narrate instead of
emitting code.
other). Check the dataset terms before
redistributing derivative weights commercially.Apache-2.0, following the base Qwen3-0.6B license.
unsloth/Qwen3-0.6B