Views
No views yet
| Model | Size | CTX | Avg |
|---|---|---|---|
| mega-encoder-small-16k-v1 | 122M | 16384 | 0.777 |
| bert-base-uncased | 110M | 512 | 0.7905 |
| roberta-base | 125M | 514 | 0.86 |
| bert-plus-L8-4096-v1.0 | 88.1M | 4096 | 0.8278 |
| mega-wikitext103 | 7.0M | 10000 | 0.48 |
| Model | Size | CTX | Avg | CoLA | SST2 | MRPC | STSB | QQP | MNLI | QNLI | RTE |
|---|---|---|---|---|---|---|---|---|---|---|---|
| mega-encoder-small-16k-v1 | 122M | 16384 | 0.777 | 0.454 | 0.914 | 0.8404 | 0.906 | 0.894 | 0.806 | 0.842 | 0.556 |
| bert-base-uncased | 110M | 512 | 0.7905 | 0.521 | 0.935 | 0.889 | 0.858 | 0.712 | 0.84 | 0.905 | 0.664 |
| roberta-base | 125M | 514 | 0.86 | 0.64 | 0.95 | 0.9 | 0.91 | 0.92 | 0.88 | 0.93 | 0.79 |
| bert-plus-L8-4096-v1.0 | 88.1M | 4096 | 0.8278 | 0.6272 | 0.906 | 0.8659 | 0.9207 | 0.906 | 0.832 | 0.9 | 0.6643 |
| mega-wikitext103 | 7M | 10000 | 0.480 | 0.00 | 0.732 | 0.748 | -0.087 | 0.701 | 0.54 | 0.598 | 0.513 |
"simple" relative positional embeddings instead of the rotary embeddings touted in the paper.
facebook/bart-large
1import json
2from transformers import pipeline
3
4pipe = pipeline("fill-mask", model="BEE-spoke-data/mega-encoder-small-16k-v1")
5text = "I love to <mask> memes."
6result = pipe(text)
7print(json.dumps(result, indent=2))<task>, using gradient checkpointing makes training at 16384 context quite feasible. By installing the transformers fork below and passing gradient_checkpointing=True in the training args, you should be able to finetune at batch size 1 with VRAM to spare on a single 3090/4090.1pip uninstall -y transformers
2pip install -U git+https://github.com/pszemraj/transformers.git@mega-gradient-checkpointing
3pip install -U huggingface-hub@misc{beespoke_data_2024,
author = {Peter Szemraj and Vincent Haines and {BEEspoke Data}},
title = {mega-encoder-small-16k-v1 (Revision 1476bcf)},
year = 2024,
url = {https://huggingface.co/BEE-spoke-data/mega-encoder-small-16k-v1},
doi = {10.57967/hf/1837},
publisher = {Hugging Face}
}