Please add proper usage example and optimal hyper parameters and their detailed description
#5
by
MonsterMMORPG
- opened
e.g. example code
import torch
from transformers import pipeline
summarizer = pipeline(
"summarization",
"allenai/led-large-16384-arxiv",
device=0 if torch.cuda.is_available() else -1,
)
result = summarizer(wall_of_text,min_length=500,max_length=16384,no_repeat_ngram_size=3,
encoder_no_repeat_ngram_size =3,
repetition_penalty=3.5,
num_beams=4,
early_stopping=True)
with open('allenai-led-large-16384-arxiv.txt', 'w') as f:
f.write(result[0]['summary_text'])
pcuenq
changed discussion status to
closed
@pcuenq I still don't see any information regarding how to use
MonsterMMORPG
changed discussion status to
open