PhelixZhen
commited on
Commit
•
67e6fbc
1
Parent(s):
fe34607
Update README.md
Browse files
README.md
CHANGED
@@ -26,11 +26,11 @@ import torch
|
|
26 |
|
27 |
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
28 |
|
29 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
30 |
-
model = AutoModelForCausalLM.from_pretrained('
|
31 |
tokenizer.pad_token = tokenizer.eos_token
|
32 |
|
33 |
-
txt = '
|
34 |
|
35 |
# greedy search
|
36 |
gen_conf = GenerationConfig(
|
|
|
26 |
|
27 |
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
28 |
|
29 |
+
tokenizer = AutoTokenizer.from_pretrained('pathtotokenizer')
|
30 |
+
model = AutoModelForCausalLM.from_pretrained('pathtomodel').to(device)
|
31 |
tokenizer.pad_token = tokenizer.eos_token
|
32 |
|
33 |
+
txt = 'inputtext'
|
34 |
|
35 |
# greedy search
|
36 |
gen_conf = GenerationConfig(
|