w32zhong commited on
Commit
067c3f6
1 Parent(s): de23960

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -12
README.md CHANGED
@@ -19,12 +19,19 @@ license: mit
19
  ---
20
 
21
  ## About
22
- This [repository](https://github.com/approach0/azbert) is a boilerplate to push a mask-filling model to the HuggingFace Model Hub.
23
 
24
- ### Upload to huggingface
25
- 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.*`).
 
 
 
 
 
 
 
26
 
27
- Optionally, test model using the MLM task:
28
  ```sh
29
  pip install pya0 # for math token preprocessing
30
  # testing local checkpoints:
@@ -36,11 +43,3 @@ python test.py approach0/coco-mae-220 approach0/coco-mae-220
36
  > Modify the test examples in `test.txt` to play with it.
37
  > 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).
38
  > A zero means no additional mask positions.
39
-
40
- To upload to huggingface, use the `upload2hgf.sh` script.
41
- Before runnig this script, be sure to check:
42
- * `git-lfs` is installed
43
- * having git-remote named `hgf` reference to `https://huggingface.co/your/repo`
44
- * model contains all the files needed: `config.json` and `pytorch_model.bin`
45
- * tokenizer contains all the files needed: `added_tokens.json`, `special_tokens_map.json`, `tokenizer_config.json`, `vocab.txt` and `tokenizer.json`
46
- * no `tokenizer_file` field in `tokenizer_config.json` (sometimes it is located locally at `~/.cache`)
 
19
  ---
20
 
21
  ## About
22
+ This repository is a boilerplate to push a mask-filling model to the HuggingFace Model Hub.
23
 
24
+ ### Checklist
25
+ * `git-lfs` is installed
26
+ * tokenizer contains all the files needed: `added_tokens.json`, `special_tokens_map.json`, `tokenizer_config.json`, `vocab.txt` and `tokenizer.json`
27
+ * no `tokenizer_file` field in `tokenizer_config.json` (sometimes it is located locally at `~/.cache`)
28
+
29
+ ### Upload
30
+ 1. Put the model checkpoints and optionally log files (`*.bin` and log files `events.out.*`) to the `./ckpt` directory.
31
+ 2. Add a branch `hgf` to point to your huggingface repo. For example `git remote add hgf [email protected]:approach0/mathy-vicuna-13B-FFT`
32
+ 3. Run the `upload2hgf.sh` script.
33
 
34
+ ### Test the MLM task (an example)
35
  ```sh
36
  pip install pya0 # for math token preprocessing
37
  # testing local checkpoints:
 
43
  > Modify the test examples in `test.txt` to play with it.
44
  > 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).
45
  > A zero means no additional mask positions.