Update README.md
Browse files
README.md
CHANGED
|
@@ -9,14 +9,15 @@ base_model:
|
|
| 9 |
The CultureSPA model from https://github.com/shaoyangxu/CultureSPA
|
| 10 |
|
| 11 |
```
|
| 12 |
-
# load
|
| 13 |
device = torch.device("cuda")
|
| 14 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 15 |
model = AutoModelForCausalLM.from_pretrained(
|
| 16 |
model_path,
|
| 17 |
torch_dtype=torch.bfloat16
|
| 18 |
-
)
|
| 19 |
-
|
|
|
|
| 20 |
messages = [
|
| 21 |
{"role": "system", "content": system_prompt},
|
| 22 |
{"role": "user", "content": instruction},
|
|
|
|
| 9 |
The CultureSPA model from https://github.com/shaoyangxu/CultureSPA
|
| 10 |
|
| 11 |
```
|
| 12 |
+
## load
|
| 13 |
device = torch.device("cuda")
|
| 14 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 15 |
model = AutoModelForCausalLM.from_pretrained(
|
| 16 |
model_path,
|
| 17 |
torch_dtype=torch.bfloat16
|
| 18 |
+
).to(device)
|
| 19 |
+
|
| 20 |
+
## inference
|
| 21 |
messages = [
|
| 22 |
{"role": "system", "content": system_prompt},
|
| 23 |
{"role": "user", "content": instruction},
|