zuxin-llm commited on
Commit
63d180e
·
verified ·
1 Parent(s): dafeea7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +173 -27
README.md CHANGED
@@ -1,46 +1,102 @@
1
  ---
2
  license: cc-by-nc-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
4
  <p align="center">
5
  <img width="500px" alt="xLAM" src="https://huggingface.co/datasets/jianguozhang/logos/resolve/main/xlam-no-background.png">
6
  </p>
 
 
7
  <p align="center">
8
- <a href="https://www.salesforceairesearch.com/projects/xlam-large-action-models">[Homepage]</a> |
9
- <a href="https://github.com/SalesforceAIResearch/xLAM">[Github]</a> |
10
- <a href="https://blog.salesforceairesearch.com/large-action-model-ai-agent/">[Blog]</a>
 
11
  </p>
12
  <hr>
13
 
14
- ## Model Summary
15
 
16
  This repo provides the GGUF format for the xLAM-2-3b-fc-r model. Here's a link to original model [xLAM-2-3b-fc-r](https://huggingface.co/Salesforce/xLAM-2-3b-fc-r).
17
- [Large Action Models (LAMs)](https://blog.salesforceairesearch.com/large-action-models/) are advanced language models designed to enhance decision-making by translating user intentions into executable actions. As the **brains of AI agents**, LAMs autonomously plan and execute tasks to achieve specific goals, making them invaluable for automating workflows across diverse domains.
18
 
19
- ## Model Overview
20
- The new **xLAM-2** series, built on our most advanced data synthesis, processing, and training pipelines, marks a significant leap in **multi-turn reasoning** and **tool usage**. It achieves state-of-the-art performance on function-calling benchmarks like **BFCL** and **tau-bench**. We've also refined the **chat template** and **vLLM integration**, making it easier to build advanced AI agents. Compared to previous xLAM models, xLAM-2 offers superior performance and seamless deployment across applications.
21
  **This model release is for research purposes only.**
22
 
23
- ## How to download GGUF files
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  1. **Install Hugging Face CLI:**
26
 
27
- ```
28
  pip install huggingface-hub
29
  ```
30
 
31
  2. **Login to Hugging Face:**
32
- ```
33
  huggingface-cli login
34
  ```
35
 
36
  3. **Download the GGUF model:**
 
 
37
  ```
38
- huggingface-cli download Salesforce/xLAM-2-3b-fc-r-gguf xLAM-2-3b-fc-r-gguf --local-dir . --local-dir-use-symlinks False
39
- ```
40
 
41
- ## Prompt template
 
 
 
42
  ```
43
- <|im_start|>system
 
44
  {TASK_INSTRUCTION}
45
  You have access to a set of tools. When using tools, make calls in a single JSON array:
46
 
@@ -50,30 +106,34 @@ If no tool is suitable, state that explicitly. If the user's input lacks require
50
 
51
  {AVAILABLE_TOOLS}
52
 
53
- <|im_end|><|im_start|>user
54
- {USER_QUERY}<|im_end|><|im_start|>assistant
55
- {ASSISTANT_QUERY}<|im_end|><|im_start|>user
56
- {USER_QUERY}<|im_end|><|im_start|>assistant
 
 
 
57
  ```
58
- For more information, refer to [documentation](https://huggingface.co/agentstudio-family/xLAM-1B-FC-r#basic-usage-with-huggingface))
59
 
60
- ## Usage
61
 
62
- ### Command Line
63
 
64
  1. Install llama.cpp framework from the source [here](https://github.com/ggerganov/llama.cpp)
65
- 2. Run the inference task as below, to configure generation related paramter, refer to [llama.cpp](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
66
- ```
 
67
  llama-cli -m [PATH-TO-LOCAL-GGUF]
68
  ```
69
 
70
- ### Python framwork
71
 
72
  1. Install [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
73
- ```
74
  pip install llama-cpp-python
75
  ```
76
- 2. Refer to [llama-cpp-API](https://github.com/abetlen/llama-cpp-python?tab=readme-ov-file#high-level-api), here's a example below
 
77
  ```python
78
  from llama_cpp import Llama
79
  llm = Llama(
@@ -120,4 +180,90 @@ output = llm.create_chat_completion(
120
  }
121
  )
122
  print(output['choices'][0]['message'])
123
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
10
+ - LLM Agent
11
+ - tool-use
12
+ - llama
13
+ - qwen
14
+ - pytorch
15
+ - LLaMA-factory
16
+ library_name: transformers
17
  ---
18
+
19
  <p align="center">
20
  <img width="500px" alt="xLAM" src="https://huggingface.co/datasets/jianguozhang/logos/resolve/main/xlam-no-background.png">
21
  </p>
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>
29
  </p>
30
  <hr>
31
 
32
+ # Welcome to the xLAM-2 Model Family!
33
 
34
  This repo provides the GGUF format for the xLAM-2-3b-fc-r model. Here's a link to original model [xLAM-2-3b-fc-r](https://huggingface.co/Salesforce/xLAM-2-3b-fc-r).
 
35
 
36
+
37
+ [Large Action Models (LAMs)](https://blog.salesforceairesearch.com/large-action-models/) are advanced language models designed to enhance decision-making by translating user intentions into executable actions. As the **brains of AI agents**, LAMs autonomously plan and execute tasks to achieve specific goals, making them invaluable for automating workflows across diverse domains.
38
  **This model release is for research purposes only.**
39
 
40
+ The new **xLAM-2** series, built on our most advanced data synthesis, processing, and training pipelines, marks a significant leap in **multi-turn conversation** and **tool usage**. Trained using our novel APIGen-MT framework, which generates high-quality training data through simulated agent-human interactions. Our models achieve state-of-the-art performance on **BFCL** and **Ï„-bench** benchmarks, outperforming frontier models like GPT-4o and Claude 3.5. Notably, even our smaller models demonstrate superior capabilities in multi-turn scenarios while maintaining exceptional consistency across trials.
41
+
42
+ We've also refined the **chat template** and **vLLM integration**, making it easier to build advanced AI agents. Compared to previous xLAM models, xLAM-2 offers superior performance and seamless deployment across applications.
43
+
44
+ <p align="center">
45
+ <img width="100%" alt="Model Performance Overview" src="https://github.com/apigen-mt/apigen-mt.github.io/blob/main/img/model_board.png?raw=true">
46
+ <br>
47
+ <small><i>Comparative performance of larger xLAM-2-fc-r models (8B-70B, trained with APIGen-MT data) against state-of-the-art baselines on function-calling (BFCL v3, as of date 04/02/2025) and agentic (Ï„-bench) capabilities.</i></small>
48
+ </p>
49
+
50
+
51
+ ## Table of Contents
52
+ - [Model Series](#model-series)
53
+ - [Using GGUF Files](#using-gguf-files)
54
+ - [Benchmark Results](#benchmark-results)
55
+ - [Citation](#citation)
56
+
57
+ ## Model Series
58
+
59
+ We provide a series of xLAMs in different sizes to cater to various applications, including those optimized for multi-turn conversation and tool usage:
60
+
61
+ | Model | # Total Params | Context Length | Release Date | Base Model | Category | Download Model | Download GGUF files |
62
+ |------------------------------|----------------|----------------|--------------|-----------------|---------------------------------------------|------------------------------------------------------------------------------|---------------------|
63
+ | Salesforce/Llama-xLAM-2-70b-fc-r | 70B | 128k | Mar. 26, 2025 | Llama 3.1/3.2 | Multi-turn Conversation, Tool-usage | [🤗 Link](https://huggingface.co/Salesforce/Llama-xLAM-2-70b-fc-r) | NA |
64
+ | Salesforce/Llama-xLAM-2-8b-fc-r | 8B | 128k | Mar. 26, 2025 |Llama 3.1/3.2 | Multi-turn Conversation, Tool-usage | [🤗 Link](https://huggingface.co/Salesforce/Llama-xLAM-2-8b-fc-r) | [🤗 Link](https://huggingface.co/Salesforce/Llama-xLAM-2-8b-fc-r-gguf) |
65
+ | Salesforce/xLAM-2-32b-fc-r | 32B | 32k (max 128k)* | Mar. 26, 2025 | Qwen 2.5 | Multi-turn Conversation, Tool-usage | [🤗 Link](https://huggingface.co/Salesforce/xLAM-2-32b-fc-r) | NA |
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
 
 
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(
 
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
+