Update README.md
Browse files
README.md
CHANGED
@@ -43,15 +43,15 @@ Thanks so much for your attention, a report with all the technical details leadi
|
|
43 |
The code of Hammer 2.1 models have been in the latest Hugging face transformers and we advise you to install `transformers>=4.34.0`.
|
44 |
|
45 |
## How to Use
|
46 |
-
Hammer2.1 models offer flexibility in deployment and usage, fully supporting both vLLM deployment and Hugging Face Transformers tool calling. For more detailed examples and use cases, please refer to the [
|
47 |
This is a simple example of how to use our model.
|
48 |
~~~python
|
49 |
import torch
|
50 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
51 |
|
52 |
|
53 |
-
tokenizer = AutoTokenizer.from_pretrained("MadeAgents/Hammer2.1-
|
54 |
-
model = AutoModelForCausalLM.from_pretrained("MadeAgents/Hammer2.1-
|
55 |
|
56 |
# Example conversation
|
57 |
messages = [
|
|
|
43 |
The code of Hammer 2.1 models have been in the latest Hugging face transformers and we advise you to install `transformers>=4.34.0`.
|
44 |
|
45 |
## How to Use
|
46 |
+
Hammer2.1 models offer flexibility in deployment and usage, fully supporting both vLLM deployment and Hugging Face Transformers tool calling. For more detailed examples and use cases, please refer to the [examples/README_USING.md](https://github.com/MadeAgents/Hammer/tree/main/examples/README_USING.md) in our repository.
|
47 |
This is a simple example of how to use our model.
|
48 |
~~~python
|
49 |
import torch
|
50 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
51 |
|
52 |
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained("MadeAgents/Hammer2.1-0.5b")
|
54 |
+
model = AutoModelForCausalLM.from_pretrained("MadeAgents/Hammer2.1-0.5b", torch_dtype=torch.bfloat16, device_map="auto")
|
55 |
|
56 |
# Example conversation
|
57 |
messages = [
|