srivarenya commited on
Commit
a29c68f
·
verified ·
1 Parent(s): faac844

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +41 -12
README.md CHANGED
@@ -2,26 +2,55 @@
2
  license: apache-2.0
3
  base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
4
  pipeline_tag: text-generation
5
- tags: [code, python, qwen2.5-coder, dora, reasoning]
 
6
  language: [en]
7
  ---
8
 
9
- # Python SLM 1.5B — v3 (r=64, reasoning) — RECOMMENDED
10
 
11
- Python-specialized fine-tune of **Qwen2.5-Coder-1.5B-Instruct** for the Mixture-of-Models (MoM) mesh.
12
- Single-turn code **generator** (not an agent).
 
13
 
14
- - **Base:** Qwen/Qwen2.5-Coder-1.5B-Instruct
15
- - **Method:** DoRA r=64 (4.6% trainable), SFT on reasoning-augmented Python data.
16
- - **Result (native harness, greedy pass@1):** **HumanEval 70.7% / MBPP 69.6%** beats base
17
- 68.9%/66.7% (delta +1.8 / +2.9). First checkpoint to beat its all-language base at Python.
18
- - See also `python-slm-v4` (98% reasoning coverage, experimental).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ## Usage
21
  ```python
22
  from transformers import AutoModelForCausalLM, AutoTokenizer
23
- tok = AutoTokenizer.from_pretrained("srivarenya/python-slm-v3")
24
- model = AutoModelForCausalLM.from_pretrained("srivarenya/python-slm-v3", torch_dtype="bfloat16", device_map="auto")
 
25
  ```
 
26
 
27
- Code, recipe, eval harness: https://github.com/srivarenya01/python-slm
 
 
2
  license: apache-2.0
3
  base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
4
  pipeline_tag: text-generation
5
+ library_name: transformers
6
+ tags: [code, python, qwen2.5-coder, dora, mixture-of-models, code-generation]
7
  language: [en]
8
  ---
9
 
10
+ # MoM-Python-SLM (1.5B)
11
 
12
+ The **Python code-generation node** of a **Mixture-of-Models (MoM)** mesh — a set of small,
13
+ specialized Qwen2.5-Coder SLMs (shared tokenizer) coordinated by a lightweight router, aiming to beat
14
+ frontier generalists on coding by *specialization depth* rather than parameter count.
15
 
16
+ This node is a **single-turn code generator** (not an agent): given a Python task (optionally with an
17
+ upstream context packet), it returns reasoning followed by code. It shares the Qwen2.5-Coder
18
+ tokenizer with the other generative nodes, which is what makes logit-space fusion across the mesh
19
+ valid.
20
+
21
+ - **Base:** [Qwen/Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct)
22
+ - **Method:** DoRA r=64 (≈4.6% trainable), SFT (Phase A 1ep + Phase B 2ep), then merged.
23
+ - **Data:** 476K instances (decontaminated vs HumanEval/MBPP, 0 overlap) built from the complete
24
+ CPython docs + Flask/Requests source, issues/PRs, CVEs, and execution-verified synthetic problems.
25
+
26
+ ## Benchmarks (greedy pass@1)
27
+
28
+ | Suite | Metric | base | **this model** |
29
+ |---|---|---|---|
30
+ | HumanEval | pass@1 | 68.9 | **70.7** |
31
+ | MBPP | pass@1 | 66.7 | **69.6** |
32
+ | Domain (held-out) | `spec_to_code` exec | 0.632 | **0.714** (+8.2) |
33
+ | Domain (held-out) | `api_signature` param-recall | 0.217 | **0.299** (+8.2) |
34
+ | Domain (held-out) | `problem_solving` exec | 0.700 | 0.713 (parity) |
35
+
36
+ The largest gains are on **library/API capability** (writing correct code from a spec, recalling API
37
+ signatures) — the dimension HumanEval/MBPP are saturated on and can't measure. The repo's
38
+ self-contained domain-eval notebook reproduces these.
39
+
40
+ ## Recipe findings (load-bearing)
41
+ - **Low DoRA rank wins:** r=64 specializes without forgetting; r=256 catastrophically regressed
42
+ (HumanEval 60.4 < base).
43
+ - **Moderate reasoning wins:** the ~25%-reasoning recipe (this model) beat a 98%-reasoning sibling,
44
+ whose HumanEval *collapsed* to 47 (always-reason prose fights the signature-completion format).
45
 
46
  ## Usage
47
  ```python
48
  from transformers import AutoModelForCausalLM, AutoTokenizer
49
+ tok = AutoTokenizer.from_pretrained("srivarenya/MoM-python-slm")
50
+ model = AutoModelForCausalLM.from_pretrained(
51
+ "srivarenya/MoM-python-slm", dtype="bfloat16", device_map="auto")
52
  ```
53
+ Prompt with the training system prompt + a Python task; the model returns reasoning then code.
54
 
55
+ Next step in the pipeline: **GRPO/RLVR** against an execution-grounded reward to push past the
56
+ instruct-tuning ceiling. Code, training recipe, and eval harnesses: project repository.