Update README.md
Browse files
README.md
CHANGED
@@ -3,21 +3,21 @@ license: cc-by-4.0
|
|
3 |
datasets:
|
4 |
- Salesforce/xlam-function-calling-60k
|
5 |
- MadeAgents/XLAM-7.5k-Irrelevance
|
6 |
-
base_model: Qwen/
|
7 |
---
|
8 |
-
# Hammer-
|
9 |
|
10 |
## Introduction
|
11 |
-
Hammer-
|
12 |
|
13 |
## Model Details
|
14 |
-
Hammer-
|
15 |
|
16 |
## Tuning Details
|
17 |
Thanks so much for your attention, a report with all the technical details leading to our models will be published soon.
|
18 |
|
19 |
## Evaluation
|
20 |
-
First, we evaluate Hammer-
|
21 |
|
22 |
<div style="text-align: center;">
|
23 |
<img src="figures/bfcl.PNG" alt="overview" width="1480" style="margin: auto;">
|
@@ -32,7 +32,7 @@ In addition, we evaluated our Hammer series (1.5b, 4b, 7b) on other academic ben
|
|
32 |
|
33 |
|
34 |
## Requiements
|
35 |
-
The code of Hammer-
|
36 |
|
37 |
## How to Use
|
38 |
This is a simple example of how to use our model.
|
@@ -41,7 +41,7 @@ import json
|
|
41 |
import torch
|
42 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
43 |
|
44 |
-
model_name = "MadeAgents/Hammer-
|
45 |
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)
|
46 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
47 |
|
|
|
3 |
datasets:
|
4 |
- Salesforce/xlam-function-calling-60k
|
5 |
- MadeAgents/XLAM-7.5k-Irrelevance
|
6 |
+
base_model: Qwen/Qwen1.5-4B-Chat
|
7 |
---
|
8 |
+
# Hammer-4b Function Calling Model
|
9 |
|
10 |
## Introduction
|
11 |
+
Hammer-4b is a cutting-edge Large Language Model (LLM) crafted to boost the critical capability of AI agents: function calling. Differing from existing models focusing on traning data refinement, Hammer-4b optimizes performance primarily through advanced training techniques.
|
12 |
|
13 |
## Model Details
|
14 |
+
Hammer-4b is a finetuned model built upon [Qwen1.5-4B-Chat](https://huggingface.co/Qwen/Qwen1.5-4B-Chat). It's trained using the [APIGen Function Calling Datasets](https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k) containing 60,000 samples, supplemented by [7,500 irrelevance detection data](https://huggingface.co/datasets/MadeAgents/XLAM-7.5k-Irrelevance) we generated. Employing innovative training techniques like function masking, function shuffling, and prompt optimization, Hammer-4b has achieved exceptional performances across numerous benchmarks including [Berkley Function Calling Leaderboard](https://gorilla.cs.berkeley.edu/leaderboard.html), [API-Bank](https://arxiv.org/abs/2304.08244), [Tool-Alpaca](https://arxiv.org/abs/2306.05301), [Nexus Raven](https://github.com/nexusflowai/NexusRaven-V2) and [Seal-Tools](https://arxiv.org/abs/2405.08355).
|
15 |
|
16 |
## Tuning Details
|
17 |
Thanks so much for your attention, a report with all the technical details leading to our models will be published soon.
|
18 |
|
19 |
## Evaluation
|
20 |
+
First, we evaluate Hammer-4b on the Berkeley Function-Calling Leaderboard (BFCL):
|
21 |
|
22 |
<div style="text-align: center;">
|
23 |
<img src="figures/bfcl.PNG" alt="overview" width="1480" style="margin: auto;">
|
|
|
32 |
|
33 |
|
34 |
## Requiements
|
35 |
+
The code of Hammer-4b has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`.
|
36 |
|
37 |
## How to Use
|
38 |
This is a simple example of how to use our model.
|
|
|
41 |
import torch
|
42 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
43 |
|
44 |
+
model_name = "MadeAgents/Hammer-4b"
|
45 |
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto", torch_dtype="auto", trust_remote_code=True)
|
46 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
47 |
|