Bentlybro commited on
Commit
e216932
·
verified ·
1 Parent(s): d99f7be

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -74
README.md CHANGED
@@ -1,74 +1,74 @@
1
- ---
2
- license: apache-2.0
3
- base_model: Qwen/Qwen2.5-Coder-7B-Instruct
4
- tags:
5
- - code
6
- - qwen
7
- - fine-tuned
8
- - qlora
9
- language:
10
- - en
11
- pipeline_tag: text-generation
12
- ---
13
-
14
- # Bently Coder 7B
15
-
16
- A fine-tuned coding model based on [Qwen 2.5 Coder 7B Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct), trained on personal GitHub repositories using QLoRA.
17
-
18
- ## Results
19
-
20
- | Model | BigCodeBench (Hard) |
21
- |-------|---------------------|
22
- | Base Qwen 2.5 7B Coder | 40% |
23
- | **Bently Coder 7B** | **92%** |
24
-
25
- **+52 percentage points over base model.**
26
-
27
- ## Key Findings
28
-
29
- - **Your code only works better** — Training exclusively on personal repos outperformed mixed datasets with popular open source
30
- - **2 epochs is optimal** — More epochs caused overfitting (4 epochs dropped to 66%)
31
- - **Quality > quantity** — 7k samples from personal repos beat 15k mixed samples
32
-
33
- ## Usage
34
-
35
- ### Transformers
36
-
37
- ```python
38
- from transformers import AutoModelForCausalLM, AutoTokenizer
39
-
40
- model = AutoModelForCausalLM.from_pretrained("Bentlybro/bently-coder-7b", device_map="auto")
41
- tokenizer = AutoTokenizer.from_pretrained("Bentlybro/bently-coder-7b")
42
-
43
- prompt = "### Instruction:\nWrite a Python function to reverse a linked list\n\n### Response:\n"
44
- inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
45
- outputs = model.generate(**inputs, max_new_tokens=512)
46
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
47
- ```
48
-
49
- ### Ollama
50
-
51
- Convert to GGUF and create a Modelfile, or download quantized versions (if available).
52
-
53
- ## Training Details
54
-
55
- - **Base model:** Qwen/Qwen2.5-Coder-7B-Instruct
56
- - **Method:** QLoRA (4-bit quantization)
57
- - **Epochs:** 2
58
- - **Hardware:** RTX 3060 12GB
59
- - **Dataset:** ~7,000 instruction-code pairs from personal GitHub repos
60
- - **Task distribution:** write (~51%), complete (~17%), explain (~15%), refactor (~10%), document (~4%)
61
-
62
- ## Limitations
63
-
64
- This model is fine-tuned on a single developer's coding style. It may:
65
- - Prefer certain patterns, naming conventions, or structures specific to that style
66
- - Perform differently on codebases with vastly different conventions
67
-
68
- ## Training Code
69
-
70
- Full training pipeline available at: [github.com/Bentlybro/bently-coder-llm](https://github.com/Bentlybro/bently-coder-llm)
71
-
72
- ## License
73
-
74
- Apache 2.0 (same as base Qwen model)
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen2.5-Coder-7B-Instruct
4
+ tags:
5
+ - code
6
+ - qwen
7
+ - fine-tuned
8
+ - qlora
9
+ language:
10
+ - en
11
+ pipeline_tag: text-generation
12
+ ---
13
+
14
+ # Bently Coder 7B
15
+
16
+ A fine-tuned coding model based on [Qwen 2.5 Coder 7B Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct), trained on personal GitHub repositories using QLoRA.
17
+
18
+ ## Results
19
+
20
+ | Benchmark | Base Qwen 2.5 7B | Bently Coder v1 | Improvement |
21
+ |-----------|------------------|-----------------|-------------|
22
+ | BigCodeBench Hard | 40% | **92%** | +52pp |
23
+ | HumanEval | 50% | **86%** | +36pp |
24
+
25
+ **+52 percentage points over base model.**
26
+
27
+ ## Key Findings
28
+
29
+ - **Your code only works better** — Training exclusively on personal repos outperformed mixed datasets with popular open source
30
+ - **2 epochs is optimal** — More epochs caused overfitting (4 epochs dropped to 66%)
31
+ - **Quality > quantity** — 7k samples from personal repos beat 15k mixed samples
32
+
33
+ ## Usage
34
+
35
+ ### Transformers
36
+
37
+ ```python
38
+ from transformers import AutoModelForCausalLM, AutoTokenizer
39
+
40
+ model = AutoModelForCausalLM.from_pretrained("Bentlybro/bently-coder-7b", device_map="auto")
41
+ tokenizer = AutoTokenizer.from_pretrained("Bentlybro/bently-coder-7b")
42
+
43
+ prompt = "### Instruction:\nWrite a Python function to reverse a linked list\n\n### Response:\n"
44
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
45
+ outputs = model.generate(**inputs, max_new_tokens=512)
46
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
47
+ ```
48
+
49
+ ### Ollama
50
+
51
+ Convert to GGUF and create a Modelfile, or download quantized versions (if available).
52
+
53
+ ## Training Details
54
+
55
+ - **Base model:** Qwen/Qwen2.5-Coder-7B-Instruct
56
+ - **Method:** QLoRA (4-bit quantization)
57
+ - **Epochs:** 2
58
+ - **Hardware:** RTX 3060 12GB
59
+ - **Dataset:** ~7,000 instruction-code pairs from personal GitHub repos
60
+ - **Task distribution:** write (~51%), complete (~17%), explain (~15%), refactor (~10%), document (~4%)
61
+
62
+ ## Limitations
63
+
64
+ This model is fine-tuned on a single developer's coding style. It may:
65
+ - Prefer certain patterns, naming conventions, or structures specific to that style
66
+ - Perform differently on codebases with vastly different conventions
67
+
68
+ ## Training Code
69
+
70
+ Full training pipeline available at: [github.com/Bentlybro/bently-coder-llm](https://github.com/Bentlybro/bently-coder-llm)
71
+
72
+ ## License
73
+
74
+ Apache 2.0 (same as base Qwen model)