bunyaminergen commited on
Commit
02ca28f
·
1 Parent(s): 5b3d066
Files changed (1) hide show
  1. README.md +150 -130
README.md CHANGED
@@ -4,206 +4,226 @@ base_model_relation: finetune
4
  library_name: peft
5
  language:
6
  - en
7
- thumbnail: url to a thumbnail used in social sharing
8
  tags:
9
  - code
 
 
 
 
10
  license: gpl-3.0
11
  datasets:
12
  - bunyaminergen/Stable-Code-Python-SFT
13
  pipeline_tag: text-generation
 
14
  ---
15
 
16
- # Model Card for Model ID
17
 
18
- <!-- Provide a quick summary of what the model is/does. -->
 
 
 
19
 
20
- ## Model Details
 
21
 
22
- ### Model Description
23
-
24
- <!-- Provide a longer summary of what this model is. -->
25
-
26
- - **Developed by:** [More Information Needed]
27
- - **Funded by [optional]:** [More Information Needed]
28
- - **Shared by [optional]:** [More Information Needed]
29
- - **Model type:** [More Information Needed]
30
- - **Language(s) (NLP):** [More Information Needed]
31
- - **License:** [More Information Needed]
32
- - **Finetuned from model [optional]:** [More Information Needed]
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
- [More Information Needed]
69
-
70
- ### Recommendations
71
-
72
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
-
74
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More
75
- information needed for further recommendations.
76
-
77
- ## How to Get Started with the Model
78
-
79
- Use the code below to get started with the model.
80
 
81
- [More Information Needed]
82
 
83
- ## Training Details
 
 
 
 
 
 
 
 
84
 
85
- ### Training Data
86
 
87
- <!-- 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. -->
 
 
 
 
 
88
 
89
- [More Information Needed]
 
 
90
 
91
- ### Training Procedure
 
 
92
 
93
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
 
 
 
94
 
95
- #### Preprocessing [optional]
 
 
96
 
97
- [More Information Needed]
 
98
 
99
- #### Training Hyperparameters
 
 
100
 
101
- - **Training regime:
102
- ** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
 
103
 
104
- #### Speeds, Sizes, Times [optional]
105
 
106
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
107
 
108
- [More Information Needed]
109
 
110
- ## Evaluation
111
 
112
- <!-- This section describes the evaluation protocols and provides the results. -->
113
 
114
- ### Testing Data, Factors & Metrics
 
115
 
116
- #### Testing Data
117
 
118
- <!-- This should link to a Dataset Card if possible. -->
 
 
 
 
 
 
 
 
 
119
 
120
- [More Information Needed]
121
 
122
- #### Factors
 
 
 
 
123
 
124
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
125
 
126
- [More Information Needed]
 
 
 
 
127
 
128
- #### Metrics
 
 
129
 
130
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
131
 
132
- [More Information Needed]
133
 
134
- ### Results
135
 
136
- [More Information Needed]
 
137
 
138
- #### Summary
 
 
 
139
 
140
- ## Model Examination [optional]
 
141
 
142
- <!-- Relevant interpretability work for the model goes here -->
 
143
 
144
- [More Information Needed]
 
145
 
146
- ## Environmental Impact
 
 
 
147
 
148
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
 
 
149
 
150
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute)
151
- presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
152
 
153
- - **Hardware Type:** [More Information Needed]
154
- - **Hours used:** [More Information Needed]
155
- - **Cloud Provider:** [More Information Needed]
156
- - **Compute Region:** [More Information Needed]
157
- - **Carbon Emitted:** [More Information Needed]
158
 
159
- ## Technical Specifications [optional]
 
160
 
161
- ### Model Architecture and Objective
 
 
 
162
 
163
- [More Information Needed]
 
164
 
165
- ### Compute Infrastructure
 
 
166
 
167
- [More Information Needed]
168
 
169
- #### Hardware
170
 
171
- [More Information Needed]
172
 
173
- #### Software
174
 
175
- [More Information Needed]
176
 
177
- ## Citation [optional]
178
 
179
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
180
 
181
- **BibTeX:**
182
 
183
- [More Information Needed]
184
 
185
- **APA:**
186
 
187
- [More Information Needed]
188
 
189
- ## Glossary [optional]
 
 
190
 
