Views
No views yet
| Versions | $d_m$ | $d_{ff}$ | $d_{kv}$ | $n_h$ | $n_e/n_d$ | # P |
|---|---|---|---|---|---|---|
| LongLM-small | 512 | 2,048 | 64 | 8 | 6/6 | 60M |
| LongLM-base | 768 | 3,072 | 64 | 12 | 12/12 | 223M |
| LongLM-large | 1,536 | 3,072 | 64 | 12 | 24/32 | 1B |
1from transformers import T5Tokenizer, T5ForConditionalGeneration
2tokenizer = T5Tokenizer.from_pretrained('LongLM-large')
3tokenizer.add_special_tokens({"additional_special_tokens": ["<extra_id_%d>"%d for d in range(100)]})
4model = T5ForConditionalGeneration.from_pretrained('LongLM-large')1input_ids = tokenizer("小咕噜对,<extra_id_1>",return_tensors="pt", padding=True, truncation=True, max_length=512).input_ids.to(device)
2
3gen = model.generate(input_ids, do_sample=True, decoder_start_token_id=1, top_p=0.9, max_length=512)datasets 1.6.2
deepspeed 0.3.16
huggingface-hub 0.0.8
jieba 0.42.1
jsonlines 2.0.0
nltk 3.5
numpy 1.19.5
pytorch-lightning 1.2.0
regex 2020.11.13
rouge 1.0.1
rouge-score 0.0.4
sacrebleu 1.5.0
scipy 1.5.4
sentencepiece 0.1.95
tokenizers 0.10.1
torch 1.8.1
torchaudio 0.8.0
torchmetrics 0.2.0
torchvision 0.9.0
transformers 4.6.11@misc{guan2021lot,
2 title={LOT: A Benchmark for Evaluating Chinese Long Text Understanding and Generation},
3 author={Jian Guan and Zhuoer Feng and Yamei Chen and Ruilin He and Xiaoxi Mao and Changjie Fan and Minlie Huang},
4 year={2021},
5 eprint={2108.12960},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}