Update README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,7 @@ def gen(text, model):
|
|
52 |
入力文:
|
53 |
{text} [/INST] [R_START]
|
54 |
"""
|
55 |
-
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
|
56 |
token_ids.to("cuda")
|
57 |
|
58 |
with torch.no_grad():
|
|
|
52 |
入力文:
|
53 |
{text} [/INST] [R_START]
|
54 |
"""
|
55 |
+
token_ids = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt", truncation=True, max_length=4096)
|
56 |
token_ids.to("cuda")
|
57 |
|
58 |
with torch.no_grad():
|