Update README.md
Browse files
README.md
CHANGED
|
@@ -91,25 +91,26 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
|
| 91 |
### Tool Use
|
| 92 |
|
| 93 |
```python
|
| 94 |
-
def get_current_weather(location: str) -> float:
|
| 95 |
"""
|
| 96 |
Obtener la datos del tiempo de una localización.
|
| 97 |
|
| 98 |
Args:
|
| 99 |
location: La locaización, con el siguiente formato: "Ciudad, País."
|
|
|
|
| 100 |
Returns:
|
| 101 |
El tiempo en dicha localización.
|
| 102 |
"""
|
| 103 |
return {"temperatura": 22, "cielo": "nublado", "probabilidad de lluvias": "60%"}
|
| 104 |
|
| 105 |
messages = [
|
| 106 |
-
{"role": "user", "content": "Este fin de semana quiero visitar Madrid, y no se qué ropa llevarme. ¿Podrías decirme qué tal va a hacer?"}
|
| 107 |
]
|
| 108 |
|
| 109 |
text = tokenizer.apply_chat_template(
|
| 110 |
messages,
|
| 111 |
tokenize=False,
|
| 112 |
-
tools=[
|
| 113 |
add_generation_prompt=True
|
| 114 |
)
|
| 115 |
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
|
@@ -129,9 +130,7 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
|
| 129 |
|
| 130 |
### Training Data
|
| 131 |
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
[More Information Needed]
|
| 135 |
|
| 136 |
### Training Procedure
|
| 137 |
|
|
|
|
| 91 |
### Tool Use
|
| 92 |
|
| 93 |
```python
|
| 94 |
+
def get_current_weather(location: str, date: str) -> float:
|
| 95 |
"""
|
| 96 |
Obtener la datos del tiempo de una localización.
|
| 97 |
|
| 98 |
Args:
|
| 99 |
location: La locaización, con el siguiente formato: "Ciudad, País."
|
| 100 |
+
date: La fecha, en el formato AAAA-MM-DD.
|
| 101 |
Returns:
|
| 102 |
El tiempo en dicha localización.
|
| 103 |
"""
|
| 104 |
return {"temperatura": 22, "cielo": "nublado", "probabilidad de lluvias": "60%"}
|
| 105 |
|
| 106 |
messages = [
|
| 107 |
+
{"role": "user", "content": "Este fin de semana quiero visitar Madrid, y no se qué ropa llevarme. ¿Podrías decirme qué tal va a hacer? Es el puente del 6 de diciembre de 2024."}
|
| 108 |
]
|
| 109 |
|
| 110 |
text = tokenizer.apply_chat_template(
|
| 111 |
messages,
|
| 112 |
tokenize=False,
|
| 113 |
+
tools=[get_current_weather],
|
| 114 |
add_generation_prompt=True
|
| 115 |
)
|
| 116 |
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
|
|
|
| 130 |
|
| 131 |
### Training Data
|
| 132 |
|
| 133 |
+
A combination of both public and private datasets, the latter designed in the IIC. The dataset consists of 21975 conversations in Spanish, with the format `chatml`. Each conversation has two variants: `chosen` and `rejected`, where the only thing that changes is the last answer of the assistant. The last answer in the `chosen` variant is considered a better answer than the one in the `rejected` variant. Different techniques have been used to generate the dataset, which we explain in depth in the paper (**coming soon**).
|
|
|
|
|
|
|
| 134 |
|
| 135 |
### Training Procedure
|
| 136 |
|