Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```
|
| 2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 3 |
+
|
| 4 |
+
model_name = "shellchat-v1"
|
| 5 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True).to("cuda")
|
| 6 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 7 |
+
|
| 8 |
+
query = "hello world!"
|
| 9 |
+
history = []
|
| 10 |
+
|
| 11 |
+
response = model.chat(query, history, tokenizer)
|
| 12 |
+
```
|