KrisPi commited on
Commit
c888f6b
1 Parent(s): 2854d1d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +135 -0
README.md CHANGED
@@ -1,3 +1,138 @@
1
  ---
2
  license: openrail
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: openrail
3
  ---
4
+ **This model is merge between 66% of Wizard Coder and 33% of Redmond Hermes Coder (which is Wizard Coder fine-tune):**
5
+
6
+ https://huggingface.co/NousResearch/Redmond-Hermes-Coder
7
+ https://huggingface.co/WizardLM/WizardCoder-15B-V1.0
8
+
9
+ Merger done by the most basic value average.
10
+
11
+ Using CTranslate2 for quantization and inference achieving as much as 37 tokens /s on RTX 3090 GPU.
12
+
13
+ Inference done by using text-generation-webui:
14
+
15
+ Added this code and ran update on requirements.txt: https://github.com/oobabooga/text-generation-webui/pull/2828
16
+
17
+ There is one thing extra to be changed in the code: reply = apply_extensions('output', reply) to: reply = apply_extensions('output', reply, state)
18
+
19
+ The idea was to get some of the coding abilities back that were lost in fine-tune, but retain at least basic capabilities to summarize text and work with context. This experiment was also focused on using CT2 for its speed. **I believe presented approach is the best available compromise between speed, coding accuracy and a little of general LLM use. ~Please note that CT2 8bit quant seems to have better HumanEval scores than load-in-8bit~**
20
+
21
+ Community now mostly focus on making non-coding models - code as making coding models be more general seems near impossible.
22
+ However, my daily use is focused around DevOps questions, summarizing content and script development. Further development will be around intent analysis for integration with TODO lists and calendar extracting actions and notes from my voice transcription. This model doesn't seem to work well enough on those tasks so next time will attempt actual fine-tunes of Wizard Coder or just running two models at the same time. I hope to fit under 24GB VRAM which would mean I will also evaluate 4 bit quantization.
23
+
24
+ My initial testing was checking if model finds:
25
+
26
+ Overflow: `"what is mistake in following C++ code: int a = 1e9+7; int b = 1e9+9; int c = a*b; cout << c;"`
27
+
28
+ Out of bounds: `"what is bug in the following C++ code: int a = 100; vector <int> b(a); b[a] = 20; cout << b[a] << '\n';"`
29
+
30
+ and propose using "docker update" for `"how to stop docker container so it doesnt start every reboot"`
31
+
32
+
33
+ I have run those prompts in the loop, with different presets and ended up picking this preset:
34
+ `['temperature'] = 1.31`
35
+ `['top_p'] = 0.29`
36
+ `['top_k'] = 72`
37
+ `['repetition_penalty'] = 1.09`
38
+
39
+ Testing of the above prompts has shown that Hermes Coder CT2 was not able to answer correctly most of the time while Wizard Coder and this merge did. Merged model seems to retain ability to use "### Input:" in the prompt and became more sensitive to non-coding instruction. (Wizard Coder almost completely disregard it)
40
+
41
+ In the bottom you can see EvalPlus benchmarks of three mentioned models - seems they all performed in similar way with default preset. I'm not sure if I'm not doing benchmark right or those quants are not working properly. As I noticed myself custom preset improved the result. I will rerun benchmarks as the last result seems to hint some randomness.
42
+
43
+ **For summarization I propose following prompt:**
44
+
45
+ `Below is an instruction that describes a task. Write a response that appropriately completes the request.`
46
+
47
+ `### Instruction:`
48
+ `Please provide a concise, summary for each topic presented in the input below. Ensure clarity, coherence, and avoid redundant information.`
49
+
50
+ `### Input:`
51
+ `[CONTENT TO SUMMARIZE]`
52
+
53
+ `### Response:The summary for each topic presented in the input is as follows:`
54
+
55
+ **Optionally iterate over the output with following prompt:**
56
+
57
+ `Below is an instruction that describes a task. Write a response that appropriately completes the request.`
58
+
59
+ `### Instruction:`
60
+ `Rewrite summary from Input. Fix typos, add missing spaces. Ensure clarity, coherence, and remove redundant information.`
61
+
62
+ `### Input:`
63
+ `[OUTPUT FROM PREVIOUS PROMPT]`
64
+
65
+ `### Response:`
66
+
67
+ **HumanEval** run using: https://github.com/my-other-github-account/llm-humaneval-benchmarks/
68
+ and
69
+ `sudo docker run -v $(pwd):/app ganler/evalplus:latest --dataset humaneval --samples results/{model_name}.jsonl`
70
+
71
+
72
+ **Custom preset:**
73
+ `['temperature'] = 1.31`
74
+ `['top_p'] = 0.29`
75
+ `['top_k'] = 72`
76
+ `['repetition_penalty'] = 1.09`
77
+
78
+ **CT2 int8_float16 merge, custom preset:**
79
+ `Base`
80
+ `{'pass@1': 0.47560975609756095}`
81
+ `Base + Extra`
82
+ `{'pass@1': 0.45121951219512196}`
83
+
84
+ **CT2 int8_float16 Wizard Coder:**
85
+ `Base`
86
+ `{'pass@1': 0.43902439024390244}`
87
+ `Base + Extra`
88
+ `{'pass@1': 0.3597560975609756}`
89
+ **Retry:**
90
+ `Base`
91
+ `{'pass@1': 0.42073170731707316}`
92
+ `Base + Extra`
93
+ `{'pass@1': 0.3475609756097561}`
94
+
95
+ **Full-weight Wizard Coder loaded with --load-in-8bit, custom preset:**
96
+ `Base`
97
+ `{'pass@1': 0.3475609756097561}`
98
+ `Base + Extra`
99
+ `{'pass@1': 0.3170731707317073}`
100
+
101
+ ---
102
+
103
+ **Default llm-humaneval-benchmarks preset:**
104
+ `['temperature'] = 1`
105
+ `['top_p'] = 1`
106
+ `['top_k'] = 0`
107
+ `['repetition_penalty'] = 1`
108
+
109
+ **CT2 int8_float16 - this model:**
110
+ `Base`
111
+ `{'pass@1': 0.4634146341463415}`
112
+ `Base + Extra`
113
+ `{'pass@1': 0.4024390243902439}`
114
+
115
+ **CT2 int8_float16 Redmond Hermes Coder:**
116
+ `Base`
117
+ `{'pass@1': 0.4695121951219512}`
118
+ `Base + Extra`
119
+ `{'pass@1': 0.4146341463414634}`
120
+
121
+ **CT2 int8_float16 Wizard Coder:**
122
+ `Base`
123
+ `{'pass@1': 0.4695121951219512}`
124
+ `Base + Extra`
125
+ `{'pass@1': 0.3902439024390244}`
126
+
127
+ **Full-weight Wizard Coder loaded with --load-in-8bit, default preset:**
128
+ `Base`
129
+ `{'pass@1': 0.43902439024390244}`
130
+ `Base + Extra`
131
+ `{'pass@1': 0.3719512195121951}`
132
+
133
+ --------------
134
+
135
+
136
+
137
+
138
+