Update README.md
Browse files
README.md
CHANGED
@@ -403,13 +403,13 @@ order to determine whether treating anxiety might
|
|
403 |
be a potential therapy for improving fog ."""
|
404 |
|
405 |
import torch
|
406 |
-
from transformers import
|
407 |
|
408 |
-
tokenizer =
|
409 |
|
410 |
input_ids = tokenizer(LONG_ARTICLE, return_tensors="pt").input_ids.to("cuda")
|
411 |
|
412 |
-
model =
|
413 |
|
414 |
sequences = model.generate(input_ids, global_attention_mask=global_attention_mask).sequences
|
415 |
|
|
|
403 |
be a potential therapy for improving fog ."""
|
404 |
|
405 |
import torch
|
406 |
+
from transformers import AutoTokenizer, LongT5ForConditionalGeneration
|
407 |
|
408 |
+
tokenizer = AutoTokenizer.from_pretrained("Stancld/longt5-tglobal-large-16384-pubmed-3k_steps")
|
409 |
|
410 |
input_ids = tokenizer(LONG_ARTICLE, return_tensors="pt").input_ids.to("cuda")
|
411 |
|
412 |
+
model = LongT5ForConditionalGeneration.from_pretrained("Stancld/longt5-tglobal-large-16384-pubmed-3k_steps", return_dict_in_generate=True).to("cuda")
|
413 |
|
414 |
sequences = model.generate(input_ids, global_attention_mask=global_attention_mask).sequences
|
415 |
|