Update README.md
Browse files
README.md
CHANGED
@@ -5,9 +5,15 @@ license: cc-by-nc-4.0
|
|
5 |
<p align="center">
|
6 |
<img width="300px" alt="xLAM" src="https://huggingface.co/Salesforce/xLAM-v0.1-r/resolve/main/xlam-no-background.png">
|
7 |
</p>
|
8 |
-
<p align="center"
|
|
|
|
|
|
|
|
|
|
|
9 |
<hr>
|
10 |
|
|
|
11 |
Welcome to the xLAM model family! [Large Action Models (LAMs)](https://blog.salesforceairesearch.com/large-action-models/) are advanced large language models designed to enhance decision-making and translate user intentions into executable actions that interact with the world. LAMs autonomously plan and execute tasks to achieve specific goals, serving as the brains of AI agents. They have the potential to automate workflow processes across various domains, making them invaluable for a wide range of applications.
|
12 |
|
13 |
## Table of Contents
|
@@ -37,7 +43,7 @@ For more details, check our [paper](https://arxiv.org/abs/2406.18518).
|
|
37 |
|
38 |
## Repository Overview
|
39 |
|
40 |
-
This repository is focused on our
|
41 |
|
42 |
<div align="center">
|
43 |
<img src="https://github.com/apigen-pipeline/apigen-pipeline.github.io/blob/main/img/function-call-overview.png?raw=true"
|
@@ -46,8 +52,8 @@ alt="drawing" width="620"/>
|
|
46 |
|
47 |
Function-calling, or tool use, is one of the key capabilities for AI agents. It requires the model not only understand and generate human-like text but also to execute functional API calls based on natural language instructions. This extends the utility of LLMs beyond simple conversation tasks to dynamic interactions with a variety of digital services and applications, such as retrieving weather information, managing social media platforms, and handling financial services.
|
48 |
|
49 |
-
The instructions will guide you through the setup, usage, and integration of `xLAM-
|
50 |
-
We will first introduce the basic usage, and then walk through the provided tutorial and example scripts.
|
51 |
|
52 |
### Framework Versions
|
53 |
|
@@ -76,7 +82,7 @@ See our [paper](https://arxiv.org/abs/2406.18518) for more detailed analysis.
|
|
76 |
|
77 |
### Basic Usage with Huggingface
|
78 |
|
79 |
-
To use the `xLAM-
|
80 |
```bash
|
81 |
pip install transformers>=4.41.0
|
82 |
```
|
@@ -92,7 +98,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
92 |
|
93 |
torch.random.manual_seed(0)
|
94 |
|
95 |
-
model_name = "Salesforce/xLAM-
|
96 |
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)
|
97 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
98 |
|
@@ -209,7 +215,7 @@ We provide example scripts to deploy our model with `vllm` and run inferences. F
|
|
209 |
pip install vllm openai argparse jinja2
|
210 |
```
|
211 |
|
212 |
-
The example scripts are located in the
|
213 |
|
214 |
#### 1. Test Prompt Template
|
215 |
|
@@ -263,7 +269,7 @@ These resources provide a robust foundation for integrating xLAM models into you
|
|
263 |
|
264 |
## License
|
265 |
|
266 |
-
`xLAM-
|
267 |
|
268 |
## Citation
|
269 |
|
@@ -275,4 +281,4 @@ If you find this repo helpful, please cite our paper:
|
|
275 |
journal={arXiv preprint arXiv:2406.18518},
|
276 |
year={2024}
|
277 |
}
|
278 |
-
```
|
|
|
5 |
<p align="center">
|
6 |
<img width="300px" alt="xLAM" src="https://huggingface.co/Salesforce/xLAM-v0.1-r/resolve/main/xlam-no-background.png">
|
7 |
</p>
|
8 |
+
<p align="center">
|
9 |
+
<a href="https://apigen-pipeline.github.io/">[Homepage]</a> |
|
10 |
+
<a href="https://coder.deepseek.com/">[Paper]</a> |
|
11 |
+
<a href="https://coder.deepseek.com/">[Dataset]</a> |
|
12 |
+
<a href="https://github.com/SalesforceAIResearch/xLAM">[Github]</a>
|
13 |
+
</p>
|
14 |
<hr>
|
15 |
|
16 |
+
|
17 |
Welcome to the xLAM model family! [Large Action Models (LAMs)](https://blog.salesforceairesearch.com/large-action-models/) are advanced large language models designed to enhance decision-making and translate user intentions into executable actions that interact with the world. LAMs autonomously plan and execute tasks to achieve specific goals, serving as the brains of AI agents. They have the potential to automate workflow processes across various domains, making them invaluable for a wide range of applications.
|
18 |
|
19 |
## Table of Contents
|
|
|
43 |
|
44 |
## Repository Overview
|
45 |
|
46 |
+
This repository is focused on our small `xLAM-7b-fc-r` model, which is optimized for function-calling and can be easily deployed on personal devices.
|
47 |
|
48 |
<div align="center">
|
49 |
<img src="https://github.com/apigen-pipeline/apigen-pipeline.github.io/blob/main/img/function-call-overview.png?raw=true"
|
|
|
52 |
|
53 |
Function-calling, or tool use, is one of the key capabilities for AI agents. It requires the model not only understand and generate human-like text but also to execute functional API calls based on natural language instructions. This extends the utility of LLMs beyond simple conversation tasks to dynamic interactions with a variety of digital services and applications, such as retrieving weather information, managing social media platforms, and handling financial services.
|
54 |
|
55 |
+
The instructions will guide you through the setup, usage, and integration of `xLAM-7b-fc-r` with HuggingFace and vLLM.
|
56 |
+
We will first introduce the basic usage, and then walk through the provided tutorial and example scripts in the [examples](https://huggingface.co/Salesforce/xLAM-7b-fc-r/tree/main/examples) folder.
|
57 |
|
58 |
### Framework Versions
|
59 |
|
|
|
82 |
|
83 |
### Basic Usage with Huggingface
|
84 |
|
85 |
+
To use the `xLAM-7b-fc-r` model from Huggingface, please first install the `transformers` library:
|
86 |
```bash
|
87 |
pip install transformers>=4.41.0
|
88 |
```
|
|
|
98 |
|
99 |
torch.random.manual_seed(0)
|
100 |
|
101 |
+
model_name = "Salesforce/xLAM-7b-fc-r"
|
102 |
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)
|
103 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
104 |
|
|
|
215 |
pip install vllm openai argparse jinja2
|
216 |
```
|
217 |
|
218 |
+
The example scripts are located in the [examples](https://huggingface.co/Salesforce/xLAM-7b-fc-r/tree/main/examples) folder.
|
219 |
|
220 |
#### 1. Test Prompt Template
|
221 |
|
|
|
269 |
|
270 |
## License
|
271 |
|
272 |
+
`xLAM-7b-fc-r` is distributed under the CC-BY-NC-4.0 license, with additional terms specified in the [Deepseek license](https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/LICENSE-MODEL).
|
273 |
|
274 |
## Citation
|
275 |
|
|
|
281 |
journal={arXiv preprint arXiv:2406.18518},
|
282 |
year={2024}
|
283 |
}
|
284 |
+
```
|