Downloads · 30 days
0
nicholashat/qwen2.5-coder-3b-oss-instruct-lora
qwen2.5-coder-3b-oss-instruct-lora is a machine learning model from nicholashat. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for mlx-lm. The card lists the license as apache-2.0.
A LoRA adapter for mlx-community/Qwen2.5-Coder-3B-Instruct-4bit, fine-tuned on synthetic instruction/solution pairs generated with the OSS-Instruct method (Magicoder). Trained end to end on Apple Silicon using mlx-lm…
Downloads · 30 days
0
Access
Public
Updated Jul 19, 2026
Repo size
59.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors59.9 MB · 100%
From the Hugging Face model README
A LoRA adapter for mlx-community/Qwen2.5-Coder-3B-Instruct-4bit, fine-tuned on synthetic
instruction/solution pairs generated with the OSS-Instruct method
(Magicoder). Trained end to end on Apple Silicon using mlx-lm — no CUDA, no bitsandbytes.
Full pipeline, training log, and evaluation methodology: github.com/NicholasHat/oss-instruct-py.
~28.3k (instruction, solution) pairs, generated by prompting claude-haiku-4-5 to write a
self-contained Python problem and solution inspired by a real open-source code snippet (not
copied), sourced from bigcode/the-stack-dedup (permissively-licensed Python files under 2KB).
Post-generation quality filter (ast.parse validity, MinHash near-duplicate removal) and a 95/5
train/valid split. Total generation cost: $33.60.
num_layers: -1), scale 20.0Base vs. tuned, identical mlx_lm.generate invocation (greedy, max_tokens=512, seed=0):
| Task | Base 3B | Tuned 3B (this adapter) | Δ |
|---|---|---|---|
| HumanEval pass@1 | 0.677 (111/164) | 0.707 (116/164) | +3.0 pts |
| MBPP pass@1 | 0.582 (291/500) | 0.596 (298/500) | +1.4 pts |
Scored with bigcode-evaluation-harness
(sandboxed execution + pass@1 scoring only — completions were generated separately with
mlx_lm.generate, not the harness).
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load(
"mlx-community/Qwen2.5-Coder-3B-Instruct-4bit",
adapter_path="<path to this repo>",
)
messages = [{"role": "user", "content": "Write a Python function that reverses a linked list."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512))
mlx_lm.lora, not the original QLoRA/bitsandbytes recipe — absolute
numbers aren't directly comparable to a from-scratch reproduction on that stack.n_samples=1, greedy), not pass@10.See the repo's plan.md for the full decision
log, including a training-stability investigation on a 7B ablation (shelved, unresolved) and a
scoring-stability issue found and corrected during evaluation.