JustinLin610
commited on
Commit
•
c56a582
1
Parent(s):
f7cc81f
Update README.md
Browse files
README.md
CHANGED
@@ -48,8 +48,8 @@ Here provides a code snippet with `apply_chat_template` to show you how to load
|
|
48 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
49 |
device = "cuda" # the device to load the model onto
|
50 |
|
51 |
-
model = AutoModelForCausalLM.from_pretrained("Qwen2/Qwen2-beta-
|
52 |
-
tokenizer = AutoTokenizer.from_pretrained("Qwen2/Qwen2-beta-
|
53 |
|
54 |
prompt = "Give me a short introduction to large language model."
|
55 |
|
|
|
48 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
49 |
device = "cuda" # the device to load the model onto
|
50 |
|
51 |
+
model = AutoModelForCausalLM.from_pretrained("Qwen2/Qwen2-beta-14B-Chat", device_map="auto")
|
52 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen2/Qwen2-beta-14B-Chat")
|
53 |
|
54 |
prompt = "Give me a short introduction to large language model."
|
55 |
|