nielsr HF Staff commited on
Commit
fbe8c7c
·
verified ·
1 Parent(s): 63d180e

Link to Hugging Face paper

Browse files

This PR updates the paper link to point to the Hugging Face Papers page.

Files changed (1) hide show
  1. README.md +4 -203
README.md CHANGED
@@ -1,9 +1,10 @@
1
  ---
2
- license: cc-by-nc-4.0
3
  datasets:
4
  - Salesforce/xlam-function-calling-60k
5
  language:
6
  - en
 
 
7
  pipeline_tag: text-generation
8
  tags:
9
  - function-calling
@@ -13,7 +14,6 @@ tags:
13
  - qwen
14
  - pytorch
15
  - LLaMA-factory
16
- library_name: transformers
17
  ---
18
 
19
  <p align="center">
@@ -22,7 +22,7 @@ library_name: transformers
22
 
23
 
24
  <p align="center">
25
- <a href="https://arxiv.org/abs/2504.03601">[Paper]</a> |
26
  <a href="https://apigen-mt.github.io/">[Homepage]</a> |
27
  <a href="https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k">[Dataset (Coming Soon)]</a> |
28
  <a href="https://github.com/SalesforceAIResearch/xLAM">[Github]</a>
@@ -66,204 +66,5 @@ We provide a series of xLAMs in different sizes to cater to various applications
66
  | Salesforce/xLAM-2-3b-fc-r | 3B | 32k (max 128k)* | Mar. 26, 2025 | Qwen 2.5 | Multi-turn Conversation, Tool-usage | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-3b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-3b-fc-r-gguf) |
67
  | Salesforce/xLAM-2-1b-fc-r | 1B | 32k (max 128k)* | Mar. 26, 2025 | Qwen 2.5 | Multi-turn Conversation, Tool-usage, Lightweight | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-1b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-1b-fc-r-gguf) |
68
 
