Downloads · 30 days
19
6% of all-time downloads
approach0/dpr-cotbert-220
dpr-cotbert-220 is a fill-mask model from approach0. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as mit.
This repository is a boilerplate to push a mask-filling model to the HuggingFace Model Hub.
Downloads · 30 days
19
6% of all-time downloads
All-time downloads
334
Public
Repo size
886 MB
Likes
0
Public
Click a slice to open those files.
.bin441 MB · 99%
From the Hugging Face model README
This repository is a boilerplate to push a mask-filling model to the HuggingFace Model Hub.
Download your tokenizer, model checkpoints, and optionally the training logs (events.out.*) to the ./ckpt directory (do not include any large files except pytorch_model.bin and log files events.out.*).
Optionally, test model using the MLM task:
pip install pya0 # for math token preprocessing
# testing local checkpoints:
python test.py ./ckpt/math-tokenizer ./ckpt/2-2-0/encoder.ckpt
# testing Model Hub checkpoints:
python test.py approach0/coco-mae-220 approach0/coco-mae-220
Note
Modify the test examples intest.txtto play with it. The test file is tab-separated, the first column is additional positions you want to mask for the right-side sentence (useful for masking tokens in math markups). A zero means no additional mask positions.
To upload to huggingface, use the upload2hgf.sh script.
Before runnig this script, be sure to check:
git-lfs is installedhgf reference to https://huggingface.co/your/repoconfig.json and pytorch_model.binadded_tokens.json, special_tokens_map.json, tokenizer_config.json, vocab.txt and tokenizer.jsontokenizer_file field in tokenizer_config.json (sometimes it is located locally at ~/.cache)