Update README.md
Browse files
README.md
CHANGED
@@ -1,196 +1,141 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
2 |
pipeline_tag: text-generation
|
3 |
tags:
|
4 |
- code
|
|
|
|
|
|
|
5 |
---
|
6 |
-
# Model Card for
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
11 |
|
12 |
## Model Details
|
13 |
|
14 |
### Model Description
|
15 |
|
16 |
-
|
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 |
-
|
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 |
-
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
|
46 |
-
### Downstream Use
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
|
52 |
### Out-of-Scope Use
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
## Training Details
|
77 |
|
78 |
### Training Data
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
|
|
|
|
|
|
89 |
|
90 |
-
|
91 |
|
|
|
|
|
|
|
|
|
92 |
|
93 |
-
|
94 |
|
95 |
-
- **
|
|
|
|
|
96 |
|
97 |
-
|
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 |
-
|
110 |
-
|
111 |
-
|
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 |
-
|
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 |
-
|
144 |
-
- **Hardware Type:** [More Information Needed]
|
145 |
-
- **Hours used:** [More Information Needed]
|
146 |
-
- **Cloud Provider:** [More Information Needed]
|
147 |
-
- **Compute Region:** [More Information Needed]
|
148 |
-
- **Carbon Emitted:** [More Information Needed]
|
149 |
-
|
150 |
-
## Technical Specifications [optional]
|
151 |
-
|
152 |
-
### Model Architecture and Objective
|
153 |
-
|
154 |
-
[More Information Needed]
|
155 |
-
|
156 |
-
### Compute Infrastructure
|
157 |
-
|
158 |
-
[More Information Needed]
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
[More Information Needed]
|
163 |
-
|
164 |
-
#### Software
|
165 |
-
|
166 |
-
[More Information Needed]
|
167 |
|
168 |
-
## Citation
|
169 |
|
170 |
-
|
171 |
|
172 |
**BibTeX:**
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
183 |
-
|
184 |
-
[More Information Needed]
|
185 |
-
|
186 |
-
## More Information [optional]
|
187 |
-
|
188 |
-
[More Information Needed]
|
189 |
-
|
190 |
-
## Model Card Authors [optional]
|
191 |
-
|
192 |
-
[More Information Needed]
|
193 |
|
194 |
## Model Card Contact
|
195 |
|
196 |
-
|
|
|
|
1 |
---
|
2 |
+
license: llama2
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
base_model:
|
6 |
+
- meta-llama/CodeLlama-13b-hf
|
7 |
pipeline_tag: text-generation
|
8 |
tags:
|
9 |
- code
|
10 |
+
- gguf
|
11 |
+
- llama.cpp
|
12 |
+
- llmstudio
|
13 |
---
|
14 |
+
# Model Card for TestGen-Dart v0.2 (GGUF Version)
|
15 |
|
16 |
+
This model card provides information about **TestGen-Dart v0.2 (GGUF Version)**, a fine-tuned version of Meta's Code Llama 13B model, optimized for generating unit tests in Dart for mobile applications. This GGUF-quantized model is designed to run efficiently with frameworks like **LLMStudio** and **llama.cpp**, enabling deployment on resource-constrained hardware while maintaining robust performance.
|
17 |
|
18 |
+
---
|
19 |
|
20 |
## Model Details
|
21 |
|
22 |
### Model Description
|
23 |
|
24 |
+
**TestGen-Dart v0.2** is a fine-tuned version of Code Llama 13B, specifically adapted for generating unit test cases for Dart code. The GGUF quantization enables its use on lightweight, consumer-grade systems without significant performance loss.
|
|
|
25 |
|
26 |
+
- **Developed by:** Jacob Hoffmann, Demian Frister (Karlsruhe Institute of Technology - KIT, AIFB-BIS)
|
27 |
+
- **Funded by:** Helmholtz Association's Initiative and Networking Fund on the HAICORE@FZJ partition
|
28 |
+
- **Shared by:** Jacob Hoffmann, Demian Frister
|
29 |
+
- **Model type:** Fine-tuned Code Llama 13B for test generation in Dart
|
30 |
+
- **Language(s):** English
|
31 |
+
- **License:** LLaMA 2 Community License
|
32 |
+
- **Finetuned from model:** Meta's Code Llama 13B
|
33 |
|
34 |
+
### Model Sources
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
- **Repository:** [GitHub Repository](https://github.com/example/repo) (placeholder)
|
37 |
+
- **Paper:** ["Generating Software Tests for Mobile Applications Using Fine-Tuned Large Language Models"](https://doi.org/10.1145/3644032.3644454) (published in AST '24)
|
38 |
+
- **Demo:** Coming soon
|
39 |
|
40 |
+
---
|
|
|
|
|
|
|
|
|
41 |
|
42 |
## Uses
|
43 |
|
|
|
|
|
44 |
### Direct Use
|
45 |
|
46 |
+
The model can be used in a zero-shot setting with **llama.cpp** or **LLMStudio** to generate unit tests in Dart. Provide the class code as input, and the model outputs structured unit tests using Dart's `test` package.
|
|
|
|
|
47 |
|
48 |
+
### Downstream Use
|
49 |
|
50 |
+
This model is suitable for integration into developer tools, IDE extensions, or continuous integration pipelines to automate test generation for Dart-based applications.
|
|
|
|
|
51 |
|
52 |
### Out-of-Scope Use
|
53 |
|
54 |
+
- Do not use this model for tasks unrelated to Dart test generation.
|
55 |
+
- Avoid using this model to improve or train other LLMs not based on LLaMA or its derivatives, per the LLaMA 2 Community License.
|
56 |
+
- Misuse for malicious purposes, such as generating incorrect or harmful test cases, is prohibited.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
---
|
|
|
|
|
59 |
|
60 |
+
## Running the GGUF Model with llama.cpp
|
61 |
+
|
62 |
+
To use this GGUF quantized model with llama.cpp:
|
63 |
+
|
64 |
+
1. Clone the llama.cpp repository and build the binaries:
|
65 |
+
```bash
|
66 |
+
git clone https://github.com/ggerganov/llama.cpp
|
67 |
+
cd llama.cpp
|
68 |
+
make
|
69 |
+
```
|
70 |
+
2. Place the GGUF file in the models directory:
|
71 |
+
```bash
|
72 |
+
mkdir -p models/testgen-dart-v0.2
|
73 |
+
mv /path/to/CodeLlama-13B-TestGen-Dart_v0.2.gguf models/testgen-dart-v0.2/
|
74 |
+
```
|
75 |
+
3. Run the model:
|
76 |
+
```bash
|
77 |
+
./main -m models/testgen-dart-v0.2/CodeLlama-13B-TestGen-Dart_v0.2.gguf --prompt "Generate unit tests in Dart for the following class:\nclass Calculator { int add(int a, int b) { return a + b; } }"
|
78 |
+
```
|
79 |
+
|
80 |
## Training Details
|
81 |
|
82 |
### Training Data
|
83 |
|
84 |
+
The fine-tuning dataset consists of **16,252 Dart code-test pairs** extracted from open-source GitHub repositories using Google BigQuery. The data was subjected to quality filtering and deduplication to ensure high relevance and consistency.
|
|
|
|
|
|
|
|
|
85 |
|
86 |
+
### Training Procedure
|
87 |
|
88 |
+
- **Fine-tuning Approach:** Supervised Fine-Tuning (SFT) with QLoRA for memory efficiency.
|
89 |
+
- **Hardware:** Training was conducted on a single NVIDIA A100 GPU.
|
90 |
+
- **Optimization:** Flash Attention 2 was utilized for enhanced performance.
|
91 |
+
- **Duration:** The training process ran for up to 32 hours.
|
92 |
|
93 |
+
### Training Hyperparameters
|
94 |
|
95 |
+
- **Mixed Precision:** FP16
|
96 |
+
- **Optimizer:** AdamW
|
97 |
+
- **Learning Rate:** 5e-5
|
98 |
+
- **Epochs:** 3
|
99 |
|
100 |
+
### Environmental Impact
|
101 |
|
102 |
+
- **Hardware Type:** NVIDIA A100 GPU
|
103 |
+
- **Hours Used:** 32 hours
|
104 |
+
- **Carbon Emitted:** 13.099 kgCO2eq
|
105 |
|
106 |
+
---
|
|
|
|
|
|
|
|
|
107 |
|
108 |
## Evaluation
|
109 |
|
|
|
|
|
110 |
### Testing Data, Factors & Metrics
|
111 |
|
112 |
+
- **Testing Data:** A subset of **42 Dart files** from the training dataset, evaluated in a zero-shot setting.
|
113 |
+
- **Factors:** Syntax correctness, functional correctness.
|
114 |
+
- **Metrics:** pass@1, syntax error rate, functional correctness rate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
### Results
|
117 |
|
118 |
+
- **Syntax Correctness:** +76% improvement compared to the base model.
|
119 |
+
- **Functional Correctness:** +16.67% improvement compared to the base model.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
+
## Citation
|
124 |
|
125 |
+
If you use this model in your research, please cite:
|
126 |
|
127 |
**BibTeX:**
|
128 |
+
```bibtex
|
129 |
+
@inproceedings{hoffmann2024testgen,
|
130 |
+
title={Generating Software Tests for Mobile Applications Using Fine-Tuned Large Language Models},
|
131 |
+
author={Hoffmann, Jacob and Frister, Demian},
|
132 |
+
booktitle={Proceedings of the 5th ACM/IEEE International Conference on Automation of Software Test (AST 2024)},
|
133 |
+
year={2024},
|
134 |
+
doi={10.1145/3644032.3644454}
|
135 |
+
}
|
136 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
## Model Card Contact
|
139 |
|
140 |
+
- **Jacob Hoffmann**: [[email protected]](mailto:[email protected])
|
141 |
+
- **Demian Frister**: [[email protected]](mailto:[email protected])
|