Improve language tag (#1)
Browse files- Improve language tag (e72c8b2055c427afe8fb4ec927ac354bbb10c754)
Co-authored-by: Loïck BOURDOIS <lbourdois@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,79 +1,93 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model: Qwen/Qwen2.5-3B-Instruct
|
| 3 |
-
library_name: transformers
|
| 4 |
-
model_name: Qwen2.5-3B-Instruct-thinking-function_calling-V0
|
| 5 |
-
tags:
|
| 6 |
-
- generated_from_trainer
|
| 7 |
-
- trl
|
| 8 |
-
- sft
|
| 9 |
-
licence: license
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
]
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
<
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
</div>
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-3B-Instruct
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: Qwen2.5-3B-Instruct-thinking-function_calling-V0
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
licence: license
|
| 10 |
+
language:
|
| 11 |
+
- zho
|
| 12 |
+
- eng
|
| 13 |
+
- fra
|
| 14 |
+
- spa
|
| 15 |
+
- por
|
| 16 |
+
- deu
|
| 17 |
+
- ita
|
| 18 |
+
- rus
|
| 19 |
+
- jpn
|
| 20 |
+
- kor
|
| 21 |
+
- vie
|
| 22 |
+
- tha
|
| 23 |
+
- ara
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# Model Card for Qwen2.5-3B-Instruct-thinking-function_calling-V0
|
| 27 |
+
|
| 28 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct).
|
| 29 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 30 |
+
|
| 31 |
+
## Quick start
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from transformers import pipeline
|
| 35 |
+
|
| 36 |
+
prompt="""<bos><start_of_turn>human
|
| 37 |
+
You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags.You may call one or more functions to assist with the user query.
|
| 38 |
+
Don't make assumptions about what values to plug into functions.Here are the available tools:
|
| 39 |
+
<tools>
|
| 40 |
+
[{'type': 'function', 'function': {'name': 'convert_currency', 'description': 'Convert from one currency to another', 'parameters': {'type': 'object', 'properties': {'amount': {'type': 'number', 'description': 'The amount to convert'}, 'from_currency': {'type': 'string', 'description': 'The currency to convert from'}, 'to_currency': {'type': 'string', 'description': 'The currency to convert to'}}, 'required': ['amount', 'from_currency', 'to_currency']}}},
|
| 41 |
+
{'type': 'function', 'function': {'name': 'calculate_distance', 'description': 'Calculate the distance between two locations', 'parameters': {'type': 'object', 'properties': {'start_location': {'type': 'string', 'description': 'The starting location'}, 'end_location': {'type': 'string', 'description': 'The ending location'}}, 'required': ['start_location', 'end_location']}}}
|
| 42 |
+
{'type': 'function', 'function': {'name': 'send_email', 'description': 'Send an email to a customer', 'parameters': {'type': 'object', 'properties': {'customer': {'type': 'string', 'description': 'The customer to send the email to'}, 'subject': {'type': 'string', 'description': 'The subject of the email'}, 'body': {'type': 'string', 'description': 'The body of the email'}}, 'required': ['customer', 'subject', 'body']}}}
|
| 43 |
+
]
|
| 44 |
+
</tools>
|
| 45 |
+
Use the following pydantic model json schema for each tool call you will make:
|
| 46 |
+
{'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}
|
| 47 |
+
For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
| 48 |
+
<tool_call>
|
| 49 |
+
{tool_call}
|
| 50 |
+
</tool_call>Also, before making a call to a function take the time to plan the function to take. Make that thinking process between <think>{your thoughts}</think>
|
| 51 |
+
|
| 52 |
+
Hi, I need you to tell John@doe.com that I received his package ?<end_of_turn><eos>
|
| 53 |
+
<start_of_turn>model
|
| 54 |
+
<think>"""
|
| 55 |
+
generator = pipeline("text-generation", model="Cotum/Qwen2.5-3B-Instruct-thinking-function_calling-V0", device="cuda")
|
| 56 |
+
output = generator([{"role": "user", "content": prompt}], max_new_tokens=128, return_full_text=False)[0]
|
| 57 |
+
print(output["generated_text"])
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## Training procedure
|
| 61 |
+
|
| 62 |
+
This model was trained with SFT following the Bonus Unit 1 of the Agent Course of Hugging Face : https://huggingface.co/agents-course/notebooks/blob/main/bonus-unit1/bonus-unit1.ipynb
|
| 63 |
+
|
| 64 |
+
### Framework versions
|
| 65 |
+
|
| 66 |
+
- TRL: 0.15.1
|
| 67 |
+
- Transformers: 4.49.0
|
| 68 |
+
- Pytorch: 2.6.0
|
| 69 |
+
- Datasets: 3.3.2
|
| 70 |
+
- Tokenizers: 0.21.0
|
| 71 |
+
|
| 72 |
+
## Citations
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
Cite TRL as:
|
| 77 |
+
|
| 78 |
+
```bibtex
|
| 79 |
+
@misc{vonwerra2022trl,
|
| 80 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 81 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
|
| 82 |
+
year = 2020,
|
| 83 |
+
journal = {GitHub repository},
|
| 84 |
+
publisher = {GitHub},
|
| 85 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 86 |
+
}
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
<div align="center" style="line-height: 1;">
|
| 90 |
+
<a href="https://www.huggingface.co/Cotum" target="_blank" style="margin: 2px;">
|
| 91 |
+
<img alt="Follow" src="https://huggingface.co/datasets/Cotum/MATH-500-french-thoughts/resolve/main/Cotum_banner.png" style="display: inline-block; vertical-align: middle; width: 200px;"/>
|
| 92 |
+
</a>
|
| 93 |
</div>
|