69
- ***Note:** The default context length for Qwen-2.5-based models is 32k, but you can use techniques like YaRN (Yet Another Recursive Network) to achieve maximum 128k context length. Please refer to [here](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct#processing-long-texts) for more details.
70
-
71
- ## Using GGUF Files
72
-
73
- For scenarios requiring more efficient inference or deployment on resource-constrained devices, we provide GGUF versions of our models, which are compatible with llama.cpp and similar frameworks.
74
-
75
- #### How to Download GGUF Files
76
-
77
- 1. **Install Hugging Face CLI:**
78
-
79
- ```bash
80
- pip install huggingface-hub
81
- ```
82
-
83
- 2. **Login to Hugging Face:**
84
- ```bash
85
- huggingface-cli login
86
- ```
87
-
88
- 3. **Download the GGUF model:**
89
- ```bash
90
- huggingface-cli download Salesforce/Llama-xLAM-2-8b-fc-r-gguf Llama-xLAM-2-8b-fc-r-gguf --local-dir . --local-dir-use-symlinks False
91
- ```
92
-
93
- #### Prompt Template
94
-
95
- The GGUF models use the following prompt template:
96
-
97
- ```
98
- <|begin_of_text|><|start_header_id|>system<|end_header_id|>
99
-
100
- {TASK_INSTRUCTION}
101
- You have access to a set of tools. When using tools, make calls in a single JSON array:
102
-
103
- [{"name": "tool_call_name", "arguments": {"arg1": "value1", "arg2": "value2"}}, ... (additional parallel tool calls as needed)]
104
-
105
- If no tool is suitable, state that explicitly. If the user's input lacks required parameters, ask for clarification. Do not interpret or respond until tool results are returned. Once they are available, process them or make additional calls if needed. For tasks that don't require tools, such as casual conversation or general advice, respond directly in plain text. The available tools are:
106
-
107
- {AVAILABLE_TOOLS}
108
-
109
- <|eot_id|><|start_header_id|>user<|end_header_id|>
110
-
111
- {USER_QUERY}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
112
-
113
- {ASSISTANT_QUERY}<|eot_id|><|start_header_id|>user<|end_header_id|>
114
-
115
- {USER_QUERY}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
116
- ```
117
-
118
- #### Usage Examples
119
-
120
- ##### Command Line
121
-
122
- 1. Install llama.cpp framework from the source [here](https://github.com/ggerganov/llama.cpp)
123
- 2. Run the inference task as shown below. For configuration of generation-related parameters, refer to [llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
124
-
125
- ```bash
126
- llama-cli -m [PATH-TO-LOCAL-GGUF]
127
- ```
128
-
129
- ##### Python Framework
130
-
131
- 1. Install [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
132
- ```bash
133
- pip install llama-cpp-python
134
- ```
135
-
136
- 2. Use the high-level API for inference:
137
- ```python
138
- from llama_cpp import Llama
139
- llm = Llama(
140
- model_path="[PATH-TO-MODEL]"
141
- )
142
- output = llm.create_chat_completion(
143
- messages = [
144
- {
145
- "role": "system",
146
- "content": "You are a helpful assistant that can use tools. You are developed by Salesforce xLAM team."
147
-
148
- },
149
- {
150
- "role": "user",
151
- "content": "Extract Jason is 25 years old"
152
- }
153
- ],
154
- tools=[{
155
- "type": "function",
156
- "function": {
157
- "name": "UserDetail",
158
- "parameters": {
159
- "type": "object",
160
- "title": "UserDetail",
161
- "properties": {
162
- "name": {
163
- "title": "Name",
164
- "type": "string"
165
- },
166
- "age": {
167
- "title": "Age",
168
- "type": "integer"
169
- }
170
- },
171
- "required": [ "name", "age" ]
172
- }
173
- }
174
- }],
175
- tool_choice={
176
- "type": "function",
177
- "function": {
178
- "name": "UserDetail"
179
- }
180
- }
181
- )
182
- print(output['choices'][0]['message'])
183
- ```
184
-
185
- ## Benchmark Results
186
-
187
- ### Berkeley Function-Calling Leaderboard (BFCL v3)
188
- <p align="center">
189
- <img width="80%" alt="BFCL Results" src="https://github.com/apigen-mt/apigen-mt.github.io/blob/main/img/bfcl-result.png?raw=true">
190
- <br>
191
- <small><i>Performance comparison of different models on BFCL leaderboard. The rank is based on the overall accuracy, which is a weighted average of different evaluation categories. "FC" stands for function-calling mode in contrast to using a customized "prompt" to extract the function calls.</i></small>
192
- </p>
193
-
194
- ### τ-bench Benchmark
195
-
196
- <p align="center">
197
- <img width="80%" alt="Tau-bench Results" src="https://github.com/apigen-mt/apigen-mt.github.io/blob/main/img/taubench-result.png?raw=true">
198
- <br>
199
- <small><i>Success Rate (pass@1) on τ-bench benchmark averaged across at least 5 trials. Our xLAM-2-70b-fc-r model achieves an overall success rate of 56.2% on τ-bench, significantly outperforming the base Llama 3.1 70B Instruct model (38.2%) and other open-source models like DeepSeek v3 (40.6%). Notably, our best model even outperforms proprietary models such as GPT-4o (52.9%) and approaches the performance of more recent models like Claude 3.5 Sonnet (new) (60.1%).</i></small>
200
- </p>
201
-
202
- <p align="center">
203
- <img width="80%" alt="Pass^k curves" src="https://github.com/apigen-mt/apigen-mt.github.io/blob/main/img/pass_k_curves_retail_airline.png?raw=true">
204
- <br>
205
- <small><i>Pass^k curves measuring the probability that all 5 independent trials succeed for a given task, averaged across all tasks for τ-retail (left) and τ-airline (right) domains. Higher values indicate better consistency of the models.</i></small>
206
- </p>
207
-
208
-
209
- ## Ethical Considerations
210
-
211
- This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people's lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.
212
-
213
- ### Model Licenses
214
-
215
- For all Llama relevant models, please also follow corresponding Llama license and terms. Meta Llama 3 is licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
216
-
217
- ## Citation
218
-
219
- If you use our model or dataset in your work, please cite our paper:
220
-
221
- ```bibtex
222
- @article{prabhakar2025apigenmt,
223
- title={APIGen-MT: Agentic Pipeline for Multi-Turn Data Generation via Simulated Agent-Human Interplay},
224
- author={Prabhakar, Akshara and Liu, Zuxin and Yao, Weiran and Zhang, Jianguo and Zhu, Ming and Wang, Shiyu and Liu, Zhiwei and Awalgaonkar, Tulika and Chen, Haolin and Hoang, Thai and Niebles, Juan Carlos and Heinecke, Shelby and Wang, Huan and Savarese, Silvio and Xiong, Caiming},
225
- journal={arXiv preprint arXiv:2504.03601},
226
- year={2025}
227
- }
228
- ```
229
-
230
- Additionally, please check our other amazing works regarding xLAM series and consider citing them as well:
231
-
232
- ```bibtex
233
- @article{zhang2025actionstudio,
234
- title={ActionStudio: A Lightweight Framework for Data and Training of Action Models},
235
- author={Zhang, Jianguo and Hoang, Thai and Zhu, Ming and Liu, Zuxin and Wang, Shiyu and Awalgaonkar, Tulika and Prabhakar, Akshara and Chen, Haolin and Yao, Weiran and Liu, Zhiwei and others},
236
- journal={arXiv preprint arXiv:2503.22673},
237
- year={2025}
238
- }
239
- ```
240
-
241
- ```bibtex
242
- @article{zhang2024xlam,
243
- title={xLAM: A Family of Large Action Models to Empower AI Agent Systems},
244
- author={Zhang, Jianguo and Lan, Tian and Zhu, Ming and Liu, Zuxin and Hoang, Thai and Kokane, Shirley and Yao, Weiran and Tan, Juntao and Prabhakar, Akshara and Chen, Haolin and others},
245
- journal={arXiv preprint arXiv:2409.03215},
246
- year={2024}
247
- }
248
- ```
249
-
250
- ```bibtex
251
- @article{liu2024apigen,
252
- title={Apigen: Automated pipeline for generating verifiable and diverse function-calling datasets},
253
- author={Liu, Zuxin and Hoang, Thai and Zhang, Jianguo and Zhu, Ming and Lan, Tian and Tan, Juntao and Yao, Weiran and Liu, Zhiwei and Feng, Yihao and RN, Rithesh and others},
254
- journal={Advances in Neural Information Processing Systems},
255
- volume={37},
256
- pages={54463--54482},
257
- year={2024}
258
- }
259
- ```
260
-
261
- ```bibtex
262
- @article{zhang2024agentohana,
263
- title={AgentOhana: Design Unified Data and Training Pipeline for Effective Agent Learning},
264
- author={Zhang, Jianguo and Lan, Tian and Murthy, Rithesh and Liu, Zhiwei and Yao, Weiran and Tan, Juntao and Hoang, Thai and Yang, Liangwei and Feng, Yihao and Liu, Zuxin and others},
265
- journal={arXiv preprint arXiv:2402.15506},
266
- year={2024}
267
- }
268
- ```
269
 
 
 
1
  ---
 
2
  datasets:
3
  - Salesforce/xlam-function-calling-60k
4
  language:
5
  - en
6
+ library_name: transformers
7
+ license: cc-by-nc-4.0
8
  pipeline_tag: text-generation
9
  tags:
10
  - function-calling
 
14
  - qwen
15
  - pytorch
16
  - LLaMA-factory
 
17
  ---
18
 
19
  <p align="center">
 
22
 
23
 
24
  <p align="center">
25
+ <a href="https://huggingface.co/papers/2504.03601">[Paper]</a> |
26
  <a href="https://apigen-mt.github.io/">[Homepage]</a> |
27
  <a href="https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k">[Dataset (Coming Soon)]</a> |
28
  <a href="https://github.com/SalesforceAIResearch/xLAM">[Github]</a>
 
66
  | Salesforce/xLAM-2-3b-fc-r | 3B | 32k (max 128k)* | Mar. 26, 2025 | Qwen 2.5 | Multi-turn Conversation, Tool-usage | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-3b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-3b-fc-r-gguf) |
67
  | Salesforce/xLAM-2-1b-fc-r | 1B | 32k (max 128k)* | Mar. 26, 2025 | Qwen 2.5 | Multi-turn Conversation, Tool-usage, Lightweight | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-1b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-1b-fc-r-gguf) |
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
+ ***Note:** The default context length for Qwen-2.5-based models is 32k, but you can use techniques like YaRN (Yet Another Recursive Network) to achieve maximum 128k context length. Please refer to [here](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct#processing-long-texts) for more details.