Views
No views yet
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
2
3tokenizer = AutoTokenizer.from_pretrained("ccdv/lsg-bart-base-16384-mediasum", trust_remote_code=True)
4model = AutoModelForSeq2SeqLM.from_pretrained("ccdv/lsg-bart-base-16384-mediasum", trust_remote_code=True)
5
6text = "Replace by what you want."
7pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, device=0)
8generated_text = pipe(
9 text,
10 truncation=True,
11 max_length=64,
12 no_repeat_ngram_size=7,
13 num_beams=2,
14 early_stopping=True
15 )| Length | Global tokens | Fine-tuning | Block Size | Sparsity | Connexions | R1 | R2 | RL | RLsum |
|---|---|---|---|---|---|---|---|---|---|
| 16384 | 64 | Full | 256 | 0 | 768 | 35.31 | 18.35 | 31.81 | 32.47 |
| 16384 | 1 | Full | 256 | 0 | 768 | 35.21 | 18.20 | 31.73 | 32.37 |
| 16384 | 64 | Global only | 256 | 0 | 768 | 35.22 | 18.08 | 31.54 | 32.21 |
| 16384 | 1 | None | 256 | 0 | 768 | 35.17 | 18.13 | 31.54 | 32.20 |
| Length | Global tokens | Fine-tuning | Block Size | Sparsity | Connexions | R1 | R2 | RL | RLsum |
|---|---|---|---|---|---|---|---|---|---|
| 4096 | 1 | - | 256 | 0 | 768 | 35.16 | 18.13 | 31.54 | 32.20 |
