Update README.md
Browse files
README.md
CHANGED
@@ -3,17 +3,22 @@ library_name: transformers
|
|
3 |
datasets:
|
4 |
- bigcode/the-stack-v2
|
5 |
license: bigcode-openrail-m
|
|
|
|
|
6 |
---
|
7 |
|
8 |
-
#
|
9 |
|
10 |
<!-- Provide a quick summary of what the model is/does. -->
|
11 |
|
|
|
|
|
|
|
12 |
|
|
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
|
18 |
### How to use
|
19 |
```python
|
@@ -53,189 +58,24 @@ You will get as an output three elements:
|
|
53 |
- raw_hidden_states: raw representation from all the hidden states of the model, without pooling, normalization, and projection
|
54 |
- attentions: attention scores from the encoder
|
55 |
|
56 |
-
|
|
|
57 |
|
58 |
<!-- Provide a longer summary of what this model is. -->
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
-
|
76 |
-
- **Demo [optional]:** [More Information Needed]
|
77 |
-
|
78 |
-
## Uses
|
79 |
-
|
80 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
81 |
-
|
82 |
-
### Direct Use
|
83 |
-
|
84 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
85 |
-
|
86 |
-
[More Information Needed]
|
87 |
-
|
88 |
-
### Downstream Use [optional]
|
89 |
-
|
90 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
91 |
-
|
92 |
-
[More Information Needed]
|
93 |
-
|
94 |
-
### Out-of-Scope Use
|
95 |
-
|
96 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
97 |
-
|
98 |
-
[More Information Needed]
|
99 |
-
|
100 |
-
## Bias, Risks, and Limitations
|
101 |
-
|
102 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
103 |
-
|
104 |
-
[More Information Needed]
|
105 |
-
|
106 |
-
### Recommendations
|
107 |
-
|
108 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
109 |
-
|
110 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
111 |
-
|
112 |
-
## How to Get Started with the Model
|
113 |
-
|
114 |
-
Use the code below to get started with the model.
|
115 |
-
|
116 |
-
[More Information Needed]
|
117 |
-
|
118 |
-
## Training Details
|
119 |
-
|
120 |
-
### Training Data
|
121 |
-
|
122 |
-
<!-- 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. -->
|
123 |
-
|
124 |
-
[More Information Needed]
|
125 |
-
|
126 |
-
### Training Procedure
|
127 |
-
|
128 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
129 |
-
|
130 |
-
#### Preprocessing [optional]
|
131 |
-
|
132 |
-
[More Information Needed]
|
133 |
-
|
134 |
-
|
135 |
-
#### Training Hyperparameters
|
136 |
-
|
137 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
138 |
-
|
139 |
-
#### Speeds, Sizes, Times [optional]
|
140 |
-
|
141 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
142 |
-
|
143 |
-
[More Information Needed]
|
144 |
-
|
145 |
-
## Evaluation
|
146 |
-
|
147 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
148 |
-
|
149 |
-
### Testing Data, Factors & Metrics
|
150 |
-
|
151 |
-
#### Testing Data
|
152 |
-
|
153 |
-
<!-- This should link to a Dataset Card if possible. -->
|
154 |
-
|
155 |
-
[More Information Needed]
|
156 |
-
|
157 |
-
#### Factors
|
158 |
-
|
159 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Metrics
|
164 |
-
|
165 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
166 |
-
|
167 |
-
[More Information Needed]
|
168 |
-
|
169 |
-
### Results
|
170 |
-
|
171 |
-
[More Information Needed]
|
172 |
-
|
173 |
-
#### Summary
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
## Model Examination [optional]
|
178 |
-
|
179 |
-
<!-- Relevant interpretability work for the model goes here -->
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Environmental Impact
|
184 |
-
|
185 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
186 |
-
|
187 |
-
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).
|
188 |
-
|
189 |
-
- **Hardware Type:** [More Information Needed]
|
190 |
-
- **Hours used:** [More Information Needed]
|
191 |
-
- **Cloud Provider:** [More Information Needed]
|
192 |
-
- **Compute Region:** [More Information Needed]
|
193 |
-
- **Carbon Emitted:** [More Information Needed]
|
194 |
-
|
195 |
-
## Technical Specifications [optional]
|
196 |
-
|
197 |
-
### Model Architecture and Objective
|
198 |
-
|
199 |
-
[More Information Needed]
|
200 |
-
|
201 |
-
### Compute Infrastructure
|
202 |
-
|
203 |
-
[More Information Needed]
|
204 |
-
|
205 |
-
#### Hardware
|
206 |
-
|
207 |
-
[More Information Needed]
|
208 |
-
|
209 |
-
#### Software
|
210 |
-
|
211 |
-
[More Information Needed]
|
212 |
-
|
213 |
-
## Citation [optional]
|
214 |
-
|
215 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
216 |
-
|
217 |
-
**BibTeX:**
|
218 |
-
|
219 |
-
[More Information Needed]
|
220 |
-
|
221 |
-
**APA:**
|
222 |
-
|
223 |
-
[More Information Needed]
|
224 |
-
|
225 |
-
## Glossary [optional]
|
226 |
-
|
227 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
228 |
-
|
229 |
-
[More Information Needed]
|
230 |
-
|
231 |
-
## More Information [optional]
|
232 |
-
|
233 |
-
[More Information Needed]
|
234 |
-
|
235 |
-
## Model Card Authors [optional]
|
236 |
-
|
237 |
-
[More Information Needed]
|
238 |
-
|
239 |
-
## Model Card Contact
|
240 |
-
|
241 |
-
[More Information Needed]
|
|
|
3 |
datasets:
|
4 |
- bigcode/the-stack-v2
|
5 |
license: bigcode-openrail-m
|
6 |
+
base_model:
|
7 |
+
- andreagurioli1995/ModularStarEncoder
|
8 |
---
|
9 |
|
10 |
+
# ModularStarEncoder-1B Fine-Tuned model
|
11 |
|
12 |
<!-- Provide a quick summary of what the model is/does. -->
|
13 |
|
14 |
+
ModularStarEncoder-finetuned is an encoder built on top of [ModularStarEncoder-1B Pre-trained](https://huggingface.co/andreagurioli1995/ModularStarEncoder) on [SynthCode2Code2NL](add link here).
|
15 |
+
ModularStarEncoder fine-tuned encoder for various retrieval tasks, enabling the end user to select the model size that meets their memory and computational constraints.
|
16 |
+
We built ModularStarEncoder on top of [StarCoder-2](https://huggingface.co/bigcode/starcoder2-15b), reducing its size from 15B to 1B parameters in bfloat16.
|
17 |
|
18 |
+
The model is finetuned with [CLIP objective](https://github.com/mlfoundations/open_clip/blob/main/src/open_clip/loss.py)
|
19 |
|
20 |
+
- **Paper:** [Link](arxiv.paper)
|
21 |
+
- **Languages:** English, Go, Ruby, Python, Java, C++, PHP, C, JavaScript
|
|
|
22 |
|
23 |
### How to use
|
24 |
```python
|
|
|
58 |
- raw_hidden_states: raw representation from all the hidden states of the model, without pooling, normalization, and projection
|
59 |
- attentions: attention scores from the encoder
|
60 |
|
61 |
+
|
62 |
+
### Training
|
63 |
|
64 |
<!-- Provide a longer summary of what this model is. -->
|
65 |
+
We fine-tuned ModularStarEncoder with a batch size of 2048 contrastive samples for 20,000 training steps.
|
66 |
+
The pre-training and fine-tuning were conducted on 512 NVIDIA Ampere (64GB) GPUs using the [Leonardo](https://arxiv.org/abs/2307.16885) supercomputer, requiring 450,000 GPU working hours.
|
67 |
+
|
68 |
+
| Hyperparameter | Value |
|
69 |
+
|--------------------------|-----------|
|
70 |
+
| Hidden size | 1024 |
|
71 |
+
| Max. position embeddings | 2048 |
|
72 |
+
| Num. of attention heads | 12 |
|
73 |
+
| Num. of key values heads | 4 |
|
74 |
+
| Num. of hidden layers | 36 |
|
75 |
+
| Attention | GQA |
|
76 |
+
| Num. of parameters | ≈1B |
|
77 |
+
|Loss function |CLIP loss |
|
78 |
+
|Multi-layer loss | yes |
|
79 |
+
|
80 |
+
## Licence
|
81 |
+
The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement [here](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|