update model
Browse files- .gitattributes +3 -0
- .keep +0 -0
- README.md +14 -39
- adapter_config.json +26 -0
- adapter_model.bin +3 -0
- added_tokens.json +3 -0
- config.json +1 -0
- inject.json +1 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer.model +0 -0
- tokenizer_config.json +33 -0
- training_args.bin +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
adapter_model.bin filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
training_args.bin filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
events.out.* filter=lfs diff=lfs merge=lfs -text
|
.keep
ADDED
|
File without changes
|
README.md
CHANGED
|
@@ -1,45 +1,20 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
tags:
|
| 4 |
-
- azbert
|
| 5 |
-
- pretraining
|
| 6 |
-
- fill-mask
|
| 7 |
-
widget:
|
| 8 |
-
- text: "$f$ $($ $x$ [MASK] $y$ $)$"
|
| 9 |
-
example_title: "mathy"
|
| 10 |
-
- text: "$x$ [MASK] $x$ $equal$ $2$ $x$"
|
| 11 |
-
example_title: "mathy"
|
| 12 |
-
- text: "Proof by [MASK] that $n$ $fact$ $gt$ $3$ $n$ for $n$ $gt$ $6$"
|
| 13 |
-
example_title: "mathy"
|
| 14 |
-
- text: "Proof by induction that $n$ [MASK] $gt$ $3$ $n$ for $n$ $gt$ $6$"
|
| 15 |
-
example_title: "mathy"
|
| 16 |
-
- text: "The goal of life is [MASK]."
|
| 17 |
-
example_title: "philosophical"
|
| 18 |
-
license: mit
|
| 19 |
---
|
|
|
|
| 20 |
|
| 21 |
-
## About
|
| 22 |
-
This repository is a boilerplate to push a mask-filling model to the HuggingFace Model Hub.
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 git@hf.co:approach0/mathy-vicuna-13B-FFT`
|
| 32 |
-
3. Run the `upload2hgf.sh` script.
|
| 33 |
|
| 34 |
-
|
| 35 |
-
```sh
|
| 36 |
-
pip install pya0 # for math token preprocessing
|
| 37 |
-
# testing local checkpoints:
|
| 38 |
-
python test.py ./ckpt/math-tokenizer ./ckpt/2-2-0/encoder.ckpt
|
| 39 |
-
# testing Model Hub checkpoints:
|
| 40 |
-
python test.py approach0/coco-mae-220 approach0/coco-mae-220
|
| 41 |
-
```
|
| 42 |
-
> **Note**
|
| 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.
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: peft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
+
## Training procedure
|
| 5 |
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
The following `bitsandbytes` quantization config was used during training:
|
| 8 |
+
- load_in_8bit: True
|
| 9 |
+
- load_in_4bit: False
|
| 10 |
+
- llm_int8_threshold: 6.0
|
| 11 |
+
- llm_int8_skip_modules: None
|
| 12 |
+
- llm_int8_enable_fp32_cpu_offload: False
|
| 13 |
+
- llm_int8_has_fp16_weight: False
|
| 14 |
+
- bnb_4bit_quant_type: fp4
|
| 15 |
+
- bnb_4bit_use_double_quant: False
|
| 16 |
+
- bnb_4bit_compute_dtype: float32
|
| 17 |
+
### Framework versions
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
- PEFT 0.4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adapter_config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"auto_mapping": null,
|
| 3 |
+
"base_model_name_or_path": "WizardLM/WizardMath-13B-V1.0",
|
| 4 |
+
"bias": "none",
|
| 5 |
+
"fan_in_fan_out": false,
|
| 6 |
+
"inference_mode": true,
|
| 7 |
+
"init_lora_weights": true,
|
| 8 |
+
"layers_pattern": null,
|
| 9 |
+
"layers_to_transform": null,
|
| 10 |
+
"lora_alpha": 16,
|
| 11 |
+
"lora_dropout": 0.05,
|
| 12 |
+
"modules_to_save": null,
|
| 13 |
+
"peft_type": "LORA",
|
| 14 |
+
"r": 16,
|
| 15 |
+
"revision": null,
|
| 16 |
+
"target_modules": [
|
| 17 |
+
"q_proj",
|
| 18 |
+
"k_proj",
|
| 19 |
+
"v_proj",
|
| 20 |
+
"o_proj",
|
| 21 |
+
"gate_proj",
|
| 22 |
+
"down_proj",
|
| 23 |
+
"up_proj"
|
| 24 |
+
],
|
| 25 |
+
"task_type": "CAUSAL_LM"
|
| 26 |
+
}
|
adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1fe08d0f7339e3076f911dc383b57f8a7be4a9759294986daca113fd3f5d40ff
|
| 3 |
+
size 125368013
|
added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"[PAD]": 32000
|
| 3 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"mode": "finetune", "wandb": "True", "batch_size": "12", "context_length": "2048", "flash_atten": "True", "tokenizer": "WizardLM/WizardMath-13B-V1.0", "model": "WizardLM/WizardMath-13B-V1.0", "dataset": "approach0/retrieval-augment-finetune", "dataset_shuffle": "True", "dataset_map_fn": "datamap_double_train_for_query_and_answer", "collate_fn": "collate_final_dataset_for_generalist", "collate_add_eos": "True", "collate_debug": "True", "eval_during_train": "no", "peft": "{\n\"peft_attach_new\": true,\n\"peft_lora_rank\": 16,\n\"peft_lora_alpha\": 16,\n\"peft_lora_targets\": [\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\", \"gate_proj\", \"down_proj\", \"up_proj\"]\n}", "trainer": "[\n\"--output_dir\", \"<exp_outdir>\",\n\"--save_strategy\", \"steps\",\n\"--save_steps\", 100,\n\"--save_total_limit\", 2,\n\"--evaluation_strategy\", \"no\",\n\"--eval_steps\", 10,\n\"--report_to\", \"wandb\",\n\"--logging_steps\", 1,\n\"--per_device_train_batch_size\", 1,\n\"--remove_unused_columns\", false,\n\"--gradient_accumulation_steps\", 12,\n\"--learning_rate\", 2e-5,\n\"--warmup_steps\", 10,\n\"--optim\", \"adamw_torch\",\n\"--num_train_epochs\", 2,\n\"--fp16\", false,\n\"--bf16\", true,\n\"--seed\", 70\n]", "load_in_8bit": "True", "device_map": null, "deepspeed": "{\n\"en_param_offload\": true\n}", "local_rank": "0", "run": "GCR-13B-wizardmath-generalist", "7b_vicuna_v1_5": "lmsys/vicuna-7b-v1.5", "7b_vicuna_v1_5_32k": "lmsys/longchat-7b-v1.5-32k", "test_lora_repo": "Lajonbot/vicuna-7b-v1.5-PL-lora_adapter_model", "13b_mathy_fft": "approach0/mathy-vicuna-13B-FFT", "7b_wizardmath": "WizardLM/WizardMath-7B-V1.0", "13b_wizardmath": "WizardLM/WizardMath-13B-V1.0", "70b_wizardmath": "WizardLM/WizardMath-70B-V1.0", "7b_mammoth": "TIGER-Lab/MAmmoTH-7B", "13b_mammoth": "TIGER-Lab/MAmmoTH-13B", "34b_mammoth_code": "TIGER-Lab/MAmmoTH-Coder-13B", "70b_mammoth": "TIGER-Lab/MAmmoTH-70B", "7b_tora": "llm-agents/tora-7b-v1.0", "13b_tora": "llm-agents/tora-13b-v1.0", "seed": "70", "output_dir": "./output", "add_sys_paths": "[\"../Progressive-Hint\", \"../math/modeling\"]"}
|
inject.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"model": "WizardLM/WizardMath-13B-V1.0", "tokenizer": "WizardLM/WizardMath-13B-V1.0", "run": "GCR-13B-wizardmath-generalist"}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "</s>",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"unk_token": "</s>"
|
| 6 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
Binary file (500 kB). View file
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"__type": "AddedToken",
|
| 4 |
+
"content": "<s>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"clean_up_tokenization_spaces": false,
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"__type": "AddedToken",
|
| 13 |
+
"content": "</s>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false
|
| 18 |
+
},
|
| 19 |
+
"legacy": false,
|
| 20 |
+
"model_max_length": 1024,
|
| 21 |
+
"pad_token": null,
|
| 22 |
+
"padding_side": "right",
|
| 23 |
+
"sp_model_kwargs": {},
|
| 24 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 25 |
+
"unk_token": {
|
| 26 |
+
"__type": "AddedToken",
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a715ccbe7aeb9ed4cc0f698cdfb669ff20589fbb57a74014fea3aad0a42588fb
|
| 3 |
+
size 6267
|