shibing624
commited on
Commit
•
43821e4
1
Parent(s):
4fc196f
Update README.md
Browse files
README.md
CHANGED
@@ -114,9 +114,9 @@ import torch
|
|
114 |
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
|
115 |
|
116 |
|
117 |
-
model = AutoModelForCausalLM.from_pretrained("baichuan-
|
118 |
-
model.generation_config = GenerationConfig.from_pretrained("baichuan-
|
119 |
-
tokenizer = AutoTokenizer.from_pretrained("baichuan-
|
120 |
device = torch.device(0) if torch.cuda.is_available() else torch.device("cpu")
|
121 |
|
122 |
def generate_prompt(instruction):
|
|
|
114 |
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
|
115 |
|
116 |
|
117 |
+
model = AutoModelForCausalLM.from_pretrained("shibing624/vicuna-baichuan-13b-chat", device_map='auto', torch_dtype=torch.float16, trust_remote_code=True)
|
118 |
+
model.generation_config = GenerationConfig.from_pretrained("shibing624/vicuna-baichuan-13b-chat", trust_remote_code=True)
|
119 |
+
tokenizer = AutoTokenizer.from_pretrained("shibing624/vicuna-baichuan-13b-chat", trust_remote_code=True)
|
120 |
device = torch.device(0) if torch.cuda.is_available() else torch.device("cpu")
|
121 |
|
122 |
def generate_prompt(instruction):
|