mechramc commited on
Commit
89be2bd
·
verified ·
1 Parent(s): e40488c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +20 -30
README.md CHANGED
@@ -18,18 +18,22 @@ datasets:
18
  - mechramc/codek-v1
19
  ---
20
 
21
- # CodeK LoRA -- Qwen2.5-Coder-7B-Instruct
22
 
23
- A LoRA adapter fine-tuned on the **CodeK v1** dataset: a reasoning-first, pedagogical coding dataset in Karpathy's register.
 
 
24
 
25
- ## What it does
26
 
27
- Teaches the model to reason like an experienced engineer -- not just write code, but:
28
- - Decompose problems before implementing
29
- - Explain *why* a solution is the right one
30
- - Identify and diagnose subtle bugs
31
- - Contrast clean vs clunky implementations with precision
32
- - Apply a hypothesis->experiment->evaluate loop to code
 
 
33
 
34
  ## Training
35
 
@@ -37,25 +41,20 @@ Teaches the model to reason like an experienced engineer -- not just write code,
37
  |---------|-------|
38
  | Base model | `Qwen/Qwen2.5-Coder-7B-Instruct` |
39
  | Method | LoRA (RS-LoRA) |
40
- | Rank | 16, Alpha 32 |
41
  | Dropout | 0.05 |
42
  | Epochs | 3 |
43
- | Batch size | 2 (effective 8 with grad accum) |
44
  | Learning rate | 2e-4 |
45
  | Train pairs | 2,351 |
46
- | Val pairs | 262 |
47
- | Final eval loss | 0.0600 |
48
- | Hardware | RunPod A100 80GB |
49
- | Training time | 59 minutes |
50
 
51
  ## Dataset
52
 
53
- [mechramc/codek-v1](https://huggingface.co/datasets/mechramc/codek-v1) -- 201 seeds, 2,613 ShareGPT pairs across 4 augmentation passes:
54
-
55
- - **Pass 1** -- Reasoning decomposition (intuition, plan, why this solution, alternatives)
56
- - **Pass 2** -- Debugging (introduce + diagnose a subtle one-line bug)
57
- - **Pass 3** -- Contrast (clunky vs clean, with specific explanation)
58
- - **Pass 4** -- Research loop (hypothesis, minimal test, success metric, simplicity check, abandon condition)
59
 
60
  ## Usage
61
 
@@ -67,12 +66,3 @@ base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct")
67
  model = PeftModel.from_pretrained(base, "mechramc/codek-qwen2.5-coder-7b-lora")
68
  tokenizer = AutoTokenizer.from_pretrained("mechramc/codek-qwen2.5-coder-7b-lora")
69
  ```
70
-
71
- Or with Unsloth (2-5x faster inference):
72
- ```python
73
- from unsloth import FastLanguageModel
74
- model, tokenizer = FastLanguageModel.from_pretrained(
75
- "mechramc/codek-qwen2.5-coder-7b-lora",
76
- max_seq_length=4096,
77
- )
78
- ```
 
18
  - mechramc/codek-v1
19
  ---
20
 
21
+ # CodeK LoRA v0 -- Qwen2.5-Coder-7B-Instruct
22
 
23
+ A LoRA adapter fine-tuned on the **CodeK v1** dataset: a reasoning-first, pedagogical
24
+ coding dataset. Teaches decomposition, bug diagnosis, contrast reasoning, and
25
+ hypothesis-driven thinking about code.
26
 
27
+ ## v0 Eval Results (Pass 2 ground-truth, 50 seeds)
28
 
29
+ | Model | Pass@1 |
30
+ |-------|--------|
31
+ | Base (Qwen2.5-Coder-7B-Instruct) | 64% |
32
+ | **LoRA checkpoint-800** | **58%** |
33
+
34
+ 6% regression on bug diagnosis. LoRA wins on 2/50 seeds (more direct, correct),
35
+ base wins on 5/50 (LoRA misidentifies function or pattern-matches to training data).
36
+ See `BASELINE_V0.md` in the dataset repo for full analysis.
37
 
38
  ## Training
39
 
 
41
  |---------|-------|
42
  | Base model | `Qwen/Qwen2.5-Coder-7B-Instruct` |
43
  | Method | LoRA (RS-LoRA) |
44
+ | Rank / Alpha | 16 / 32 |
45
  | Dropout | 0.05 |
46
  | Epochs | 3 |
47
+ | Batch (effective) | 8 |
48
  | Learning rate | 2e-4 |
49
  | Train pairs | 2,351 |
50
+ | Best eval loss | 0.0583 (step 528) |
51
+ | Checkpoint used | checkpoint-800 (eval loss 0.061) |
52
+ | Hardware | RunPod A100 80GB, 59 min |
 
53
 
54
  ## Dataset
55
 
56
+ [mechramc/codek-v1](https://huggingface.co/datasets/mechramc/codek-v1) --
57
+ 201 seeds, 4 augmentation passes, 2,613 ShareGPT pairs.
 
 
 
 
58
 
59
  ## Usage
60
 
 
66
  model = PeftModel.from_pretrained(base, "mechramc/codek-qwen2.5-coder-7b-lora")
67
  tokenizer = AutoTokenizer.from_pretrained("mechramc/codek-qwen2.5-coder-7b-lora")
68
  ```