Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
# GATEAU-LLaMA-7B-5K-10K
|
6 |
+
|
7 |
+
A simple demo for the deployment of the model:
|
8 |
+
```python
|
9 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
10 |
+
import torch
|
11 |
+
tokenizer = AutoTokenizer.from_pretrained("ssz1111/GATEAU-5k-10k", trust_remote_code=True)
|
12 |
+
model = AutoModelForCausalLM.from_pretrained("ssz1111/GATEAU-5k-10k", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
|
13 |
+
model = model.eval()
|
14 |
+
query = "\n\n Hello."
|
15 |
+
response, history = model.chat(tokenizer, query, history=[], max_new_tokens=512, temperature=1)
|
16 |
+
print(response)
|
17 |
+
```
|