richterdc commited on
Commit
69ef86d
·
verified ·
1 Parent(s): 3db4b5e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +86 -87
README.md CHANGED
@@ -1,199 +1,198 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
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
 
14
  ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
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
  ### Model Sources [optional]
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
- [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
- Use the code below to get started with the model.
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  ## Training Details
77
 
78
  ### Training Data
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
- [More Information Needed]
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
  #### Preprocessing [optional]
89
 
90
- [More Information Needed]
91
-
92
 
93
  #### Training Hyperparameters
94
 
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
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
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
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
 
157
- [More Information Needed]
158
 
159
  ### Compute Infrastructure
160
 
161
- [More Information Needed]
162
 
163
  #### Hardware
164
 
165
- [More Information Needed]
166
 
167
  #### Software
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
 
179
  **APA:**
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
 
191
- [More Information Needed]
192
 
193
  ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
196
 
197
  ## Model Card Contact
198
 
199
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ base_model:
4
+ - deepseek-ai/deepseek-coder-1.3b-instruct
5
  ---
6
 
7
+ # Model Card for richterdc/deepseek-coder-finetuned-tdd
 
 
 
8
 
9
+ This model is fine-tuned to help developers generate test cases from code or plain language descriptions. It is designed to support Test-Driven Development (TDD) by suggesting tests that can improve code quality.
10
 
11
  ## Model Details
12
 
13
  ### Model Description
14
 
15
+ This model has been fine-tuned to generate test cases for software code. It takes in code snippets or descriptions of functionality and suggests relevant tests. The model uses the Hugging Face Transformers library and is deployed as a Flask API. It is built for fast inference with GPU support and is intended to help developers by automating part of the TDD process.
16
 
17
+ - **Developed by:** Richter Dela Cruz
18
+ - **Funded by [optional]:** Angelo Richter L. Dela Cruz, Alyza Reynado, Gabriel Luis Bacosa, and Joseph Bryan Eusebio
19
+ - **Shared by [optional]:** Angelo Richter L. Dela Cruz
20
+ - **Model type:** Causal language model for code generation and understanding
21
+ - **Language(s) (NLP):** English (for code and comments)
22
+ - **License:** Not specified
23
+ - **Finetuned from model [optional]:** Fine-tuned from a base code generation model (details not fully specified)
 
 
24
 
25
  ### Model Sources [optional]
26
 
27
+ - **Repository:** [https://github.com/RichterDelaCruz/tdd-deployment](https://github.com/RichterDelaCruz/tdd-deployment)
28
+ - **Paper [optional]:** Not provided
29
+ - **Demo [optional]:** See the API demo instructions in the repository
 
 
30
 
31
  ## Uses
32
 
 
 
33
  ### Direct Use
34
 
35
+ The model can be used to generate test cases directly from code snippets or textual descriptions. This is useful for developers who want to quickly get ideas for tests to cover their code.
 
 
36
 
37
  ### Downstream Use [optional]
38
 
39
+ The model can also be integrated into larger development pipelines or fine-tuned further for specific applications. For example, it can be used within continuous integration systems to suggest tests for new code changes.
 
 
40
 
41
  ### Out-of-Scope Use
42
 
43
+ This model is not designed for generating security-critical tests or for replacing thorough human testing. It may not capture all edge cases and should not be solely relied upon for complete test coverage.
 
 
44
 
45
  ## Bias, Risks, and Limitations
46
 
47
+ - The model may generate test cases that are too generic or miss specific edge cases.
48
+ - It might produce plausible-looking tests that require manual review.
49
+ - Its performance may vary depending on the complexity of the input code or description.
50
 
51
  ### Recommendations
52
 
53
+ Users should always review the generated test cases before using them in production. Fine-tuning on domain-specific data is recommended to improve relevance and accuracy.
 
 
54
 
55
  ## How to Get Started with the Model
56
 
57
+ 1. **Clone the Repository:**
58
+
59
+ ```bash
60
+ git clone https://github.com/RichterDelaCruz/tdd-deployment.git
61
+ cd tdd-deployment
62
+ ```
63
+
64
+ 2. **Install Dependencies:**
65
+
66
+ ```bash
67
+ pip install -r requirements.txt
68
+ ```
69
+
70
+ 3. **Run the Flask API:**
71
 
72
+ ```bash
73
+ python generate-test.py
74
+ ```
75
+
76
+ 4. **Test the API:**
77
+
78
+ Use `curl` or any API testing tool:
79
+
80
+ ```bash
81
+ curl -X POST "http://localhost:8000/generate" \
82
+ -H "Content-Type: application/json" \
83
+ -d '{"input_text": "Write a Python function to add two numbers"}'
84
+ ```
85
 
86
  ## Training Details
87
 
88
  ### Training Data
89
 
90
+ The exact details of the training data are not provided. It likely consists of publicly available code repositories and associated test cases.
 
 
91
 
92
  ### Training Procedure
93
 
94
+ The model was fine-tuned using standard practices for causal language models on a dataset of code and test cases.
95
 
96
  #### Preprocessing [optional]
97
 
98
+ Preprocessing steps were applied to prepare the code and test case data, though specific details are not provided.
 
99
 
100
  #### Training Hyperparameters
101
 
102
+ - **Training regime:** Standard fine-tuning for causal language models (e.g., using PyTorch with mixed precision)
103
 
104
  #### Speeds, Sizes, Times [optional]
105
 
106
+ The model is optimized for GPU inference and has been tested on hardware such as the RTX 3090 for scalability.
 
 
107
 
108
  ## Evaluation
109
 
 
 
110
  ### Testing Data, Factors & Metrics
111
 
112
  #### Testing Data
113
 
114
+ Details about the testing dataset are not provided. Evaluation likely used code examples and corresponding expected test cases.
 
 
115
 
116
  #### Factors
117
 
118
+ Evaluations may consider code complexity, coverage, and the correctness of the generated tests.
 
 
119
 
120
  #### Metrics
121
 
122
+ Metrics might include improvements in test coverage or the accuracy of the suggested test cases, though specific metrics are not documented.
 
 
123
 
124
  ### Results
125
 
126
+ Evaluation results are not comprehensively documented. Users are encouraged to evaluate the model based on their own codebases.
127
 
128
  #### Summary
129
 
130
+ The model is effective at generating plausible test cases for a variety of code snippets, though manual review is recommended to ensure correctness and completeness.
131
 
132
  ## Model Examination [optional]
133
 
134
+ No detailed interpretability or analysis work has been provided for this model.
 
 
135
 
136
  ## Environmental Impact
137
 
138
+ Carbon emissions for model training and inference can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute).
139
 
140
+ - **Hardware Type:** RTX 3090 or similar GPU
141
+ - **Hours used:** Varies by deployment
142
+ - **Cloud Provider:** Vast.ai (or any provider with CUDA support)
143
+ - **Compute Region:** Not specified
144
+ - **Carbon Emitted:** Not specified (estimate using the ML Impact calculator)
 
 
145
 
146
  ## Technical Specifications [optional]
147
 
148
  ### Model Architecture and Objective
149
 
150
+ This model is based on a causal language model architecture, fine-tuned specifically for code generation and test case creation. Its objective is to assist developers in following Test-Driven Development practices.
151
 
152
  ### Compute Infrastructure
153
 
154
+ The model is deployed as a Flask API using gunicorn for scalability, with PyTorch handling model inference.
155
 
156
  #### Hardware
157
 
158
+ The model runs on both CPU and GPU, with best performance observed on GPUs.
159
 
160
  #### Software
161
 
162
+ Built using Python, Flask, PyTorch, and Hugging Face Transformers.
163
 
164
  ## Citation [optional]
165
 
 
 
166
  **BibTeX:**
167
 
168
+ ```bibtex
169
+ @misc{richterdc2025tdd,
170
+ author = {Richter Dela Cruz},
171
+ title = {richterdc/deepseek-coder-finetuned-tdd},
172
+ year = {2025},
173
+ publisher = {GitHub},
174
+ howpublished = {\url{https://github.com/RichterDelaCruz/tdd-deployment}}
175
+ }
176
+ ```
177
 
178
  **APA:**
179
 
180
+ Richter Dela Cruz. (2025). *richterdc/deepseek-coder-finetuned-tdd*. GitHub. Retrieved from https://github.com/RichterDelaCruz/tdd-deployment
181
 
182
  ## Glossary [optional]
183
 
184
+ - **Test-Driven Development (TDD):** A development approach where tests are written before the code to ensure functionality.
185
+ - **Flask:** A Python web framework used for building APIs.
186
+ - **Transformers:** A library by Hugging Face for working with state-of-the-art language models.
187
 
188
  ## More Information [optional]
189
 
190
+ For further details, visit the [repository](https://github.com/RichterDelaCruz/tdd-deployment).
191
 
192
  ## Model Card Authors [optional]
193
 
194
+ Angelo Richter L. Dela Cruz, Alyza Reynado, Gabriel Luis Bacosa, and Joseph Bryan Eusebio
195
 
196
  ## Model Card Contact
197
 
198
+ For inquiries or contributions, please reach out via [GitHub](https://github.com/RichterDelaCruz).