Improve language tag

#1
by lbourdois - opened
Files changed (1) hide show
  1. README.md +245 -231
README.md CHANGED
@@ -1,232 +1,246 @@
1
- ---
2
- library_name: transformers
3
- tags:
4
- - trl
5
- - sft
6
- datasets:
7
- - xavierwoon/cestertrain
8
- base_model:
9
- - Qwen/Qwen2.5-1.5B-Instruct
10
- ---
11
-
12
- # Model Card for Model ID
13
-
14
- <!-- Provide a quick summary of what the model is/does. -->
15
-
16
- Cesterqwen is a fine-tuned Qwen2.5-1.5B model that is able to generate Libcester unit test cases in the correct format.
17
-
18
- ## Model Details
19
-
20
- ### Model Description
21
-
22
- <!-- Provide a longer summary of what this model is. -->
23
-
24
- <!-- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. -->
25
-
26
- - **Developed by:** Xavier Woon
27
- <!-- - **Funded by [optional]:** [More Information Needed]
28
- - **Shared by [optional]:** [More Information Needed] -->
29
- - **Model type:** Qwen
30
- <!-- - **Language(s) (NLP):** [More Information Needed]
31
- - **License:** [More Information Needed] -->
32
- - **Finetuned from model [optional]:** Qwen/Qwen2.5-1.5B-Instruct
33
-
34
- <!-- ### Model Sources [optional]
35
-
36
- Provide the basic links for the model.
37
-
38
- - **Repository:** [More Information Needed]
39
- - **Paper [optional]:** [More Information Needed]
40
- - **Demo [optional]:** [More Information Needed] -->
41
-
42
- <!-- ## Uses -->
43
-
44
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
45
-
46
- <!-- ### Direct Use -->
47
-
48
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
49
-
50
- <!-- [More Information Needed] -->
51
-
52
- <!-- ### Downstream Use [optional] -->
53
-
54
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
55
-
56
- <!-- [More Information Needed] -->
57
-
58
- <!-- ### Out-of-Scope Use -->
59
-
60
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
61
-
62
- <!-- [More Information Needed] -->
63
-
64
- ## Bias, Risks, and Limitations
65
-
66
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
-
68
- The model often regenerates the input prompt in the output. This can lead to limited test cases being printed due to truncations based on `max_new_tokens`.
69
-
70
- ### Recommendations
71
-
72
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
-
74
- Expanding the dataset will help increase the accuracy and robustness of the model, and improve code coverage based on real life scenarios.
75
-
76
- ## How to Get Started with the Model
77
-
78
- Use the code below to get started with the model.
79
-
80
- ```py
81
- from transformers import AutoModelForCausalLM, Qwen2Tokenizer
82
-
83
- model_name = "xavierwoon/cesterqwen"
84
- model = AutoModelForCausalLM.from_pretrained(model_name)
85
- tokenizer = Qwen2Tokenizer.from_pretrained(model_name)
86
-
87
- # Paste your own code inside
88
- code = """
89
- void add()
90
- {
91
- int a,b,c;
92
- printf("\nEnter The Two values:");
93
- scanf("%d%d",&a,&b);
94
- c=a+b;
95
- printf("Addition:%d",c);
96
- }
97
- """
98
-
99
- prompt = f"""### Instruction:
100
- create cester test cases for this function:
101
- {code}
102
-
103
- ### Input:
104
-
105
- ### Response:
106
- """
107
-
108
- inputs = tokenizer(prompt, return_tensors="pt").to("cpu")
109
-
110
- from transformers import TextStreamer
111
- text_streamer = TextStreamer(tokenizer)
112
- _ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 2048)
113
- ```
114
-
115
- <!-- [More Information Needed] -->
116
-
117
- ## Training Details
118
-
119
- ### Training Data
120
-
121
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
122
-
123
- Training Data was created based on Data Structures and Algorithm (DSA) codes created using ChatGPT. It would also create corresponding Cester test cases. After testing and ensuring a good code coverage, the prompt and corresponding test cases were added to the dataset.
124
-
125
- ### Training Procedure
126
-
127
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
128
-
129
- 1. Prompt GPT for sample DSA C code
130
- 2. Prompt GPT for Libcester unit test cases with 100% code coverage
131
- 3. Test generated test cases for robustness and code coverage
132
-
133
- <!-- #### Preprocessing [optional]
134
-
135
- [More Information Needed]
136
- -->
137
-
138
- <!-- #### Training Hyperparameters -->
139
-
140
- <!-- - **Training regime:** [More Information Needed] fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
141
-
142
- <!-- #### Speeds, Sizes, Times [optional] -->
143
-
144
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
145
-
146
- <!-- [More Information Needed] -->
147
-
148
- <!-- ## Evaluation -->
149
-
150
- <!-- This section describes the evaluation protocols and provides the results. -->
151
-
152
- <!-- ### Testing Data, Factors & Metrics -->
153
-
154
- <!-- #### Testing Data -->
155
-
156
- <!-- This should link to a Dataset Card if possible. -->
157
-
158
- <!-- [More Information Needed] -->
159
-
160
- <!-- #### Factors -->
161
-
162
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
163
-
164
- <!-- [More Information Needed] -->
165
-
166
- <!-- #### Metrics -->
167
-
168
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
169
-
170
- <!-- [More Information Needed] -->
171
-
172
- <!-- ### Results -->
173
-
174
- <!-- [More Information Needed] -->
175
-
176
- <!-- #### Summary -->
177
-
178
-
179
-
180
- <!-- ## Model Examination [optional] -->
181
-
182
- <!-- Relevant interpretability work for the model goes here -->
183
-
184
- <!-- [More Information Needed] -->
185
-
186
- <!-- ## Technical Specifications [optional]
187
-
188
- ### Model Architecture and Objective
189
-
190
- [More Information Needed]
191
-
192
- ### Compute Infrastructure
193
-
194
- [More Information Needed]
195
-
196
- #### Hardware
197
-
198
- [More Information Needed]
199
-
200
- #### Software
201
-
202
- [More Information Needed]
203
-
204
- ## Citation [optional] -->
205
-
206
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
207
-
208
- <!-- **BibTeX:**
209
-
210
- [More Information Needed]
211
-
212
- **APA:**
213
-
214
- [More Information Needed]
215
-
216
- ## Glossary [optional] -->
217
-
218
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
219
-
220
- <!-- [More Information Needed]
221
-
222
- ## More Information [optional]
223
-
224
- [More Information Needed]
225
-
226
- ## Model Card Authors [optional]
227
-
228
- [More Information Needed]
229
-
230
- ## Model Card Contact
231
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  [More Information Needed] -->
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - trl
5
+ - sft
6
+ datasets:
7
+ - xavierwoon/cestertrain
8
+ base_model:
9
+ - Qwen/Qwen2.5-1.5B-Instruct
10
+ language:
11
+ - zho
12
+ - eng
13
+ - fra
14
+ - spa
15
+ - por
16
+ - deu
17
+ - ita
18
+ - rus
19
+ - jpn
20
+ - kor
21
+ - vie
22
+ - tha
23
+ - ara
24
+ ---
25
+
26
+ # Model Card for Model ID
27
+
28
+ <!-- Provide a quick summary of what the model is/does. -->
29
+
30
+ Cesterqwen is a fine-tuned Qwen2.5-1.5B model that is able to generate Libcester unit test cases in the correct format.
31
+
32
+ ## Model Details
33
+
34
+ ### Model Description
35
+
36
+ <!-- Provide a longer summary of what this model is. -->
37
+
38
+ <!-- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. -->
39
+
40
+ - **Developed by:** Xavier Woon
41
+ <!-- - **Funded by [optional]:** [More Information Needed]
42
+ - **Shared by [optional]:** [More Information Needed] -->
43
+ - **Model type:** Qwen
44
+ <!-- - **Language(s) (NLP):** [More Information Needed]
45
+ - **License:** [More Information Needed] -->
46
+ - **Finetuned from model [optional]:** Qwen/Qwen2.5-1.5B-Instruct
47
+
48
+ <!-- ### Model Sources [optional]
49
+
50
+ Provide the basic links for the model.
51
+
52
+ - **Repository:** [More Information Needed]
53
+ - **Paper [optional]:** [More Information Needed]
54
+ - **Demo [optional]:** [More Information Needed] -->
55
+
56
+ <!-- ## Uses -->
57
+
58
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
59
+
60
+ <!-- ### Direct Use -->
61
+
62
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
63
+
64
+ <!-- [More Information Needed] -->
65
+
66
+ <!-- ### Downstream Use [optional] -->
67
+
68
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
69
+
70
+ <!-- [More Information Needed] -->
71
+
72
+ <!-- ### Out-of-Scope Use -->
73
+
74
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
75
+
76
+ <!-- [More Information Needed] -->
77
+
78
+ ## Bias, Risks, and Limitations
79
+
80
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
81
+
82
+ The model often regenerates the input prompt in the output. This can lead to limited test cases being printed due to truncations based on `max_new_tokens`.
83
+
84
+ ### Recommendations
85
+
86
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
87
+
88
+ Expanding the dataset will help increase the accuracy and robustness of the model, and improve code coverage based on real life scenarios.
89
+
90
+ ## How to Get Started with the Model
91
+
92
+ Use the code below to get started with the model.
93
+
94
+ ```py
95
+ from transformers import AutoModelForCausalLM, Qwen2Tokenizer
96
+
97
+ model_name = "xavierwoon/cesterqwen"
98
+ model = AutoModelForCausalLM.from_pretrained(model_name)
99
+ tokenizer = Qwen2Tokenizer.from_pretrained(model_name)
100
+
101
+ # Paste your own code inside
102
+ code = """
103
+ void add()
104
+ {
105
+ int a,b,c;
106
+ printf("\nEnter The Two values:");
107
+ scanf("%d%d",&a,&b);
108
+ c=a+b;
109
+ printf("Addition:%d",c);
110
+ }
111
+ """
112
+
113
+ prompt = f"""### Instruction:
114
+ create cester test cases for this function:
115
+ {code}
116
+
117
+ ### Input:
118
+
119
+ ### Response:
120
+ """
121
+
122
+ inputs = tokenizer(prompt, return_tensors="pt").to("cpu")
123
+
124
+ from transformers import TextStreamer
125
+ text_streamer = TextStreamer(tokenizer)
126
+ _ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 2048)
127
+ ```
128
+
129
+ <!-- [More Information Needed] -->
130
+
131
+ ## Training Details
132
+
133
+ ### Training Data
134
+
135
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
136
+
137
+ Training Data was created based on Data Structures and Algorithm (DSA) codes created using ChatGPT. It would also create corresponding Cester test cases. After testing and ensuring a good code coverage, the prompt and corresponding test cases were added to the dataset.
138
+
139
+ ### Training Procedure
140
+
141
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
142
+
143
+ 1. Prompt GPT for sample DSA C code
144
+ 2. Prompt GPT for Libcester unit test cases with 100% code coverage
145
+ 3. Test generated test cases for robustness and code coverage
146
+
147
+ <!-- #### Preprocessing [optional]
148
+
149
+ [More Information Needed]
150
+ -->
151
+
152
+ <!-- #### Training Hyperparameters -->
153
+
154
+ <!-- - **Training regime:** [More Information Needed] fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
155
+
156
+ <!-- #### Speeds, Sizes, Times [optional] -->
157
+
158
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
159
+
160
+ <!-- [More Information Needed] -->
161
+
162
+ <!-- ## Evaluation -->
163
+
164
+ <!-- This section describes the evaluation protocols and provides the results. -->
165
+
166
+ <!-- ### Testing Data, Factors & Metrics -->
167
+
168
+ <!-- #### Testing Data -->
169
+
170
+ <!-- This should link to a Dataset Card if possible. -->
171
+
172
+ <!-- [More Information Needed] -->
173
+
174
+ <!-- #### Factors -->
175
+
176
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
177
+
178
+ <!-- [More Information Needed] -->
179
+
180
+ <!-- #### Metrics -->
181
+
182
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
183
+
184
+ <!-- [More Information Needed] -->
185
+
186
+ <!-- ### Results -->
187
+
188
+ <!-- [More Information Needed] -->
189
+
190
+ <!-- #### Summary -->
191
+
192
+
193
+
194
+ <!-- ## Model Examination [optional] -->
195
+
196
+ <!-- Relevant interpretability work for the model goes here -->
197
+
198
+ <!-- [More Information Needed] -->
199
+
200
+ <!-- ## Technical Specifications [optional]
201
+
202
+ ### Model Architecture and Objective
203
+
204
+ [More Information Needed]
205
+
206
+ ### Compute Infrastructure
207
+
208
+ [More Information Needed]
209
+
210
+ #### Hardware
211
+
212
+ [More Information Needed]
213
+
214
+ #### Software
215
+
216
+ [More Information Needed]
217
+
218
+ ## Citation [optional] -->
219
+
220
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
221
+
222
+ <!-- **BibTeX:**
223
+
224
+ [More Information Needed]
225
+
226
+ **APA:**
227
+
228
+ [More Information Needed]
229
+
230
+ ## Glossary [optional] -->
231
+
232
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
233
+
234
+ <!-- [More Information Needed]
235
+
236
+ ## More Information [optional]
237
+
238
+ [More Information Needed]
239
+
240
+ ## Model Card Authors [optional]
241
+
242
+ [More Information Needed]
243
+
244
+ ## Model Card Contact
245
+
246
  [More Information Needed] -->