191
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
192
 
193
- [More Information Needed]
194
 
195
- ## More Information [optional]
196
 
197
- [More Information Needed]
198
 
199
- ## Model Card Authors [optional]
200
 
201
- [More Information Needed]
202
 
203
- ## Model Card Contact
204
 
205
- [More Information Needed]
206
 
207
- ### Framework versions
 
 
 
 
 
 
 
208
 
209
- - PEFT 0.15.1
 
4
  library_name: peft
5
  language:
6
  - en
 
7
  tags:
8
  - code
9
+ - codeqwen
10
+ - chat
11
+ - qwen
12
+ - qwen-coder
13
  license: gpl-3.0
14
  datasets:
15
  - bunyaminergen/Stable-Code-Python-SFT
16
  pipeline_tag: text-generation
17
+ license_link: https://huggingface.co/bunyaminergen/Qwen2.5-Coder-1.5B-Instruct-SFT/blob/main/LICENSE
18
  ---
19
 
20
+ # Qwen2.5-Coder-1.5B-Instruct-SFT
21
 
22
+ The Qwen2.5-Coder-1.5B-Instruct-SFT model has been fine-tuned using Supervised Fine Tuning (SFT) method specifically to
23
+ enhance its performance in generating docstrings, a critical task in coding. Currently, it generates docstrings
24
+ following the Google style guide. For differences compared to the base (pre-trained) model, please refer to
25
+ the [Comparison](#comparison) section.
26
 
27
+ **Note**: _If you would like to contribute to this repository,
28
+ please read the [CONTRIBUTING](CONTRIBUTING.md) first._
29
 
30
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ ### TableofContents
33
 
34
+ - [Usage](#usage)
35
+ - [Comparison](#comparison)
36
+ - [Dataset](#dataset)
37
+ - [Documentations](#documentations)
38
+ - [License](#licence)
39
+ - [Links](#links)
40
+ - [Team](#team)
41
+ - [Contact](#contact)
42
+ - [Citation](#citation)
43
 
44
+ ### Usage
45
 
46
+ ```python
47
+ from wavlmmsdd.audio.diarization.diarize import Diarizer
48
+ from wavlmmsdd.audio.feature.embedding import WavLMSV
49
+ from wavlmmsdd.audio.preprocess.resample import Resample
50
+ from wavlmmsdd.audio.preprocess.convert import Convert
51
+ from wavlmmsdd.audio.utils.utils import Build
52
 
53
+ def main():
54
+ # Audio Path
55
+ audio_path = "ae.wav"
56
 
57
+ # Resample to 16000 Khz
58
+ resampler = Resample(audio_file=audio_path)
59
+ wave_16k, sr_16k = resampler.to_16k()
60
 
61
+ # Convert to Mono
62
+ converter = Convert(waveform=wave_16k, sample_rate=sr_16k)
63
+ converter.to_mono()
64
+ saved_path = converter.save()
65
 
66
+ # Build Manifest File
67
+ builder = Build(saved_path)
68
+ manifest_path = builder.manifest()
69
 
70
+ # Embedding
71
+ embedder = WavLMSV()
72
 
73
+ # Diarization
74
+ diarizer = Diarizer(embedding=embedder, manifest_path=manifest_path)
75
+ diarizer.run()
76
 
77
+ if __name__ == "__main__":
78
+ main()
79
+ ```
80
 
81
+ ---
82
 
83
+ ### Comparison
84
 
85
+ ##### Base Model
86
 
87
+ `System:` You are a Python programmer.
88
 
89
+ `User:` Give me a quick an example of bubble sort in Python.
90
 
91
+ `Assistant:` Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent
92
+ elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.
93
 
94
+ Here's a basic implementation of Bubble Sort in Python:
95
 
96
+ ```python
97
+ def bubble_sort(arr):
98
+ n = len(arr)
99
+ # Traverse through all array elements
100
+ for i in range(n):
101
+ # Last i elements are already in place
102
+ for j in range(0, n - i - 1):
103
+ # Swap if the element found is greater than the next element
104
+ if arr[j] > arr[j + 1]:
105
+ arr[j], arr[j + 1] = arr[j + 1], arr[j]
106
 
 
107
 
108
+ # Example usage:
109
+ arr = [64, 34, 25, 12, 22, 11, 90]
110
+ bubble_sort(arr)
111
+ print("Sorted array:", arr)
112
+ ```
113
 
114
+ In this example:
115
 
116
+ - We define a function `bubble_sort` that takes an array as input.
117
+ - Inside the function, we use two nested loops to iterate over each pair of adjacent elements in the array.
118
+ - If the current element (`arr[j]`) is greater than the next element (`arr[j+1]`), we swap them.
119
+ - This process continues until no more swaps are needed, indicating that the array is sorted.
120
+ - Finally, we demonstrate how to use the `bubble_sort` function by sorting an array and printing the sorted result.
121
 
122
+ Bubble Sort has a time complexity of O(n^2) in the worst case scenario, making it less efficient than other sorting
123
+ algorithms like QuickSort or MergeSort. However, it is easy to understand and implement, which makes it suitable for
124
+ small data sets or educational purposes.
125
 
126
+ ##### Supervised Fine Tuned Model
127
 
128
+ `System:` You are a Python programmer.
129
 
130
+ `User:` Give me a quick an example of bubble sort in Python.
131
 
132
+ `Assistant:` Here's a simple implementation of the Bubble Sort algorithm in Python, along with its docstring following
133
+ Google Python Style Guide:
134
 
135
+ ```python
136
+ def bubble_sort(arr):
137
+ """
138
+ Bubble sorts an array of integers in ascending order.
139
 
140
+ Args:
141
+ arr (list): A list of integers to be sorted.
142
 
143
+ Returns:
144
+ list: The sorted list of integers.
145
 
146
+ Raises:
147
+ TypeError: If the input is not a list or contains non-integer elements.
148
 
149
+ Examples:
150
+ >>> bubble_sort([5, 3, 1, 4, 6])
151
+ [1, 3, 4, 5, 6]
152
+ """
153
 
154
+ # Check if the input is a list and contains only integers
155
+ if not isinstance(arr, list) or not all(isinstance(x, int) for x in arr):
156
+ raise TypeError("Input must be a list of integers.")
157
 
158
+ n = len(arr)
 
159
 
160
+ # Traverse through all array elements
161
+ for i in range(n):
 
 
 
162
 
163
+ # Last i elements are already in place
164
+ for j in range(0, n - i - 1):
165
 
166
+ # Traverse the array from 0 to n-i-1
167
+ # Swap if the element found is greater than the next element
168
+ if arr[j] > arr[j + 1]:
169
+ arr[j], arr[j + 1] = arr[j + 1], arr[j]
170
 
171
+ return arr
172
+ ```
173
 
174
+ This implementation follows the Bubble Sort algorithm, which repeatedly steps through the list, compares adjacent
175
+ elements, and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.
176
+ This implementation includes error handling and examples for usage.
177
 
178
+ ---
179
 
180
+ ### Dataset
181
 
182
+ - [bunyaminergen/Stable-Code-Python-SFT](https://huggingface.co/datasets/bunyaminergen/Stable-Code-Python-SFT)
183
 
184
+ ---
185
 
186
+ ### Documentations
187
 
188
+ - [CONTRIBUTING](CONTRIBUTING.md)
189
 
190
+ ---
191
 
192
+ ### Licence
193
 
194
+ - [LICENSE](LICENSE)
195
 
196
+ ---
197
 
198
+ ### Links
199
 
200
+ - [Github](https://github.com/bunyaminergen/)
201
+ - [Website](https://bunyaminergen.com)
202
+ - [Linkedin](https://www.linkedin.com/in/bunyaminergen)
203
 
204
+ ---
205
 
206
+ ### Team
207
 
208
+ - [Bunyamin Ergen](https://www.linkedin.com/in/bunyaminergen)
209
 
210
+ ---
211
 
212
+ ### Contact
213
 
214
+ - [Mail](mailto:[email protected])
215
 
216
+ ---
217
 
218
+ ### Citation
219
 
220
+ ```bibtex
221
+ @software{ Qwen2.5-Coder-1.5B-Instruct-SFT,
222
+ author = {Bunyamin Ergen},
223
+ title = {{Qwen2.5-Coder-1.5B-Instruct-SFT}},
224
+ year = {2025},
225
+ month = {04},
226
+ }
227
+ ```
228
 
229
+ ---