Upload README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,45 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: es
|
3 |
+
datasets:
|
4 |
+
- Xelta/response_mongo_text
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
tags:
|
8 |
+
- llama
|
9 |
+
- 4bit
|
10 |
+
- lora
|
11 |
+
model-index:
|
12 |
+
- name: llama-2-7b-miniXelta
|
13 |
+
results:
|
14 |
+
- task:
|
15 |
+
type: text-generation
|
16 |
+
name: Text Generation
|
17 |
+
dataset:
|
18 |
+
name: response_mongo_text
|
19 |
+
type: Xelta/response_mongo_text
|
20 |
+
metrics:
|
21 |
+
- name: Accuracy
|
22 |
+
type: accuracy
|
23 |
+
value: 0.95 # Si tienes este dato
|
24 |
+
---
|
25 |
|
26 |
+
# Llama-2-7b-miniXelta
|
27 |
+
|
28 |
+
Este es un modelo ajustado a partir del modelo Llama-2-7b-chat-hf utilizando LoRA y precisión de 4 bits. Ha sido entrenado con el conjunto de datos `Xelta/response_mongo_text`.
|
29 |
+
|
30 |
+
## Uso
|
31 |
+
|
32 |
+
Puedes usar este modelo para generación de texto de la siguiente manera:
|
33 |
+
|
34 |
+
```python
|
35 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
36 |
+
|
37 |
+
model_name = "username/llama-2-7b-miniXelta"
|
38 |
+
|
39 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
40 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
41 |
+
|
42 |
+
prompt = "Quiero inscribirme, soy Mattias y mi edad es 28 años"
|
43 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
44 |
+
outputs = model.generate(**inputs)
|
45 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|