Views
No views yet
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
2
3tokenizer = AutoTokenizer.from_pretrained("ccdv/lsg-bart-base-4096-wcep", trust_remote_code=True)
4model = AutoModelForSeq2SeqLM.from_pretrained("ccdv/lsg-bart-base-4096-wcep", trust_remote_code=True)
5
6text = "Replace by what you want."
7pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, device=0)
8generated_text = pipe(text, truncation=True, max_length=64, no_repeat_ngram_size=7)| Length | Sparse Type | Block Size | Sparsity | Connexions | R1 | R2 | RL | RLsum |
|---|---|---|---|---|---|---|---|---|
| 4096 | Local | 256 | 0 | 768 | 46.02 | 24.23 | 37.38 | 38.72 |
| 4096 | Local | 128 | 0 | 384 | 45.43 | 23.86 | 36.94 | 38.30 |
| 4096 | Pooling | 128 | 4 | 644 | 45.36 | 23.61 | 36.75 | 38.06 |
| 4096 | Stride | 128 | 4 | 644 | 45.87 | 24.31 | 37.41 | 38.70 |
| 4096 | Block Stride | 128 | 4 | 644 | 45.78 | 24.16 | 37.20 | 38.48 |
| 4096 | Norm | 128 | 4 | 644 | 45.34 | 23.39 | 36.47 | 37.78 |
| 4096 | LSH | 128 | 4 | 644 | 45.15 | 23.53 | 36.74 | 38.02 |
| Length | Sparse Type | Block Size | Sparsity | Connexions | R1 | R2 | RL | RLsum |
|---|---|---|---|---|---|---|---|---|
| 4096 | Local | 64 | 0 | 192 | 44.48 | 22.98 | 36.20 | 37.52 |
| 4096 | Local | 32 | 0 | 96 | 43.60 | 22.17 | 35.61 | 36.66 |
| 4096 | Pooling | 32 | 4 | 160 | 43.91 | 22.41 | 35.80 | 36.92 |
| 4096 | Stride | 32 | 4 | 160 | 44.62 | 23.11 | 36.32 | 37.53 |
| 4096 | Block Stride | 32 | 4 | 160 | 44.47 | 23.02 | 36.28 | 37.46 |
| 4096 | Norm | 32 | 4 | 160 | 44.45 | 23.03 | 36.10 | 37.33 |
| 4096 | LSH | 32 | 4 | 160 | 43.87 | 22.50 | 35.75 | 36.93 |
