Update README.md
Browse files
README.md
CHANGED
@@ -175,33 +175,23 @@ LINCE-ZERO was trained on AWS SageMaker, on ... GPUs in ... instances.
|
|
175 |
|
176 |
### Software
|
177 |
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
179 |
|
180 |
# 🌳 Environmental Impact
|
181 |
|
182 |
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).
|
183 |
|
184 |
-
- **Hardware Type:**
|
185 |
-
- **Hours used:**
|
186 |
-
- **Cloud Provider:**
|
187 |
-
- **Compute Region:**
|
188 |
-
- **Carbon Emitted:**
|
189 |
-
|
190 |
-
# 📝 Citation
|
191 |
-
|
192 |
-
There is a paper coming soon! Meanwhile, when using LINCE-ZERO please use the following information to cite:
|
193 |
-
|
194 |
-
```markdown
|
195 |
-
@article{lince-zero,
|
196 |
-
title={{LINCE-ZERO}: Llm for Instructions from Natural Corpus en Español},
|
197 |
-
author={},
|
198 |
-
year={2023}
|
199 |
-
}
|
200 |
-
```
|
201 |
-
|
202 |
-
# 📧 Contact
|
203 |
|
204 |
-
[[email protected]](mailto:[email protected])
|
205 |
|
206 |
# 🔥 How to Get Started with LINCE-ZERO
|
207 |
|
@@ -213,7 +203,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoTokenizer
|
|
213 |
|
214 |
model_id = "clibrain/lince-zero"
|
215 |
|
216 |
-
model = AutoModelForCausalLM.from_pretrained(model_id).to("cuda")
|
217 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
218 |
|
219 |
def create_instruction(instruction, input_data=None, context=None):
|
@@ -248,7 +238,7 @@ def generate(
|
|
248 |
):
|
249 |
|
250 |
prompt = create_instruction(instruction, input, context)
|
251 |
-
print(prompt)
|
252 |
inputs = tokenizer(prompt, return_tensors="pt")
|
253 |
input_ids = inputs["input_ids"].to("cuda")
|
254 |
attention_mask = inputs["attention_mask"].to("cuda")
|
@@ -275,4 +265,20 @@ def generate(
|
|
275 |
|
276 |
instruction = "Dame una lista de lugares a visitar en España."
|
277 |
print(generate(instruction))
|
278 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
### Software
|
177 |
|
178 |
+
We used the following libraries:
|
179 |
+
- transformers
|
180 |
+
- accelerate
|
181 |
+
- peft
|
182 |
+
- bitsandbytes
|
183 |
+
- einops
|
184 |
|
185 |
# 🌳 Environmental Impact
|
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:** 1 X A100 - 40 GB
|
190 |
+
- **Hours used:** 8
|
191 |
+
- **Cloud Provider:** Google
|
192 |
+
- **Compute Region:** Europe
|
193 |
+
- **Carbon Emitted:** 250W x 10h = 2.5 kWh x 0.57 kg eq. CO2/kWh = 1.42 kg eq. CO2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
|
|
195 |
|
196 |
# 🔥 How to Get Started with LINCE-ZERO
|
197 |
|
|
|
203 |
|
204 |
model_id = "clibrain/lince-zero"
|
205 |
|
206 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True).to("cuda")
|
207 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
208 |
|
209 |
def create_instruction(instruction, input_data=None, context=None):
|
|
|
238 |
):
|
239 |
|
240 |
prompt = create_instruction(instruction, input, context)
|
241 |
+
print(prompt.replace("### Respuesta:\n", "")
|
242 |
inputs = tokenizer(prompt, return_tensors="pt")
|
243 |
input_ids = inputs["input_ids"].to("cuda")
|
244 |
attention_mask = inputs["attention_mask"].to("cuda")
|
|
|
265 |
|
266 |
instruction = "Dame una lista de lugares a visitar en España."
|
267 |
print(generate(instruction))
|
268 |
+
```
|
269 |
+
|
270 |
+
# 📝 Citation
|
271 |
+
|
272 |
+
There is a paper coming soon! Meanwhile, when using LINCE-ZERO please use the following information to cite:
|
273 |
+
|
274 |
+
```markdown
|
275 |
+
@article{lince-zero,
|
276 |
+
title={{LINCE-ZERO}: Llm for Instructions from Natural Corpus en Español},
|
277 |
+
author={},
|
278 |
+
year={2023}
|
279 |
+
}
|
280 |
+
```
|
281 |
+
|
282 |
+
# 📧 Contact
|
283 |
+
|
284 |
+
[[email protected]](mailto:[email protected])
|