xavierwoon
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
2 |
datasets:
|
3 |
- xavierwoon/cestertrain
|
|
|
|
|
4 |
---
|
5 |
|
6 |
# Model Card for Model ID
|
7 |
|
8 |
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
|
10 |
-
|
11 |
|
12 |
## Model Details
|
13 |
|
@@ -15,63 +21,98 @@ This modelcard aims to be a base template for new models. It has been generated
|
|
15 |
|
16 |
<!-- Provide a longer summary of what this model is. -->
|
17 |
|
|
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
|
32 |
- **Repository:** [More Information Needed]
|
33 |
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
-
## Uses
|
37 |
|
38 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
|
40 |
-
### Direct Use
|
41 |
|
42 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
|
44 |
-
[More Information Needed]
|
45 |
|
46 |
-
### Downstream Use [optional]
|
47 |
|
48 |
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
|
50 |
-
[More Information Needed]
|
51 |
|
52 |
-
### Out-of-Scope Use
|
53 |
|
54 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
|
56 |
-
[More Information Needed]
|
57 |
|
58 |
## Bias, Risks, and Limitations
|
59 |
|
60 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
|
62 |
-
|
63 |
|
64 |
### Recommendations
|
65 |
|
66 |
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
|
68 |
-
|
69 |
|
70 |
## How to Get Started with the Model
|
71 |
|
72 |
Use the code below to get started with the model.
|
73 |
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
## Training Details
|
77 |
|
@@ -79,78 +120,70 @@ Use the code below to get started with the model.
|
|
79 |
|
80 |
<!-- 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. -->
|
81 |
|
82 |
-
|
83 |
|
84 |
### Training Procedure
|
85 |
|
86 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
|
88 |
-
|
|
|
|
|
89 |
|
90 |
-
|
91 |
|
|
|
|
|
92 |
|
93 |
-
#### Training Hyperparameters
|
94 |
|
95 |
-
- **Training regime:** [More Information Needed]
|
96 |
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
|
99 |
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
|
101 |
-
[More Information Needed]
|
102 |
|
103 |
-
## Evaluation
|
104 |
|
105 |
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
|
109 |
-
#### Testing Data
|
110 |
|
111 |
<!-- This should link to a Dataset Card if possible. -->
|
112 |
|
113 |
-
[More Information Needed]
|
114 |
|
115 |
-
#### Factors
|
116 |
|
117 |
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
|
119 |
-
[More Information Needed]
|
120 |
|
121 |
-
#### Metrics
|
122 |
|
123 |
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
|
125 |
-
[More Information Needed]
|
126 |
|
127 |
-
### Results
|
128 |
|
129 |
-
[More Information Needed]
|
130 |
|
131 |
-
#### Summary
|
132 |
|
133 |
|
134 |
|
135 |
-
## Model Examination [optional]
|
136 |
|
137 |
<!-- Relevant interpretability work for the model goes here -->
|
138 |
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
|
155 |
### Model Architecture and Objective
|
156 |
|
@@ -168,11 +201,11 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
168 |
|
169 |
[More Information Needed]
|
170 |
|
171 |
-
## Citation [optional]
|
172 |
|
173 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
|
175 |
-
**BibTeX:**
|
176 |
|
177 |
[More Information Needed]
|
178 |
|
@@ -180,11 +213,11 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
180 |
|
181 |
[More Information Needed]
|
182 |
|
183 |
-
## Glossary [optional]
|
184 |
|
185 |
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
|
187 |
-
[More Information Needed]
|
188 |
|
189 |
## More Information [optional]
|
190 |
|
@@ -196,4 +229,4 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
196 |
|
197 |
## Model Card Contact
|
198 |
|
199 |
-
[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 |
---
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
229 |
|
230 |
## Model Card Contact
|
231 |
|
232 |
+
[More Information Needed] -->
|