Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +1 -0
- cfg.yml +9 -0
- merged/README.md +41 -0
- merged/config.json +40 -0
- merged/mergekit_config.yml +9 -0
- merged/model-00001-of-00004.safetensors +3 -0
- merged/model-00002-of-00004.safetensors +3 -0
- merged/model-00003-of-00004.safetensors +3 -0
- merged/model-00004-of-00004.safetensors +3 -0
- merged/model.safetensors.index.json +1 -0
- merged/special_tokens_map.json +16 -0
- merged/tokenizer.json +3 -0
- merged/tokenizer_config.json +2063 -0
- mergekit/.github/workflows/pre-commit.yml +39 -0
- mergekit/.gitignore +160 -0
- mergekit/.pre-commit-config.yaml +20 -0
- mergekit/LICENSE +165 -0
- mergekit/README.md +418 -0
- mergekit/docs/evolve.md +176 -0
- mergekit/docs/moe.md +124 -0
- mergekit/examples/bio-merge.yml +15 -0
- mergekit/examples/gradient-slerp.yml +20 -0
- mergekit/examples/linear.yml +12 -0
- mergekit/examples/mega.yml +37 -0
- mergekit/examples/orcamini-platy-44layer.yml +9 -0
- mergekit/examples/ties.yml +22 -0
- mergekit/mergekit.egg-info/PKG-INFO +458 -0
- mergekit/mergekit.egg-info/SOURCES.txt +119 -0
- mergekit/mergekit.egg-info/dependency_links.txt +1 -0
- mergekit/mergekit.egg-info/entry_points.txt +10 -0
- mergekit/mergekit.egg-info/requires.txt +34 -0
- mergekit/mergekit.egg-info/top_level.txt +1 -0
- mergekit/mergekit/__init__.py +0 -0
- mergekit/mergekit/__pycache__/__init__.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/architecture.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/card.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/common.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/config.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/graph.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/merge.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/options.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/plan.cpython-310.pyc +0 -0
- mergekit/mergekit/__pycache__/sparsify.cpython-310.pyc +0 -0
- mergekit/mergekit/_data/__init__.py +0 -0
- mergekit/mergekit/_data/__pycache__/__init__.cpython-310.pyc +0 -0
- mergekit/mergekit/_data/architectures/__init__.py +0 -0
- mergekit/mergekit/_data/architectures/__pycache__/__init__.cpython-310.pyc +0 -0
- mergekit/mergekit/_data/architectures/baichuan.json +47 -0
- mergekit/mergekit/_data/architectures/bert-masked-lm.json +119 -0
- mergekit/mergekit/_data/architectures/bert-sequence-classification.json +118 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
merged/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
cfg.yml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
models:
|
3 |
+
- model: Sao10K/L3.1-8B-Niitama-v1.1
|
4 |
+
- model: akjindal53244/Llama-3.1-Storm-8B
|
5 |
+
merge_method: slerp
|
6 |
+
base_model: Sao10K/L3.1-8B-Niitama-v1.1
|
7 |
+
parameters:
|
8 |
+
t: 0.0001
|
9 |
+
dtype: bfloat16
|
merged/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model:
|
3 |
+
- Sao10K/L3.1-8B-Niitama-v1.1
|
4 |
+
- akjindal53244/Llama-3.1-Storm-8B
|
5 |
+
library_name: transformers
|
6 |
+
tags:
|
7 |
+
- mergekit
|
8 |
+
- merge
|
9 |
+
|
10 |
+
---
|
11 |
+
# Untitled Model (1)
|
12 |
+
|
13 |
+
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
14 |
+
|
15 |
+
## Merge Details
|
16 |
+
### Merge Method
|
17 |
+
|
18 |
+
This model was merged using the SLERP merge method.
|
19 |
+
|
20 |
+
### Models Merged
|
21 |
+
|
22 |
+
The following models were included in the merge:
|
23 |
+
* [Sao10K/L3.1-8B-Niitama-v1.1](https://huggingface.co/Sao10K/L3.1-8B-Niitama-v1.1)
|
24 |
+
* [akjindal53244/Llama-3.1-Storm-8B](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B)
|
25 |
+
|
26 |
+
### Configuration
|
27 |
+
|
28 |
+
The following YAML configuration was used to produce this model:
|
29 |
+
|
30 |
+
```yaml
|
31 |
+
|
32 |
+
models:
|
33 |
+
- model: Sao10K/L3.1-8B-Niitama-v1.1
|
34 |
+
- model: akjindal53244/Llama-3.1-Storm-8B
|
35 |
+
merge_method: slerp
|
36 |
+
base_model: Sao10K/L3.1-8B-Niitama-v1.1
|
37 |
+
parameters:
|
38 |
+
t: 0.0001
|
39 |
+
dtype: bfloat16
|
40 |
+
|
41 |
+
```
|
merged/config.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Sao10K/L3.1-8B-Niitama-v1.1",
|
3 |
+
"architectures": [
|
4 |
+
"LlamaForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_bias": false,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bos_token_id": 128000,
|
9 |
+
"eos_token_id": [
|
10 |
+
128001,
|
11 |
+
128008,
|
12 |
+
128009
|
13 |
+
],
|
14 |
+
"head_dim": 128,
|
15 |
+
"hidden_act": "silu",
|
16 |
+
"hidden_size": 4096,
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"intermediate_size": 14336,
|
19 |
+
"max_position_embeddings": 131072,
|
20 |
+
"mlp_bias": false,
|
21 |
+
"model_type": "llama",
|
22 |
+
"num_attention_heads": 32,
|
23 |
+
"num_hidden_layers": 32,
|
24 |
+
"num_key_value_heads": 8,
|
25 |
+
"pretraining_tp": 1,
|
26 |
+
"rms_norm_eps": 1e-05,
|
27 |
+
"rope_scaling": {
|
28 |
+
"factor": 8.0,
|
29 |
+
"high_freq_factor": 4.0,
|
30 |
+
"low_freq_factor": 1.0,
|
31 |
+
"original_max_position_embeddings": 8192,
|
32 |
+
"rope_type": "llama3"
|
33 |
+
},
|
34 |
+
"rope_theta": 500000.0,
|
35 |
+
"tie_word_embeddings": false,
|
36 |
+
"torch_dtype": "bfloat16",
|
37 |
+
"transformers_version": "4.47.1",
|
38 |
+
"use_cache": true,
|
39 |
+
"vocab_size": 128256
|
40 |
+
}
|
merged/mergekit_config.yml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
models:
|
3 |
+
- model: Sao10K/L3.1-8B-Niitama-v1.1
|
4 |
+
- model: akjindal53244/Llama-3.1-Storm-8B
|
5 |
+
merge_method: slerp
|
6 |
+
base_model: Sao10K/L3.1-8B-Niitama-v1.1
|
7 |
+
parameters:
|
8 |
+
t: 0.0001
|
9 |
+
dtype: bfloat16
|
merged/model-00001-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af9a5b2faf534b3436326bdbeefa80b0fd86f2bbd8e7f0928c00159d377fb203
|
3 |
+
size 4953586384
|
merged/model-00002-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:847a742e9d75abd2a5a0e5dc5115a49ad2a65eca3d7fc892cda15562279eaf6b
|
3 |
+
size 4999819336
|
merged/model-00003-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:751446ae7557167d61feda071f498d9dfe92724c3edd0369d155d0d3f41d6032
|
3 |
+
size 4915916144
|
merged/model-00004-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c10b6ad7984b33e5b85099c8efca491933b98159eef931b841690e769d8e52aa
|
3 |
+
size 1191234472
|
merged/model.safetensors.index.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"metadata": {"mergekit_version": "0.0.5.2", "total_size": 16060522496}, "weight_map": {"lm_head.weight": "model-00001-of-00004.safetensors", "model.embed_tokens.weight": "model-00001-of-00004.safetensors", "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors", "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors", "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors", "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors", "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors", "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.10.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.mlp.up_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.post_attention_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00004.safetensors", "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.11.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.mlp.up_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.post_attention_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.11.self_attn.k_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.self_attn.o_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.self_attn.q_proj.weight": "model-00001-of-00004.safetensors", "model.layers.11.self_attn.v_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.12.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.mlp.up_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.post_attention_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.12.self_attn.k_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.self_attn.o_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.self_attn.q_proj.weight": "model-00001-of-00004.safetensors", "model.layers.12.self_attn.v_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.13.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.mlp.up_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.post_attention_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.13.self_attn.k_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.self_attn.o_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.self_attn.q_proj.weight": "model-00001-of-00004.safetensors", "model.layers.13.self_attn.v_proj.weight": "model-00001-of-00004.safetensors", "model.layers.14.input_layernorm.weight": "model-00001-of-00004.safetensors", "model.layers.14.mlp.down_proj.weight": "model-00001-of-00004.safetensors", "model.layers.14.mlp.gate_proj.weight": "model-00001-of-00004.safetensors", "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.19.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.2.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.2.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.2.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.20.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.21.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.21.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.21.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.22.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.22.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.22.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.23.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.23.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.23.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.24.mlp.down_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.mlp.gate_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.mlp.up_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.post_attention_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.24.self_attn.k_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.self_attn.o_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.self_attn.q_proj.weight": "model-00002-of-00004.safetensors", "model.layers.24.self_attn.v_proj.weight": "model-00002-of-00004.safetensors", "model.layers.25.input_layernorm.weight": "model-00002-of-00004.safetensors", "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.3.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.3.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.30.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.31.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.31.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.31.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.4.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.4.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.5.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.5.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.6.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.mlp.gate_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.mlp.up_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.post_attention_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.6.self_attn.k_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.self_attn.o_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.self_attn.q_proj.weight": "model-00003-of-00004.safetensors", "model.layers.6.self_attn.v_proj.weight": "model-00003-of-00004.safetensors", "model.layers.7.input_layernorm.weight": "model-00003-of-00004.safetensors", "model.layers.7.mlp.down_proj.weight": "model-00003-of-00004.safetensors", "model.layers.7.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.7.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.input_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.8.mlp.down_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.8.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.input_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.9.mlp.down_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.mlp.gate_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.mlp.up_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.post_attention_layernorm.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.k_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.o_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.q_proj.weight": "model-00004-of-00004.safetensors", "model.layers.9.self_attn.v_proj.weight": "model-00004-of-00004.safetensors", "model.norm.weight": "model-00004-of-00004.safetensors"}}
|
merged/special_tokens_map.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<|begin_of_text|>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|eot_id|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
}
|
16 |
+
}
|
merged/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
|
3 |
+
size 17209920
|
merged/tokenizer_config.json
ADDED
@@ -0,0 +1,2063 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"128000": {
|
4 |
+
"content": "<|begin_of_text|>",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"128001": {
|
12 |
+
"content": "<|end_of_text|>",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"128002": {
|
20 |
+
"content": "<|reserved_special_token_0|>",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"128003": {
|
28 |
+
"content": "<|reserved_special_token_1|>",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"128004": {
|
36 |
+
"content": "<|finetune_right_pad_id|>",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"128005": {
|
44 |
+
"content": "<|reserved_special_token_2|>",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"128006": {
|
52 |
+
"content": "<|start_header_id|>",
|
53 |
+
"lstrip": false,
|
54 |
+
"normalized": false,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": false,
|
57 |
+
"special": true
|
58 |
+
},
|
59 |
+
"128007": {
|
60 |
+
"content": "<|end_header_id|>",
|
61 |
+
"lstrip": false,
|
62 |
+
"normalized": false,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": false,
|
65 |
+
"special": true
|
66 |
+
},
|
67 |
+
"128008": {
|
68 |
+
"content": "<|eom_id|>",
|
69 |
+
"lstrip": false,
|
70 |
+
"normalized": false,
|
71 |
+
"rstrip": false,
|
72 |
+
"single_word": false,
|
73 |
+
"special": true
|
74 |
+
},
|
75 |
+
"128009": {
|
76 |
+
"content": "<|eot_id|>",
|
77 |
+
"lstrip": false,
|
78 |
+
"normalized": false,
|
79 |
+
"rstrip": false,
|
80 |
+
"single_word": false,
|
81 |
+
"special": true
|
82 |
+
},
|
83 |
+
"128010": {
|
84 |
+
"content": "<|python_tag|>",
|
85 |
+
"lstrip": false,
|
86 |
+
"normalized": false,
|
87 |
+
"rstrip": false,
|
88 |
+
"single_word": false,
|
89 |
+
"special": true
|
90 |
+
},
|
91 |
+
"128011": {
|
92 |
+
"content": "<|reserved_special_token_3|>",
|
93 |
+
"lstrip": false,
|
94 |
+
"normalized": false,
|
95 |
+
"rstrip": false,
|
96 |
+
"single_word": false,
|
97 |
+
"special": true
|
98 |
+
},
|
99 |
+
"128012": {
|
100 |
+
"content": "<|reserved_special_token_4|>",
|
101 |
+
"lstrip": false,
|
102 |
+
"normalized": false,
|
103 |
+
"rstrip": false,
|
104 |
+
"single_word": false,
|
105 |
+
"special": true
|
106 |
+
},
|
107 |
+
"128013": {
|
108 |
+
"content": "<|reserved_special_token_5|>",
|
109 |
+
"lstrip": false,
|
110 |
+
"normalized": false,
|
111 |
+
"rstrip": false,
|
112 |
+
"single_word": false,
|
113 |
+
"special": true
|
114 |
+
},
|
115 |
+
"128014": {
|
116 |
+
"content": "<|reserved_special_token_6|>",
|
117 |
+
"lstrip": false,
|
118 |
+
"normalized": false,
|
119 |
+
"rstrip": false,
|
120 |
+
"single_word": false,
|
121 |
+
"special": true
|
122 |
+
},
|
123 |
+
"128015": {
|
124 |
+
"content": "<|reserved_special_token_7|>",
|
125 |
+
"lstrip": false,
|
126 |
+
"normalized": false,
|
127 |
+
"rstrip": false,
|
128 |
+
"single_word": false,
|
129 |
+
"special": true
|
130 |
+
},
|
131 |
+
"128016": {
|
132 |
+
"content": "<|reserved_special_token_8|>",
|
133 |
+
"lstrip": false,
|
134 |
+
"normalized": false,
|
135 |
+
"rstrip": false,
|
136 |
+
"single_word": false,
|
137 |
+
"special": true
|
138 |
+
},
|
139 |
+
"128017": {
|
140 |
+
"content": "<|reserved_special_token_9|>",
|
141 |
+
"lstrip": false,
|
142 |
+
"normalized": false,
|
143 |
+
"rstrip": false,
|
144 |
+
"single_word": false,
|
145 |
+
"special": true
|
146 |
+
},
|
147 |
+
"128018": {
|
148 |
+
"content": "<|reserved_special_token_10|>",
|
149 |
+
"lstrip": false,
|
150 |
+
"normalized": false,
|
151 |
+
"rstrip": false,
|
152 |
+
"single_word": false,
|
153 |
+
"special": true
|
154 |
+
},
|
155 |
+
"128019": {
|
156 |
+
"content": "<|reserved_special_token_11|>",
|
157 |
+
"lstrip": false,
|
158 |
+
"normalized": false,
|
159 |
+
"rstrip": false,
|
160 |
+
"single_word": false,
|
161 |
+
"special": true
|
162 |
+
},
|
163 |
+
"128020": {
|
164 |
+
"content": "<|reserved_special_token_12|>",
|
165 |
+
"lstrip": false,
|
166 |
+
"normalized": false,
|
167 |
+
"rstrip": false,
|
168 |
+
"single_word": false,
|
169 |
+
"special": true
|
170 |
+
},
|
171 |
+
"128021": {
|
172 |
+
"content": "<|reserved_special_token_13|>",
|
173 |
+
"lstrip": false,
|
174 |
+
"normalized": false,
|
175 |
+
"rstrip": false,
|
176 |
+
"single_word": false,
|
177 |
+
"special": true
|
178 |
+
},
|
179 |
+
"128022": {
|
180 |
+
"content": "<|reserved_special_token_14|>",
|
181 |
+
"lstrip": false,
|
182 |
+
"normalized": false,
|
183 |
+
"rstrip": false,
|
184 |
+
"single_word": false,
|
185 |
+
"special": true
|
186 |
+
},
|
187 |
+
"128023": {
|
188 |
+
"content": "<|reserved_special_token_15|>",
|
189 |
+
"lstrip": false,
|
190 |
+
"normalized": false,
|
191 |
+
"rstrip": false,
|
192 |
+
"single_word": false,
|
193 |
+
"special": true
|
194 |
+
},
|
195 |
+
"128024": {
|
196 |
+
"content": "<|reserved_special_token_16|>",
|
197 |
+
"lstrip": false,
|
198 |
+
"normalized": false,
|
199 |
+
"rstrip": false,
|
200 |
+
"single_word": false,
|
201 |
+
"special": true
|
202 |
+
},
|
203 |
+
"128025": {
|
204 |
+
"content": "<|reserved_special_token_17|>",
|
205 |
+
"lstrip": false,
|
206 |
+
"normalized": false,
|
207 |
+
"rstrip": false,
|
208 |
+
"single_word": false,
|
209 |
+
"special": true
|
210 |
+
},
|
211 |
+
"128026": {
|
212 |
+
"content": "<|reserved_special_token_18|>",
|
213 |
+
"lstrip": false,
|
214 |
+
"normalized": false,
|
215 |
+
"rstrip": false,
|
216 |
+
"single_word": false,
|
217 |
+
"special": true
|
218 |
+
},
|
219 |
+
"128027": {
|
220 |
+
"content": "<|reserved_special_token_19|>",
|
221 |
+
"lstrip": false,
|
222 |
+
"normalized": false,
|
223 |
+
"rstrip": false,
|
224 |
+
"single_word": false,
|
225 |
+
"special": true
|
226 |
+
},
|
227 |
+
"128028": {
|
228 |
+
"content": "<|reserved_special_token_20|>",
|
229 |
+
"lstrip": false,
|
230 |
+
"normalized": false,
|
231 |
+
"rstrip": false,
|
232 |
+
"single_word": false,
|
233 |
+
"special": true
|
234 |
+
},
|
235 |
+
"128029": {
|
236 |
+
"content": "<|reserved_special_token_21|>",
|
237 |
+
"lstrip": false,
|
238 |
+
"normalized": false,
|
239 |
+
"rstrip": false,
|
240 |
+
"single_word": false,
|
241 |
+
"special": true
|
242 |
+
},
|
243 |
+
"128030": {
|
244 |
+
"content": "<|reserved_special_token_22|>",
|
245 |
+
"lstrip": false,
|
246 |
+
"normalized": false,
|
247 |
+
"rstrip": false,
|
248 |
+
"single_word": false,
|
249 |
+
"special": true
|
250 |
+
},
|
251 |
+
"128031": {
|
252 |
+
"content": "<|reserved_special_token_23|>",
|
253 |
+
"lstrip": false,
|
254 |
+
"normalized": false,
|
255 |
+
"rstrip": false,
|
256 |
+
"single_word": false,
|
257 |
+
"special": true
|
258 |
+
},
|
259 |
+
"128032": {
|
260 |
+
"content": "<|reserved_special_token_24|>",
|
261 |
+
"lstrip": false,
|
262 |
+
"normalized": false,
|
263 |
+
"rstrip": false,
|
264 |
+
"single_word": false,
|
265 |
+
"special": true
|
266 |
+
},
|
267 |
+
"128033": {
|
268 |
+
"content": "<|reserved_special_token_25|>",
|
269 |
+
"lstrip": false,
|
270 |
+
"normalized": false,
|
271 |
+
"rstrip": false,
|
272 |
+
"single_word": false,
|
273 |
+
"special": true
|
274 |
+
},
|
275 |
+
"128034": {
|
276 |
+
"content": "<|reserved_special_token_26|>",
|
277 |
+
"lstrip": false,
|
278 |
+
"normalized": false,
|
279 |
+
"rstrip": false,
|
280 |
+
"single_word": false,
|
281 |
+
"special": true
|
282 |
+
},
|
283 |
+
"128035": {
|
284 |
+
"content": "<|reserved_special_token_27|>",
|
285 |
+
"lstrip": false,
|
286 |
+
"normalized": false,
|
287 |
+
"rstrip": false,
|
288 |
+
"single_word": false,
|
289 |
+
"special": true
|
290 |
+
},
|
291 |
+
"128036": {
|
292 |
+
"content": "<|reserved_special_token_28|>",
|
293 |
+
"lstrip": false,
|
294 |
+
"normalized": false,
|
295 |
+
"rstrip": false,
|
296 |
+
"single_word": false,
|
297 |
+
"special": true
|
298 |
+
},
|
299 |
+
"128037": {
|
300 |
+
"content": "<|reserved_special_token_29|>",
|
301 |
+
"lstrip": false,
|
302 |
+
"normalized": false,
|
303 |
+
"rstrip": false,
|
304 |
+
"single_word": false,
|
305 |
+
"special": true
|
306 |
+
},
|
307 |
+
"128038": {
|
308 |
+
"content": "<|reserved_special_token_30|>",
|
309 |
+
"lstrip": false,
|
310 |
+
"normalized": false,
|
311 |
+
"rstrip": false,
|
312 |
+
"single_word": false,
|
313 |
+
"special": true
|
314 |
+
},
|
315 |
+
"128039": {
|
316 |
+
"content": "<|reserved_special_token_31|>",
|
317 |
+
"lstrip": false,
|
318 |
+
"normalized": false,
|
319 |
+
"rstrip": false,
|
320 |
+
"single_word": false,
|
321 |
+
"special": true
|
322 |
+
},
|
323 |
+
"128040": {
|
324 |
+
"content": "<|reserved_special_token_32|>",
|
325 |
+
"lstrip": false,
|
326 |
+
"normalized": false,
|
327 |
+
"rstrip": false,
|
328 |
+
"single_word": false,
|
329 |
+
"special": true
|
330 |
+
},
|
331 |
+
"128041": {
|
332 |
+
"content": "<|reserved_special_token_33|>",
|
333 |
+
"lstrip": false,
|
334 |
+
"normalized": false,
|
335 |
+
"rstrip": false,
|
336 |
+
"single_word": false,
|
337 |
+
"special": true
|
338 |
+
},
|
339 |
+
"128042": {
|
340 |
+
"content": "<|reserved_special_token_34|>",
|
341 |
+
"lstrip": false,
|
342 |
+
"normalized": false,
|
343 |
+
"rstrip": false,
|
344 |
+
"single_word": false,
|
345 |
+
"special": true
|
346 |
+
},
|
347 |
+
"128043": {
|
348 |
+
"content": "<|reserved_special_token_35|>",
|
349 |
+
"lstrip": false,
|
350 |
+
"normalized": false,
|
351 |
+
"rstrip": false,
|
352 |
+
"single_word": false,
|
353 |
+
"special": true
|
354 |
+
},
|
355 |
+
"128044": {
|
356 |
+
"content": "<|reserved_special_token_36|>",
|
357 |
+
"lstrip": false,
|
358 |
+
"normalized": false,
|
359 |
+
"rstrip": false,
|
360 |
+
"single_word": false,
|
361 |
+
"special": true
|
362 |
+
},
|
363 |
+
"128045": {
|
364 |
+
"content": "<|reserved_special_token_37|>",
|
365 |
+
"lstrip": false,
|
366 |
+
"normalized": false,
|
367 |
+
"rstrip": false,
|
368 |
+
"single_word": false,
|
369 |
+
"special": true
|
370 |
+
},
|
371 |
+
"128046": {
|
372 |
+
"content": "<|reserved_special_token_38|>",
|
373 |
+
"lstrip": false,
|
374 |
+
"normalized": false,
|
375 |
+
"rstrip": false,
|
376 |
+
"single_word": false,
|
377 |
+
"special": true
|
378 |
+
},
|
379 |
+
"128047": {
|
380 |
+
"content": "<|reserved_special_token_39|>",
|
381 |
+
"lstrip": false,
|
382 |
+
"normalized": false,
|
383 |
+
"rstrip": false,
|
384 |
+
"single_word": false,
|
385 |
+
"special": true
|
386 |
+
},
|
387 |
+
"128048": {
|
388 |
+
"content": "<|reserved_special_token_40|>",
|
389 |
+
"lstrip": false,
|
390 |
+
"normalized": false,
|
391 |
+
"rstrip": false,
|
392 |
+
"single_word": false,
|
393 |
+
"special": true
|
394 |
+
},
|
395 |
+
"128049": {
|
396 |
+
"content": "<|reserved_special_token_41|>",
|
397 |
+
"lstrip": false,
|
398 |
+
"normalized": false,
|
399 |
+
"rstrip": false,
|
400 |
+
"single_word": false,
|
401 |
+
"special": true
|
402 |
+
},
|
403 |
+
"128050": {
|
404 |
+
"content": "<|reserved_special_token_42|>",
|
405 |
+
"lstrip": false,
|
406 |
+
"normalized": false,
|
407 |
+
"rstrip": false,
|
408 |
+
"single_word": false,
|
409 |
+
"special": true
|
410 |
+
},
|
411 |
+
"128051": {
|
412 |
+
"content": "<|reserved_special_token_43|>",
|
413 |
+
"lstrip": false,
|
414 |
+
"normalized": false,
|
415 |
+
"rstrip": false,
|
416 |
+
"single_word": false,
|
417 |
+
"special": true
|
418 |
+
},
|
419 |
+
"128052": {
|
420 |
+
"content": "<|reserved_special_token_44|>",
|
421 |
+
"lstrip": false,
|
422 |
+
"normalized": false,
|
423 |
+
"rstrip": false,
|
424 |
+
"single_word": false,
|
425 |
+
"special": true
|
426 |
+
},
|
427 |
+
"128053": {
|
428 |
+
"content": "<|reserved_special_token_45|>",
|
429 |
+
"lstrip": false,
|
430 |
+
"normalized": false,
|
431 |
+
"rstrip": false,
|
432 |
+
"single_word": false,
|
433 |
+
"special": true
|
434 |
+
},
|
435 |
+
"128054": {
|
436 |
+
"content": "<|reserved_special_token_46|>",
|
437 |
+
"lstrip": false,
|
438 |
+
"normalized": false,
|
439 |
+
"rstrip": false,
|
440 |
+
"single_word": false,
|
441 |
+
"special": true
|
442 |
+
},
|
443 |
+
"128055": {
|
444 |
+
"content": "<|reserved_special_token_47|>",
|
445 |
+
"lstrip": false,
|
446 |
+
"normalized": false,
|
447 |
+
"rstrip": false,
|
448 |
+
"single_word": false,
|
449 |
+
"special": true
|
450 |
+
},
|
451 |
+
"128056": {
|
452 |
+
"content": "<|reserved_special_token_48|>",
|
453 |
+
"lstrip": false,
|
454 |
+
"normalized": false,
|
455 |
+
"rstrip": false,
|
456 |
+
"single_word": false,
|
457 |
+
"special": true
|
458 |
+
},
|
459 |
+
"128057": {
|
460 |
+
"content": "<|reserved_special_token_49|>",
|
461 |
+
"lstrip": false,
|
462 |
+
"normalized": false,
|
463 |
+
"rstrip": false,
|
464 |
+
"single_word": false,
|
465 |
+
"special": true
|
466 |
+
},
|
467 |
+
"128058": {
|
468 |
+
"content": "<|reserved_special_token_50|>",
|
469 |
+
"lstrip": false,
|
470 |
+
"normalized": false,
|
471 |
+
"rstrip": false,
|
472 |
+
"single_word": false,
|
473 |
+
"special": true
|
474 |
+
},
|
475 |
+
"128059": {
|
476 |
+
"content": "<|reserved_special_token_51|>",
|
477 |
+
"lstrip": false,
|
478 |
+
"normalized": false,
|
479 |
+
"rstrip": false,
|
480 |
+
"single_word": false,
|
481 |
+
"special": true
|
482 |
+
},
|
483 |
+
"128060": {
|
484 |
+
"content": "<|reserved_special_token_52|>",
|
485 |
+
"lstrip": false,
|
486 |
+
"normalized": false,
|
487 |
+
"rstrip": false,
|
488 |
+
"single_word": false,
|
489 |
+
"special": true
|
490 |
+
},
|
491 |
+
"128061": {
|
492 |
+
"content": "<|reserved_special_token_53|>",
|
493 |
+
"lstrip": false,
|
494 |
+
"normalized": false,
|
495 |
+
"rstrip": false,
|
496 |
+
"single_word": false,
|
497 |
+
"special": true
|
498 |
+
},
|
499 |
+
"128062": {
|
500 |
+
"content": "<|reserved_special_token_54|>",
|
501 |
+
"lstrip": false,
|
502 |
+
"normalized": false,
|
503 |
+
"rstrip": false,
|
504 |
+
"single_word": false,
|
505 |
+
"special": true
|
506 |
+
},
|
507 |
+
"128063": {
|
508 |
+
"content": "<|reserved_special_token_55|>",
|
509 |
+
"lstrip": false,
|
510 |
+
"normalized": false,
|
511 |
+
"rstrip": false,
|
512 |
+
"single_word": false,
|
513 |
+
"special": true
|
514 |
+
},
|
515 |
+
"128064": {
|
516 |
+
"content": "<|reserved_special_token_56|>",
|
517 |
+
"lstrip": false,
|
518 |
+
"normalized": false,
|
519 |
+
"rstrip": false,
|
520 |
+
"single_word": false,
|
521 |
+
"special": true
|
522 |
+
},
|
523 |
+
"128065": {
|
524 |
+
"content": "<|reserved_special_token_57|>",
|
525 |
+
"lstrip": false,
|
526 |
+
"normalized": false,
|
527 |
+
"rstrip": false,
|
528 |
+
"single_word": false,
|
529 |
+
"special": true
|
530 |
+
},
|
531 |
+
"128066": {
|
532 |
+
"content": "<|reserved_special_token_58|>",
|
533 |
+
"lstrip": false,
|
534 |
+
"normalized": false,
|
535 |
+
"rstrip": false,
|
536 |
+
"single_word": false,
|
537 |
+
"special": true
|
538 |
+
},
|
539 |
+
"128067": {
|
540 |
+
"content": "<|reserved_special_token_59|>",
|
541 |
+
"lstrip": false,
|
542 |
+
"normalized": false,
|
543 |
+
"rstrip": false,
|
544 |
+
"single_word": false,
|
545 |
+
"special": true
|
546 |
+
},
|
547 |
+
"128068": {
|
548 |
+
"content": "<|reserved_special_token_60|>",
|
549 |
+
"lstrip": false,
|
550 |
+
"normalized": false,
|
551 |
+
"rstrip": false,
|
552 |
+
"single_word": false,
|
553 |
+
"special": true
|
554 |
+
},
|
555 |
+
"128069": {
|
556 |
+
"content": "<|reserved_special_token_61|>",
|
557 |
+
"lstrip": false,
|
558 |
+
"normalized": false,
|
559 |
+
"rstrip": false,
|
560 |
+
"single_word": false,
|
561 |
+
"special": true
|
562 |
+
},
|
563 |
+
"128070": {
|
564 |
+
"content": "<|reserved_special_token_62|>",
|
565 |
+
"lstrip": false,
|
566 |
+
"normalized": false,
|
567 |
+
"rstrip": false,
|
568 |
+
"single_word": false,
|
569 |
+
"special": true
|
570 |
+
},
|
571 |
+
"128071": {
|
572 |
+
"content": "<|reserved_special_token_63|>",
|
573 |
+
"lstrip": false,
|
574 |
+
"normalized": false,
|
575 |
+
"rstrip": false,
|
576 |
+
"single_word": false,
|
577 |
+
"special": true
|
578 |
+
},
|
579 |
+
"128072": {
|
580 |
+
"content": "<|reserved_special_token_64|>",
|
581 |
+
"lstrip": false,
|
582 |
+
"normalized": false,
|
583 |
+
"rstrip": false,
|
584 |
+
"single_word": false,
|
585 |
+
"special": true
|
586 |
+
},
|
587 |
+
"128073": {
|
588 |
+
"content": "<|reserved_special_token_65|>",
|
589 |
+
"lstrip": false,
|
590 |
+
"normalized": false,
|
591 |
+
"rstrip": false,
|
592 |
+
"single_word": false,
|
593 |
+
"special": true
|
594 |
+
},
|
595 |
+
"128074": {
|
596 |
+
"content": "<|reserved_special_token_66|>",
|
597 |
+
"lstrip": false,
|
598 |
+
"normalized": false,
|
599 |
+
"rstrip": false,
|
600 |
+
"single_word": false,
|
601 |
+
"special": true
|
602 |
+
},
|
603 |
+
"128075": {
|
604 |
+
"content": "<|reserved_special_token_67|>",
|
605 |
+
"lstrip": false,
|
606 |
+
"normalized": false,
|
607 |
+
"rstrip": false,
|
608 |
+
"single_word": false,
|
609 |
+
"special": true
|
610 |
+
},
|
611 |
+
"128076": {
|
612 |
+
"content": "<|reserved_special_token_68|>",
|
613 |
+
"lstrip": false,
|
614 |
+
"normalized": false,
|
615 |
+
"rstrip": false,
|
616 |
+
"single_word": false,
|
617 |
+
"special": true
|
618 |
+
},
|
619 |
+
"128077": {
|
620 |
+
"content": "<|reserved_special_token_69|>",
|
621 |
+
"lstrip": false,
|
622 |
+
"normalized": false,
|
623 |
+
"rstrip": false,
|
624 |
+
"single_word": false,
|
625 |
+
"special": true
|
626 |
+
},
|
627 |
+
"128078": {
|
628 |
+
"content": "<|reserved_special_token_70|>",
|
629 |
+
"lstrip": false,
|
630 |
+
"normalized": false,
|
631 |
+
"rstrip": false,
|
632 |
+
"single_word": false,
|
633 |
+
"special": true
|
634 |
+
},
|
635 |
+
"128079": {
|
636 |
+
"content": "<|reserved_special_token_71|>",
|
637 |
+
"lstrip": false,
|
638 |
+
"normalized": false,
|
639 |
+
"rstrip": false,
|
640 |
+
"single_word": false,
|
641 |
+
"special": true
|
642 |
+
},
|
643 |
+
"128080": {
|
644 |
+
"content": "<|reserved_special_token_72|>",
|
645 |
+
"lstrip": false,
|
646 |
+
"normalized": false,
|
647 |
+
"rstrip": false,
|
648 |
+
"single_word": false,
|
649 |
+
"special": true
|
650 |
+
},
|
651 |
+
"128081": {
|
652 |
+
"content": "<|reserved_special_token_73|>",
|
653 |
+
"lstrip": false,
|
654 |
+
"normalized": false,
|
655 |
+
"rstrip": false,
|
656 |
+
"single_word": false,
|
657 |
+
"special": true
|
658 |
+
},
|
659 |
+
"128082": {
|
660 |
+
"content": "<|reserved_special_token_74|>",
|
661 |
+
"lstrip": false,
|
662 |
+
"normalized": false,
|
663 |
+
"rstrip": false,
|
664 |
+
"single_word": false,
|
665 |
+
"special": true
|
666 |
+
},
|
667 |
+
"128083": {
|
668 |
+
"content": "<|reserved_special_token_75|>",
|
669 |
+
"lstrip": false,
|
670 |
+
"normalized": false,
|
671 |
+
"rstrip": false,
|
672 |
+
"single_word": false,
|
673 |
+
"special": true
|
674 |
+
},
|
675 |
+
"128084": {
|
676 |
+
"content": "<|reserved_special_token_76|>",
|
677 |
+
"lstrip": false,
|
678 |
+
"normalized": false,
|
679 |
+
"rstrip": false,
|
680 |
+
"single_word": false,
|
681 |
+
"special": true
|
682 |
+
},
|
683 |
+
"128085": {
|
684 |
+
"content": "<|reserved_special_token_77|>",
|
685 |
+
"lstrip": false,
|
686 |
+
"normalized": false,
|
687 |
+
"rstrip": false,
|
688 |
+
"single_word": false,
|
689 |
+
"special": true
|
690 |
+
},
|
691 |
+
"128086": {
|
692 |
+
"content": "<|reserved_special_token_78|>",
|
693 |
+
"lstrip": false,
|
694 |
+
"normalized": false,
|
695 |
+
"rstrip": false,
|
696 |
+
"single_word": false,
|
697 |
+
"special": true
|
698 |
+
},
|
699 |
+
"128087": {
|
700 |
+
"content": "<|reserved_special_token_79|>",
|
701 |
+
"lstrip": false,
|
702 |
+
"normalized": false,
|
703 |
+
"rstrip": false,
|
704 |
+
"single_word": false,
|
705 |
+
"special": true
|
706 |
+
},
|
707 |
+
"128088": {
|
708 |
+
"content": "<|reserved_special_token_80|>",
|
709 |
+
"lstrip": false,
|
710 |
+
"normalized": false,
|
711 |
+
"rstrip": false,
|
712 |
+
"single_word": false,
|
713 |
+
"special": true
|
714 |
+
},
|
715 |
+
"128089": {
|
716 |
+
"content": "<|reserved_special_token_81|>",
|
717 |
+
"lstrip": false,
|
718 |
+
"normalized": false,
|
719 |
+
"rstrip": false,
|
720 |
+
"single_word": false,
|
721 |
+
"special": true
|
722 |
+
},
|
723 |
+
"128090": {
|
724 |
+
"content": "<|reserved_special_token_82|>",
|
725 |
+
"lstrip": false,
|
726 |
+
"normalized": false,
|
727 |
+
"rstrip": false,
|
728 |
+
"single_word": false,
|
729 |
+
"special": true
|
730 |
+
},
|
731 |
+
"128091": {
|
732 |
+
"content": "<|reserved_special_token_83|>",
|
733 |
+
"lstrip": false,
|
734 |
+
"normalized": false,
|
735 |
+
"rstrip": false,
|
736 |
+
"single_word": false,
|
737 |
+
"special": true
|
738 |
+
},
|
739 |
+
"128092": {
|
740 |
+
"content": "<|reserved_special_token_84|>",
|
741 |
+
"lstrip": false,
|
742 |
+
"normalized": false,
|
743 |
+
"rstrip": false,
|
744 |
+
"single_word": false,
|
745 |
+
"special": true
|
746 |
+
},
|
747 |
+
"128093": {
|
748 |
+
"content": "<|reserved_special_token_85|>",
|
749 |
+
"lstrip": false,
|
750 |
+
"normalized": false,
|
751 |
+
"rstrip": false,
|
752 |
+
"single_word": false,
|
753 |
+
"special": true
|
754 |
+
},
|
755 |
+
"128094": {
|
756 |
+
"content": "<|reserved_special_token_86|>",
|
757 |
+
"lstrip": false,
|
758 |
+
"normalized": false,
|
759 |
+
"rstrip": false,
|
760 |
+
"single_word": false,
|
761 |
+
"special": true
|
762 |
+
},
|
763 |
+
"128095": {
|
764 |
+
"content": "<|reserved_special_token_87|>",
|
765 |
+
"lstrip": false,
|
766 |
+
"normalized": false,
|
767 |
+
"rstrip": false,
|
768 |
+
"single_word": false,
|
769 |
+
"special": true
|
770 |
+
},
|
771 |
+
"128096": {
|
772 |
+
"content": "<|reserved_special_token_88|>",
|
773 |
+
"lstrip": false,
|
774 |
+
"normalized": false,
|
775 |
+
"rstrip": false,
|
776 |
+
"single_word": false,
|
777 |
+
"special": true
|
778 |
+
},
|
779 |
+
"128097": {
|
780 |
+
"content": "<|reserved_special_token_89|>",
|
781 |
+
"lstrip": false,
|
782 |
+
"normalized": false,
|
783 |
+
"rstrip": false,
|
784 |
+
"single_word": false,
|
785 |
+
"special": true
|
786 |
+
},
|
787 |
+
"128098": {
|
788 |
+
"content": "<|reserved_special_token_90|>",
|
789 |
+
"lstrip": false,
|
790 |
+
"normalized": false,
|
791 |
+
"rstrip": false,
|
792 |
+
"single_word": false,
|
793 |
+
"special": true
|
794 |
+
},
|
795 |
+
"128099": {
|
796 |
+
"content": "<|reserved_special_token_91|>",
|
797 |
+
"lstrip": false,
|
798 |
+
"normalized": false,
|
799 |
+
"rstrip": false,
|
800 |
+
"single_word": false,
|
801 |
+
"special": true
|
802 |
+
},
|
803 |
+
"128100": {
|
804 |
+
"content": "<|reserved_special_token_92|>",
|
805 |
+
"lstrip": false,
|
806 |
+
"normalized": false,
|
807 |
+
"rstrip": false,
|
808 |
+
"single_word": false,
|
809 |
+
"special": true
|
810 |
+
},
|
811 |
+
"128101": {
|
812 |
+
"content": "<|reserved_special_token_93|>",
|
813 |
+
"lstrip": false,
|
814 |
+
"normalized": false,
|
815 |
+
"rstrip": false,
|
816 |
+
"single_word": false,
|
817 |
+
"special": true
|
818 |
+
},
|
819 |
+
"128102": {
|
820 |
+
"content": "<|reserved_special_token_94|>",
|
821 |
+
"lstrip": false,
|
822 |
+
"normalized": false,
|
823 |
+
"rstrip": false,
|
824 |
+
"single_word": false,
|
825 |
+
"special": true
|
826 |
+
},
|
827 |
+
"128103": {
|
828 |
+
"content": "<|reserved_special_token_95|>",
|
829 |
+
"lstrip": false,
|
830 |
+
"normalized": false,
|
831 |
+
"rstrip": false,
|
832 |
+
"single_word": false,
|
833 |
+
"special": true
|
834 |
+
},
|
835 |
+
"128104": {
|
836 |
+
"content": "<|reserved_special_token_96|>",
|
837 |
+
"lstrip": false,
|
838 |
+
"normalized": false,
|
839 |
+
"rstrip": false,
|
840 |
+
"single_word": false,
|
841 |
+
"special": true
|
842 |
+
},
|
843 |
+
"128105": {
|
844 |
+
"content": "<|reserved_special_token_97|>",
|
845 |
+
"lstrip": false,
|
846 |
+
"normalized": false,
|
847 |
+
"rstrip": false,
|
848 |
+
"single_word": false,
|
849 |
+
"special": true
|
850 |
+
},
|
851 |
+
"128106": {
|
852 |
+
"content": "<|reserved_special_token_98|>",
|
853 |
+
"lstrip": false,
|
854 |
+
"normalized": false,
|
855 |
+
"rstrip": false,
|
856 |
+
"single_word": false,
|
857 |
+
"special": true
|
858 |
+
},
|
859 |
+
"128107": {
|
860 |
+
"content": "<|reserved_special_token_99|>",
|
861 |
+
"lstrip": false,
|
862 |
+
"normalized": false,
|
863 |
+
"rstrip": false,
|
864 |
+
"single_word": false,
|
865 |
+
"special": true
|
866 |
+
},
|
867 |
+
"128108": {
|
868 |
+
"content": "<|reserved_special_token_100|>",
|
869 |
+
"lstrip": false,
|
870 |
+
"normalized": false,
|
871 |
+
"rstrip": false,
|
872 |
+
"single_word": false,
|
873 |
+
"special": true
|
874 |
+
},
|
875 |
+
"128109": {
|
876 |
+
"content": "<|reserved_special_token_101|>",
|
877 |
+
"lstrip": false,
|
878 |
+
"normalized": false,
|
879 |
+
"rstrip": false,
|
880 |
+
"single_word": false,
|
881 |
+
"special": true
|
882 |
+
},
|
883 |
+
"128110": {
|
884 |
+
"content": "<|reserved_special_token_102|>",
|
885 |
+
"lstrip": false,
|
886 |
+
"normalized": false,
|
887 |
+
"rstrip": false,
|
888 |
+
"single_word": false,
|
889 |
+
"special": true
|
890 |
+
},
|
891 |
+
"128111": {
|
892 |
+
"content": "<|reserved_special_token_103|>",
|
893 |
+
"lstrip": false,
|
894 |
+
"normalized": false,
|
895 |
+
"rstrip": false,
|
896 |
+
"single_word": false,
|
897 |
+
"special": true
|
898 |
+
},
|
899 |
+
"128112": {
|
900 |
+
"content": "<|reserved_special_token_104|>",
|
901 |
+
"lstrip": false,
|
902 |
+
"normalized": false,
|
903 |
+
"rstrip": false,
|
904 |
+
"single_word": false,
|
905 |
+
"special": true
|
906 |
+
},
|
907 |
+
"128113": {
|
908 |
+
"content": "<|reserved_special_token_105|>",
|
909 |
+
"lstrip": false,
|
910 |
+
"normalized": false,
|
911 |
+
"rstrip": false,
|
912 |
+
"single_word": false,
|
913 |
+
"special": true
|
914 |
+
},
|
915 |
+
"128114": {
|
916 |
+
"content": "<|reserved_special_token_106|>",
|
917 |
+
"lstrip": false,
|
918 |
+
"normalized": false,
|
919 |
+
"rstrip": false,
|
920 |
+
"single_word": false,
|
921 |
+
"special": true
|
922 |
+
},
|
923 |
+
"128115": {
|
924 |
+
"content": "<|reserved_special_token_107|>",
|
925 |
+
"lstrip": false,
|
926 |
+
"normalized": false,
|
927 |
+
"rstrip": false,
|
928 |
+
"single_word": false,
|
929 |
+
"special": true
|
930 |
+
},
|
931 |
+
"128116": {
|
932 |
+
"content": "<|reserved_special_token_108|>",
|
933 |
+
"lstrip": false,
|
934 |
+
"normalized": false,
|
935 |
+
"rstrip": false,
|
936 |
+
"single_word": false,
|
937 |
+
"special": true
|
938 |
+
},
|
939 |
+
"128117": {
|
940 |
+
"content": "<|reserved_special_token_109|>",
|
941 |
+
"lstrip": false,
|
942 |
+
"normalized": false,
|
943 |
+
"rstrip": false,
|
944 |
+
"single_word": false,
|
945 |
+
"special": true
|
946 |
+
},
|
947 |
+
"128118": {
|
948 |
+
"content": "<|reserved_special_token_110|>",
|
949 |
+
"lstrip": false,
|
950 |
+
"normalized": false,
|
951 |
+
"rstrip": false,
|
952 |
+
"single_word": false,
|
953 |
+
"special": true
|
954 |
+
},
|
955 |
+
"128119": {
|
956 |
+
"content": "<|reserved_special_token_111|>",
|
957 |
+
"lstrip": false,
|
958 |
+
"normalized": false,
|
959 |
+
"rstrip": false,
|
960 |
+
"single_word": false,
|
961 |
+
"special": true
|
962 |
+
},
|
963 |
+
"128120": {
|
964 |
+
"content": "<|reserved_special_token_112|>",
|
965 |
+
"lstrip": false,
|
966 |
+
"normalized": false,
|
967 |
+
"rstrip": false,
|
968 |
+
"single_word": false,
|
969 |
+
"special": true
|
970 |
+
},
|
971 |
+
"128121": {
|
972 |
+
"content": "<|reserved_special_token_113|>",
|
973 |
+
"lstrip": false,
|
974 |
+
"normalized": false,
|
975 |
+
"rstrip": false,
|
976 |
+
"single_word": false,
|
977 |
+
"special": true
|
978 |
+
},
|
979 |
+
"128122": {
|
980 |
+
"content": "<|reserved_special_token_114|>",
|
981 |
+
"lstrip": false,
|
982 |
+
"normalized": false,
|
983 |
+
"rstrip": false,
|
984 |
+
"single_word": false,
|
985 |
+
"special": true
|
986 |
+
},
|
987 |
+
"128123": {
|
988 |
+
"content": "<|reserved_special_token_115|>",
|
989 |
+
"lstrip": false,
|
990 |
+
"normalized": false,
|
991 |
+
"rstrip": false,
|
992 |
+
"single_word": false,
|
993 |
+
"special": true
|
994 |
+
},
|
995 |
+
"128124": {
|
996 |
+
"content": "<|reserved_special_token_116|>",
|
997 |
+
"lstrip": false,
|
998 |
+
"normalized": false,
|
999 |
+
"rstrip": false,
|
1000 |
+
"single_word": false,
|
1001 |
+
"special": true
|
1002 |
+
},
|
1003 |
+
"128125": {
|
1004 |
+
"content": "<|reserved_special_token_117|>",
|
1005 |
+
"lstrip": false,
|
1006 |
+
"normalized": false,
|
1007 |
+
"rstrip": false,
|
1008 |
+
"single_word": false,
|
1009 |
+
"special": true
|
1010 |
+
},
|
1011 |
+
"128126": {
|
1012 |
+
"content": "<|reserved_special_token_118|>",
|
1013 |
+
"lstrip": false,
|
1014 |
+
"normalized": false,
|
1015 |
+
"rstrip": false,
|
1016 |
+
"single_word": false,
|
1017 |
+
"special": true
|
1018 |
+
},
|
1019 |
+
"128127": {
|
1020 |
+
"content": "<|reserved_special_token_119|>",
|
1021 |
+
"lstrip": false,
|
1022 |
+
"normalized": false,
|
1023 |
+
"rstrip": false,
|
1024 |
+
"single_word": false,
|
1025 |
+
"special": true
|
1026 |
+
},
|
1027 |
+
"128128": {
|
1028 |
+
"content": "<|reserved_special_token_120|>",
|
1029 |
+
"lstrip": false,
|
1030 |
+
"normalized": false,
|
1031 |
+
"rstrip": false,
|
1032 |
+
"single_word": false,
|
1033 |
+
"special": true
|
1034 |
+
},
|
1035 |
+
"128129": {
|
1036 |
+
"content": "<|reserved_special_token_121|>",
|
1037 |
+
"lstrip": false,
|
1038 |
+
"normalized": false,
|
1039 |
+
"rstrip": false,
|
1040 |
+
"single_word": false,
|
1041 |
+
"special": true
|
1042 |
+
},
|
1043 |
+
"128130": {
|
1044 |
+
"content": "<|reserved_special_token_122|>",
|
1045 |
+
"lstrip": false,
|
1046 |
+
"normalized": false,
|
1047 |
+
"rstrip": false,
|
1048 |
+
"single_word": false,
|
1049 |
+
"special": true
|
1050 |
+
},
|
1051 |
+
"128131": {
|
1052 |
+
"content": "<|reserved_special_token_123|>",
|
1053 |
+
"lstrip": false,
|
1054 |
+
"normalized": false,
|
1055 |
+
"rstrip": false,
|
1056 |
+
"single_word": false,
|
1057 |
+
"special": true
|
1058 |
+
},
|
1059 |
+
"128132": {
|
1060 |
+
"content": "<|reserved_special_token_124|>",
|
1061 |
+
"lstrip": false,
|
1062 |
+
"normalized": false,
|
1063 |
+
"rstrip": false,
|
1064 |
+
"single_word": false,
|
1065 |
+
"special": true
|
1066 |
+
},
|
1067 |
+
"128133": {
|
1068 |
+
"content": "<|reserved_special_token_125|>",
|
1069 |
+
"lstrip": false,
|
1070 |
+
"normalized": false,
|
1071 |
+
"rstrip": false,
|
1072 |
+
"single_word": false,
|
1073 |
+
"special": true
|
1074 |
+
},
|
1075 |
+
"128134": {
|
1076 |
+
"content": "<|reserved_special_token_126|>",
|
1077 |
+
"lstrip": false,
|
1078 |
+
"normalized": false,
|
1079 |
+
"rstrip": false,
|
1080 |
+
"single_word": false,
|
1081 |
+
"special": true
|
1082 |
+
},
|
1083 |
+
"128135": {
|
1084 |
+
"content": "<|reserved_special_token_127|>",
|
1085 |
+
"lstrip": false,
|
1086 |
+
"normalized": false,
|
1087 |
+
"rstrip": false,
|
1088 |
+
"single_word": false,
|
1089 |
+
"special": true
|
1090 |
+
},
|
1091 |
+
"128136": {
|
1092 |
+
"content": "<|reserved_special_token_128|>",
|
1093 |
+
"lstrip": false,
|
1094 |
+
"normalized": false,
|
1095 |
+
"rstrip": false,
|
1096 |
+
"single_word": false,
|
1097 |
+
"special": true
|
1098 |
+
},
|
1099 |
+
"128137": {
|
1100 |
+
"content": "<|reserved_special_token_129|>",
|
1101 |
+
"lstrip": false,
|
1102 |
+
"normalized": false,
|
1103 |
+
"rstrip": false,
|
1104 |
+
"single_word": false,
|
1105 |
+
"special": true
|
1106 |
+
},
|
1107 |
+
"128138": {
|
1108 |
+
"content": "<|reserved_special_token_130|>",
|
1109 |
+
"lstrip": false,
|
1110 |
+
"normalized": false,
|
1111 |
+
"rstrip": false,
|
1112 |
+
"single_word": false,
|
1113 |
+
"special": true
|
1114 |
+
},
|
1115 |
+
"128139": {
|
1116 |
+
"content": "<|reserved_special_token_131|>",
|
1117 |
+
"lstrip": false,
|
1118 |
+
"normalized": false,
|
1119 |
+
"rstrip": false,
|
1120 |
+
"single_word": false,
|
1121 |
+
"special": true
|
1122 |
+
},
|
1123 |
+
"128140": {
|
1124 |
+
"content": "<|reserved_special_token_132|>",
|
1125 |
+
"lstrip": false,
|
1126 |
+
"normalized": false,
|
1127 |
+
"rstrip": false,
|
1128 |
+
"single_word": false,
|
1129 |
+
"special": true
|
1130 |
+
},
|
1131 |
+
"128141": {
|
1132 |
+
"content": "<|reserved_special_token_133|>",
|
1133 |
+
"lstrip": false,
|
1134 |
+
"normalized": false,
|
1135 |
+
"rstrip": false,
|
1136 |
+
"single_word": false,
|
1137 |
+
"special": true
|
1138 |
+
},
|
1139 |
+
"128142": {
|
1140 |
+
"content": "<|reserved_special_token_134|>",
|
1141 |
+
"lstrip": false,
|
1142 |
+
"normalized": false,
|
1143 |
+
"rstrip": false,
|
1144 |
+
"single_word": false,
|
1145 |
+
"special": true
|
1146 |
+
},
|
1147 |
+
"128143": {
|
1148 |
+
"content": "<|reserved_special_token_135|>",
|
1149 |
+
"lstrip": false,
|
1150 |
+
"normalized": false,
|
1151 |
+
"rstrip": false,
|
1152 |
+
"single_word": false,
|
1153 |
+
"special": true
|
1154 |
+
},
|
1155 |
+
"128144": {
|
1156 |
+
"content": "<|reserved_special_token_136|>",
|
1157 |
+
"lstrip": false,
|
1158 |
+
"normalized": false,
|
1159 |
+
"rstrip": false,
|
1160 |
+
"single_word": false,
|
1161 |
+
"special": true
|
1162 |
+
},
|
1163 |
+
"128145": {
|
1164 |
+
"content": "<|reserved_special_token_137|>",
|
1165 |
+
"lstrip": false,
|
1166 |
+
"normalized": false,
|
1167 |
+
"rstrip": false,
|
1168 |
+
"single_word": false,
|
1169 |
+
"special": true
|
1170 |
+
},
|
1171 |
+
"128146": {
|
1172 |
+
"content": "<|reserved_special_token_138|>",
|
1173 |
+
"lstrip": false,
|
1174 |
+
"normalized": false,
|
1175 |
+
"rstrip": false,
|
1176 |
+
"single_word": false,
|
1177 |
+
"special": true
|
1178 |
+
},
|
1179 |
+
"128147": {
|
1180 |
+
"content": "<|reserved_special_token_139|>",
|
1181 |
+
"lstrip": false,
|
1182 |
+
"normalized": false,
|
1183 |
+
"rstrip": false,
|
1184 |
+
"single_word": false,
|
1185 |
+
"special": true
|
1186 |
+
},
|
1187 |
+
"128148": {
|
1188 |
+
"content": "<|reserved_special_token_140|>",
|
1189 |
+
"lstrip": false,
|
1190 |
+
"normalized": false,
|
1191 |
+
"rstrip": false,
|
1192 |
+
"single_word": false,
|
1193 |
+
"special": true
|
1194 |
+
},
|
1195 |
+
"128149": {
|
1196 |
+
"content": "<|reserved_special_token_141|>",
|
1197 |
+
"lstrip": false,
|
1198 |
+
"normalized": false,
|
1199 |
+
"rstrip": false,
|
1200 |
+
"single_word": false,
|
1201 |
+
"special": true
|
1202 |
+
},
|
1203 |
+
"128150": {
|
1204 |
+
"content": "<|reserved_special_token_142|>",
|
1205 |
+
"lstrip": false,
|
1206 |
+
"normalized": false,
|
1207 |
+
"rstrip": false,
|
1208 |
+
"single_word": false,
|
1209 |
+
"special": true
|
1210 |
+
},
|
1211 |
+
"128151": {
|
1212 |
+
"content": "<|reserved_special_token_143|>",
|
1213 |
+
"lstrip": false,
|
1214 |
+
"normalized": false,
|
1215 |
+
"rstrip": false,
|
1216 |
+
"single_word": false,
|
1217 |
+
"special": true
|
1218 |
+
},
|
1219 |
+
"128152": {
|
1220 |
+
"content": "<|reserved_special_token_144|>",
|
1221 |
+
"lstrip": false,
|
1222 |
+
"normalized": false,
|
1223 |
+
"rstrip": false,
|
1224 |
+
"single_word": false,
|
1225 |
+
"special": true
|
1226 |
+
},
|
1227 |
+
"128153": {
|
1228 |
+
"content": "<|reserved_special_token_145|>",
|
1229 |
+
"lstrip": false,
|
1230 |
+
"normalized": false,
|
1231 |
+
"rstrip": false,
|
1232 |
+
"single_word": false,
|
1233 |
+
"special": true
|
1234 |
+
},
|
1235 |
+
"128154": {
|
1236 |
+
"content": "<|reserved_special_token_146|>",
|
1237 |
+
"lstrip": false,
|
1238 |
+
"normalized": false,
|
1239 |
+
"rstrip": false,
|
1240 |
+
"single_word": false,
|
1241 |
+
"special": true
|
1242 |
+
},
|
1243 |
+
"128155": {
|
1244 |
+
"content": "<|reserved_special_token_147|>",
|
1245 |
+
"lstrip": false,
|
1246 |
+
"normalized": false,
|
1247 |
+
"rstrip": false,
|
1248 |
+
"single_word": false,
|
1249 |
+
"special": true
|
1250 |
+
},
|
1251 |
+
"128156": {
|
1252 |
+
"content": "<|reserved_special_token_148|>",
|
1253 |
+
"lstrip": false,
|
1254 |
+
"normalized": false,
|
1255 |
+
"rstrip": false,
|
1256 |
+
"single_word": false,
|
1257 |
+
"special": true
|
1258 |
+
},
|
1259 |
+
"128157": {
|
1260 |
+
"content": "<|reserved_special_token_149|>",
|
1261 |
+
"lstrip": false,
|
1262 |
+
"normalized": false,
|
1263 |
+
"rstrip": false,
|
1264 |
+
"single_word": false,
|
1265 |
+
"special": true
|
1266 |
+
},
|
1267 |
+
"128158": {
|
1268 |
+
"content": "<|reserved_special_token_150|>",
|
1269 |
+
"lstrip": false,
|
1270 |
+
"normalized": false,
|
1271 |
+
"rstrip": false,
|
1272 |
+
"single_word": false,
|
1273 |
+
"special": true
|
1274 |
+
},
|
1275 |
+
"128159": {
|
1276 |
+
"content": "<|reserved_special_token_151|>",
|
1277 |
+
"lstrip": false,
|
1278 |
+
"normalized": false,
|
1279 |
+
"rstrip": false,
|
1280 |
+
"single_word": false,
|
1281 |
+
"special": true
|
1282 |
+
},
|
1283 |
+
"128160": {
|
1284 |
+
"content": "<|reserved_special_token_152|>",
|
1285 |
+
"lstrip": false,
|
1286 |
+
"normalized": false,
|
1287 |
+
"rstrip": false,
|
1288 |
+
"single_word": false,
|
1289 |
+
"special": true
|
1290 |
+
},
|
1291 |
+
"128161": {
|
1292 |
+
"content": "<|reserved_special_token_153|>",
|
1293 |
+
"lstrip": false,
|
1294 |
+
"normalized": false,
|
1295 |
+
"rstrip": false,
|
1296 |
+
"single_word": false,
|
1297 |
+
"special": true
|
1298 |
+
},
|
1299 |
+
"128162": {
|
1300 |
+
"content": "<|reserved_special_token_154|>",
|
1301 |
+
"lstrip": false,
|
1302 |
+
"normalized": false,
|
1303 |
+
"rstrip": false,
|
1304 |
+
"single_word": false,
|
1305 |
+
"special": true
|
1306 |
+
},
|
1307 |
+
"128163": {
|
1308 |
+
"content": "<|reserved_special_token_155|>",
|
1309 |
+
"lstrip": false,
|
1310 |
+
"normalized": false,
|
1311 |
+
"rstrip": false,
|
1312 |
+
"single_word": false,
|
1313 |
+
"special": true
|
1314 |
+
},
|
1315 |
+
"128164": {
|
1316 |
+
"content": "<|reserved_special_token_156|>",
|
1317 |
+
"lstrip": false,
|
1318 |
+
"normalized": false,
|
1319 |
+
"rstrip": false,
|
1320 |
+
"single_word": false,
|
1321 |
+
"special": true
|
1322 |
+
},
|
1323 |
+
"128165": {
|
1324 |
+
"content": "<|reserved_special_token_157|>",
|
1325 |
+
"lstrip": false,
|
1326 |
+
"normalized": false,
|
1327 |
+
"rstrip": false,
|
1328 |
+
"single_word": false,
|
1329 |
+
"special": true
|
1330 |
+
},
|
1331 |
+
"128166": {
|
1332 |
+
"content": "<|reserved_special_token_158|>",
|
1333 |
+
"lstrip": false,
|
1334 |
+
"normalized": false,
|
1335 |
+
"rstrip": false,
|
1336 |
+
"single_word": false,
|
1337 |
+
"special": true
|
1338 |
+
},
|
1339 |
+
"128167": {
|
1340 |
+
"content": "<|reserved_special_token_159|>",
|
1341 |
+
"lstrip": false,
|
1342 |
+
"normalized": false,
|
1343 |
+
"rstrip": false,
|
1344 |
+
"single_word": false,
|
1345 |
+
"special": true
|
1346 |
+
},
|
1347 |
+
"128168": {
|
1348 |
+
"content": "<|reserved_special_token_160|>",
|
1349 |
+
"lstrip": false,
|
1350 |
+
"normalized": false,
|
1351 |
+
"rstrip": false,
|
1352 |
+
"single_word": false,
|
1353 |
+
"special": true
|
1354 |
+
},
|
1355 |
+
"128169": {
|
1356 |
+
"content": "<|reserved_special_token_161|>",
|
1357 |
+
"lstrip": false,
|
1358 |
+
"normalized": false,
|
1359 |
+
"rstrip": false,
|
1360 |
+
"single_word": false,
|
1361 |
+
"special": true
|
1362 |
+
},
|
1363 |
+
"128170": {
|
1364 |
+
"content": "<|reserved_special_token_162|>",
|
1365 |
+
"lstrip": false,
|
1366 |
+
"normalized": false,
|
1367 |
+
"rstrip": false,
|
1368 |
+
"single_word": false,
|
1369 |
+
"special": true
|
1370 |
+
},
|
1371 |
+
"128171": {
|
1372 |
+
"content": "<|reserved_special_token_163|>",
|
1373 |
+
"lstrip": false,
|
1374 |
+
"normalized": false,
|
1375 |
+
"rstrip": false,
|
1376 |
+
"single_word": false,
|
1377 |
+
"special": true
|
1378 |
+
},
|
1379 |
+
"128172": {
|
1380 |
+
"content": "<|reserved_special_token_164|>",
|
1381 |
+
"lstrip": false,
|
1382 |
+
"normalized": false,
|
1383 |
+
"rstrip": false,
|
1384 |
+
"single_word": false,
|
1385 |
+
"special": true
|
1386 |
+
},
|
1387 |
+
"128173": {
|
1388 |
+
"content": "<|reserved_special_token_165|>",
|
1389 |
+
"lstrip": false,
|
1390 |
+
"normalized": false,
|
1391 |
+
"rstrip": false,
|
1392 |
+
"single_word": false,
|
1393 |
+
"special": true
|
1394 |
+
},
|
1395 |
+
"128174": {
|
1396 |
+
"content": "<|reserved_special_token_166|>",
|
1397 |
+
"lstrip": false,
|
1398 |
+
"normalized": false,
|
1399 |
+
"rstrip": false,
|
1400 |
+
"single_word": false,
|
1401 |
+
"special": true
|
1402 |
+
},
|
1403 |
+
"128175": {
|
1404 |
+
"content": "<|reserved_special_token_167|>",
|
1405 |
+
"lstrip": false,
|
1406 |
+
"normalized": false,
|
1407 |
+
"rstrip": false,
|
1408 |
+
"single_word": false,
|
1409 |
+
"special": true
|
1410 |
+
},
|
1411 |
+
"128176": {
|
1412 |
+
"content": "<|reserved_special_token_168|>",
|
1413 |
+
"lstrip": false,
|
1414 |
+
"normalized": false,
|
1415 |
+
"rstrip": false,
|
1416 |
+
"single_word": false,
|
1417 |
+
"special": true
|
1418 |
+
},
|
1419 |
+
"128177": {
|
1420 |
+
"content": "<|reserved_special_token_169|>",
|
1421 |
+
"lstrip": false,
|
1422 |
+
"normalized": false,
|
1423 |
+
"rstrip": false,
|
1424 |
+
"single_word": false,
|
1425 |
+
"special": true
|
1426 |
+
},
|
1427 |
+
"128178": {
|
1428 |
+
"content": "<|reserved_special_token_170|>",
|
1429 |
+
"lstrip": false,
|
1430 |
+
"normalized": false,
|
1431 |
+
"rstrip": false,
|
1432 |
+
"single_word": false,
|
1433 |
+
"special": true
|
1434 |
+
},
|
1435 |
+
"128179": {
|
1436 |
+
"content": "<|reserved_special_token_171|>",
|
1437 |
+
"lstrip": false,
|
1438 |
+
"normalized": false,
|
1439 |
+
"rstrip": false,
|
1440 |
+
"single_word": false,
|
1441 |
+
"special": true
|
1442 |
+
},
|
1443 |
+
"128180": {
|
1444 |
+
"content": "<|reserved_special_token_172|>",
|
1445 |
+
"lstrip": false,
|
1446 |
+
"normalized": false,
|
1447 |
+
"rstrip": false,
|
1448 |
+
"single_word": false,
|
1449 |
+
"special": true
|
1450 |
+
},
|
1451 |
+
"128181": {
|
1452 |
+
"content": "<|reserved_special_token_173|>",
|
1453 |
+
"lstrip": false,
|
1454 |
+
"normalized": false,
|
1455 |
+
"rstrip": false,
|
1456 |
+
"single_word": false,
|
1457 |
+
"special": true
|
1458 |
+
},
|
1459 |
+
"128182": {
|
1460 |
+
"content": "<|reserved_special_token_174|>",
|
1461 |
+
"lstrip": false,
|
1462 |
+
"normalized": false,
|
1463 |
+
"rstrip": false,
|
1464 |
+
"single_word": false,
|
1465 |
+
"special": true
|
1466 |
+
},
|
1467 |
+
"128183": {
|
1468 |
+
"content": "<|reserved_special_token_175|>",
|
1469 |
+
"lstrip": false,
|
1470 |
+
"normalized": false,
|
1471 |
+
"rstrip": false,
|
1472 |
+
"single_word": false,
|
1473 |
+
"special": true
|
1474 |
+
},
|
1475 |
+
"128184": {
|
1476 |
+
"content": "<|reserved_special_token_176|>",
|
1477 |
+
"lstrip": false,
|
1478 |
+
"normalized": false,
|
1479 |
+
"rstrip": false,
|
1480 |
+
"single_word": false,
|
1481 |
+
"special": true
|
1482 |
+
},
|
1483 |
+
"128185": {
|
1484 |
+
"content": "<|reserved_special_token_177|>",
|
1485 |
+
"lstrip": false,
|
1486 |
+
"normalized": false,
|
1487 |
+
"rstrip": false,
|
1488 |
+
"single_word": false,
|
1489 |
+
"special": true
|
1490 |
+
},
|
1491 |
+
"128186": {
|
1492 |
+
"content": "<|reserved_special_token_178|>",
|
1493 |
+
"lstrip": false,
|
1494 |
+
"normalized": false,
|
1495 |
+
"rstrip": false,
|
1496 |
+
"single_word": false,
|
1497 |
+
"special": true
|
1498 |
+
},
|
1499 |
+
"128187": {
|
1500 |
+
"content": "<|reserved_special_token_179|>",
|
1501 |
+
"lstrip": false,
|
1502 |
+
"normalized": false,
|
1503 |
+
"rstrip": false,
|
1504 |
+
"single_word": false,
|
1505 |
+
"special": true
|
1506 |
+
},
|
1507 |
+
"128188": {
|
1508 |
+
"content": "<|reserved_special_token_180|>",
|
1509 |
+
"lstrip": false,
|
1510 |
+
"normalized": false,
|
1511 |
+
"rstrip": false,
|
1512 |
+
"single_word": false,
|
1513 |
+
"special": true
|
1514 |
+
},
|
1515 |
+
"128189": {
|
1516 |
+
"content": "<|reserved_special_token_181|>",
|
1517 |
+
"lstrip": false,
|
1518 |
+
"normalized": false,
|
1519 |
+
"rstrip": false,
|
1520 |
+
"single_word": false,
|
1521 |
+
"special": true
|
1522 |
+
},
|
1523 |
+
"128190": {
|
1524 |
+
"content": "<|reserved_special_token_182|>",
|
1525 |
+
"lstrip": false,
|
1526 |
+
"normalized": false,
|
1527 |
+
"rstrip": false,
|
1528 |
+
"single_word": false,
|
1529 |
+
"special": true
|
1530 |
+
},
|
1531 |
+
"128191": {
|
1532 |
+
"content": "<|reserved_special_token_183|>",
|
1533 |
+
"lstrip": false,
|
1534 |
+
"normalized": false,
|
1535 |
+
"rstrip": false,
|
1536 |
+
"single_word": false,
|
1537 |
+
"special": true
|
1538 |
+
},
|
1539 |
+
"128192": {
|
1540 |
+
"content": "<|reserved_special_token_184|>",
|
1541 |
+
"lstrip": false,
|
1542 |
+
"normalized": false,
|
1543 |
+
"rstrip": false,
|
1544 |
+
"single_word": false,
|
1545 |
+
"special": true
|
1546 |
+
},
|
1547 |
+
"128193": {
|
1548 |
+
"content": "<|reserved_special_token_185|>",
|
1549 |
+
"lstrip": false,
|
1550 |
+
"normalized": false,
|
1551 |
+
"rstrip": false,
|
1552 |
+
"single_word": false,
|
1553 |
+
"special": true
|
1554 |
+
},
|
1555 |
+
"128194": {
|
1556 |
+
"content": "<|reserved_special_token_186|>",
|
1557 |
+
"lstrip": false,
|
1558 |
+
"normalized": false,
|
1559 |
+
"rstrip": false,
|
1560 |
+
"single_word": false,
|
1561 |
+
"special": true
|
1562 |
+
},
|
1563 |
+
"128195": {
|
1564 |
+
"content": "<|reserved_special_token_187|>",
|
1565 |
+
"lstrip": false,
|
1566 |
+
"normalized": false,
|
1567 |
+
"rstrip": false,
|
1568 |
+
"single_word": false,
|
1569 |
+
"special": true
|
1570 |
+
},
|
1571 |
+
"128196": {
|
1572 |
+
"content": "<|reserved_special_token_188|>",
|
1573 |
+
"lstrip": false,
|
1574 |
+
"normalized": false,
|
1575 |
+
"rstrip": false,
|
1576 |
+
"single_word": false,
|
1577 |
+
"special": true
|
1578 |
+
},
|
1579 |
+
"128197": {
|
1580 |
+
"content": "<|reserved_special_token_189|>",
|
1581 |
+
"lstrip": false,
|
1582 |
+
"normalized": false,
|
1583 |
+
"rstrip": false,
|
1584 |
+
"single_word": false,
|
1585 |
+
"special": true
|
1586 |
+
},
|
1587 |
+
"128198": {
|
1588 |
+
"content": "<|reserved_special_token_190|>",
|
1589 |
+
"lstrip": false,
|
1590 |
+
"normalized": false,
|
1591 |
+
"rstrip": false,
|
1592 |
+
"single_word": false,
|
1593 |
+
"special": true
|
1594 |
+
},
|
1595 |
+
"128199": {
|
1596 |
+
"content": "<|reserved_special_token_191|>",
|
1597 |
+
"lstrip": false,
|
1598 |
+
"normalized": false,
|
1599 |
+
"rstrip": false,
|
1600 |
+
"single_word": false,
|
1601 |
+
"special": true
|
1602 |
+
},
|
1603 |
+
"128200": {
|
1604 |
+
"content": "<|reserved_special_token_192|>",
|
1605 |
+
"lstrip": false,
|
1606 |
+
"normalized": false,
|
1607 |
+
"rstrip": false,
|
1608 |
+
"single_word": false,
|
1609 |
+
"special": true
|
1610 |
+
},
|
1611 |
+
"128201": {
|
1612 |
+
"content": "<|reserved_special_token_193|>",
|
1613 |
+
"lstrip": false,
|
1614 |
+
"normalized": false,
|
1615 |
+
"rstrip": false,
|
1616 |
+
"single_word": false,
|
1617 |
+
"special": true
|
1618 |
+
},
|
1619 |
+
"128202": {
|
1620 |
+
"content": "<|reserved_special_token_194|>",
|
1621 |
+
"lstrip": false,
|
1622 |
+
"normalized": false,
|
1623 |
+
"rstrip": false,
|
1624 |
+
"single_word": false,
|
1625 |
+
"special": true
|
1626 |
+
},
|
1627 |
+
"128203": {
|
1628 |
+
"content": "<|reserved_special_token_195|>",
|
1629 |
+
"lstrip": false,
|
1630 |
+
"normalized": false,
|
1631 |
+
"rstrip": false,
|
1632 |
+
"single_word": false,
|
1633 |
+
"special": true
|
1634 |
+
},
|
1635 |
+
"128204": {
|
1636 |
+
"content": "<|reserved_special_token_196|>",
|
1637 |
+
"lstrip": false,
|
1638 |
+
"normalized": false,
|
1639 |
+
"rstrip": false,
|
1640 |
+
"single_word": false,
|
1641 |
+
"special": true
|
1642 |
+
},
|
1643 |
+
"128205": {
|
1644 |
+
"content": "<|reserved_special_token_197|>",
|
1645 |
+
"lstrip": false,
|
1646 |
+
"normalized": false,
|
1647 |
+
"rstrip": false,
|
1648 |
+
"single_word": false,
|
1649 |
+
"special": true
|
1650 |
+
},
|
1651 |
+
"128206": {
|
1652 |
+
"content": "<|reserved_special_token_198|>",
|
1653 |
+
"lstrip": false,
|
1654 |
+
"normalized": false,
|
1655 |
+
"rstrip": false,
|
1656 |
+
"single_word": false,
|
1657 |
+
"special": true
|
1658 |
+
},
|
1659 |
+
"128207": {
|
1660 |
+
"content": "<|reserved_special_token_199|>",
|
1661 |
+
"lstrip": false,
|
1662 |
+
"normalized": false,
|
1663 |
+
"rstrip": false,
|
1664 |
+
"single_word": false,
|
1665 |
+
"special": true
|
1666 |
+
},
|
1667 |
+
"128208": {
|
1668 |
+
"content": "<|reserved_special_token_200|>",
|
1669 |
+
"lstrip": false,
|
1670 |
+
"normalized": false,
|
1671 |
+
"rstrip": false,
|
1672 |
+
"single_word": false,
|
1673 |
+
"special": true
|
1674 |
+
},
|
1675 |
+
"128209": {
|
1676 |
+
"content": "<|reserved_special_token_201|>",
|
1677 |
+
"lstrip": false,
|
1678 |
+
"normalized": false,
|
1679 |
+
"rstrip": false,
|
1680 |
+
"single_word": false,
|
1681 |
+
"special": true
|
1682 |
+
},
|
1683 |
+
"128210": {
|
1684 |
+
"content": "<|reserved_special_token_202|>",
|
1685 |
+
"lstrip": false,
|
1686 |
+
"normalized": false,
|
1687 |
+
"rstrip": false,
|
1688 |
+
"single_word": false,
|
1689 |
+
"special": true
|
1690 |
+
},
|
1691 |
+
"128211": {
|
1692 |
+
"content": "<|reserved_special_token_203|>",
|
1693 |
+
"lstrip": false,
|
1694 |
+
"normalized": false,
|
1695 |
+
"rstrip": false,
|
1696 |
+
"single_word": false,
|
1697 |
+
"special": true
|
1698 |
+
},
|
1699 |
+
"128212": {
|
1700 |
+
"content": "<|reserved_special_token_204|>",
|
1701 |
+
"lstrip": false,
|
1702 |
+
"normalized": false,
|
1703 |
+
"rstrip": false,
|
1704 |
+
"single_word": false,
|
1705 |
+
"special": true
|
1706 |
+
},
|
1707 |
+
"128213": {
|
1708 |
+
"content": "<|reserved_special_token_205|>",
|
1709 |
+
"lstrip": false,
|
1710 |
+
"normalized": false,
|
1711 |
+
"rstrip": false,
|
1712 |
+
"single_word": false,
|
1713 |
+
"special": true
|
1714 |
+
},
|
1715 |
+
"128214": {
|
1716 |
+
"content": "<|reserved_special_token_206|>",
|
1717 |
+
"lstrip": false,
|
1718 |
+
"normalized": false,
|
1719 |
+
"rstrip": false,
|
1720 |
+
"single_word": false,
|
1721 |
+
"special": true
|
1722 |
+
},
|
1723 |
+
"128215": {
|
1724 |
+
"content": "<|reserved_special_token_207|>",
|
1725 |
+
"lstrip": false,
|
1726 |
+
"normalized": false,
|
1727 |
+
"rstrip": false,
|
1728 |
+
"single_word": false,
|
1729 |
+
"special": true
|
1730 |
+
},
|
1731 |
+
"128216": {
|
1732 |
+
"content": "<|reserved_special_token_208|>",
|
1733 |
+
"lstrip": false,
|
1734 |
+
"normalized": false,
|
1735 |
+
"rstrip": false,
|
1736 |
+
"single_word": false,
|
1737 |
+
"special": true
|
1738 |
+
},
|
1739 |
+
"128217": {
|
1740 |
+
"content": "<|reserved_special_token_209|>",
|
1741 |
+
"lstrip": false,
|
1742 |
+
"normalized": false,
|
1743 |
+
"rstrip": false,
|
1744 |
+
"single_word": false,
|
1745 |
+
"special": true
|
1746 |
+
},
|
1747 |
+
"128218": {
|
1748 |
+
"content": "<|reserved_special_token_210|>",
|
1749 |
+
"lstrip": false,
|
1750 |
+
"normalized": false,
|
1751 |
+
"rstrip": false,
|
1752 |
+
"single_word": false,
|
1753 |
+
"special": true
|
1754 |
+
},
|
1755 |
+
"128219": {
|
1756 |
+
"content": "<|reserved_special_token_211|>",
|
1757 |
+
"lstrip": false,
|
1758 |
+
"normalized": false,
|
1759 |
+
"rstrip": false,
|
1760 |
+
"single_word": false,
|
1761 |
+
"special": true
|
1762 |
+
},
|
1763 |
+
"128220": {
|
1764 |
+
"content": "<|reserved_special_token_212|>",
|
1765 |
+
"lstrip": false,
|
1766 |
+
"normalized": false,
|
1767 |
+
"rstrip": false,
|
1768 |
+
"single_word": false,
|
1769 |
+
"special": true
|
1770 |
+
},
|
1771 |
+
"128221": {
|
1772 |
+
"content": "<|reserved_special_token_213|>",
|
1773 |
+
"lstrip": false,
|
1774 |
+
"normalized": false,
|
1775 |
+
"rstrip": false,
|
1776 |
+
"single_word": false,
|
1777 |
+
"special": true
|
1778 |
+
},
|
1779 |
+
"128222": {
|
1780 |
+
"content": "<|reserved_special_token_214|>",
|
1781 |
+
"lstrip": false,
|
1782 |
+
"normalized": false,
|
1783 |
+
"rstrip": false,
|
1784 |
+
"single_word": false,
|
1785 |
+
"special": true
|
1786 |
+
},
|
1787 |
+
"128223": {
|
1788 |
+
"content": "<|reserved_special_token_215|>",
|
1789 |
+
"lstrip": false,
|
1790 |
+
"normalized": false,
|
1791 |
+
"rstrip": false,
|
1792 |
+
"single_word": false,
|
1793 |
+
"special": true
|
1794 |
+
},
|
1795 |
+
"128224": {
|
1796 |
+
"content": "<|reserved_special_token_216|>",
|
1797 |
+
"lstrip": false,
|
1798 |
+
"normalized": false,
|
1799 |
+
"rstrip": false,
|
1800 |
+
"single_word": false,
|
1801 |
+
"special": true
|
1802 |
+
},
|
1803 |
+
"128225": {
|
1804 |
+
"content": "<|reserved_special_token_217|>",
|
1805 |
+
"lstrip": false,
|
1806 |
+
"normalized": false,
|
1807 |
+
"rstrip": false,
|
1808 |
+
"single_word": false,
|
1809 |
+
"special": true
|
1810 |
+
},
|
1811 |
+
"128226": {
|
1812 |
+
"content": "<|reserved_special_token_218|>",
|
1813 |
+
"lstrip": false,
|
1814 |
+
"normalized": false,
|
1815 |
+
"rstrip": false,
|
1816 |
+
"single_word": false,
|
1817 |
+
"special": true
|
1818 |
+
},
|
1819 |
+
"128227": {
|
1820 |
+
"content": "<|reserved_special_token_219|>",
|
1821 |
+
"lstrip": false,
|
1822 |
+
"normalized": false,
|
1823 |
+
"rstrip": false,
|
1824 |
+
"single_word": false,
|
1825 |
+
"special": true
|
1826 |
+
},
|
1827 |
+
"128228": {
|
1828 |
+
"content": "<|reserved_special_token_220|>",
|
1829 |
+
"lstrip": false,
|
1830 |
+
"normalized": false,
|
1831 |
+
"rstrip": false,
|
1832 |
+
"single_word": false,
|
1833 |
+
"special": true
|
1834 |
+
},
|
1835 |
+
"128229": {
|
1836 |
+
"content": "<|reserved_special_token_221|>",
|
1837 |
+
"lstrip": false,
|
1838 |
+
"normalized": false,
|
1839 |
+
"rstrip": false,
|
1840 |
+
"single_word": false,
|
1841 |
+
"special": true
|
1842 |
+
},
|
1843 |
+
"128230": {
|
1844 |
+
"content": "<|reserved_special_token_222|>",
|
1845 |
+
"lstrip": false,
|
1846 |
+
"normalized": false,
|
1847 |
+
"rstrip": false,
|
1848 |
+
"single_word": false,
|
1849 |
+
"special": true
|
1850 |
+
},
|
1851 |
+
"128231": {
|
1852 |
+
"content": "<|reserved_special_token_223|>",
|
1853 |
+
"lstrip": false,
|
1854 |
+
"normalized": false,
|
1855 |
+
"rstrip": false,
|
1856 |
+
"single_word": false,
|
1857 |
+
"special": true
|
1858 |
+
},
|
1859 |
+
"128232": {
|
1860 |
+
"content": "<|reserved_special_token_224|>",
|
1861 |
+
"lstrip": false,
|
1862 |
+
"normalized": false,
|
1863 |
+
"rstrip": false,
|
1864 |
+
"single_word": false,
|
1865 |
+
"special": true
|
1866 |
+
},
|
1867 |
+
"128233": {
|
1868 |
+
"content": "<|reserved_special_token_225|>",
|
1869 |
+
"lstrip": false,
|
1870 |
+
"normalized": false,
|
1871 |
+
"rstrip": false,
|
1872 |
+
"single_word": false,
|
1873 |
+
"special": true
|
1874 |
+
},
|
1875 |
+
"128234": {
|
1876 |
+
"content": "<|reserved_special_token_226|>",
|
1877 |
+
"lstrip": false,
|
1878 |
+
"normalized": false,
|
1879 |
+
"rstrip": false,
|
1880 |
+
"single_word": false,
|
1881 |
+
"special": true
|
1882 |
+
},
|
1883 |
+
"128235": {
|
1884 |
+
"content": "<|reserved_special_token_227|>",
|
1885 |
+
"lstrip": false,
|
1886 |
+
"normalized": false,
|
1887 |
+
"rstrip": false,
|
1888 |
+
"single_word": false,
|
1889 |
+
"special": true
|
1890 |
+
},
|
1891 |
+
"128236": {
|
1892 |
+
"content": "<|reserved_special_token_228|>",
|
1893 |
+
"lstrip": false,
|
1894 |
+
"normalized": false,
|
1895 |
+
"rstrip": false,
|
1896 |
+
"single_word": false,
|
1897 |
+
"special": true
|
1898 |
+
},
|
1899 |
+
"128237": {
|
1900 |
+
"content": "<|reserved_special_token_229|>",
|
1901 |
+
"lstrip": false,
|
1902 |
+
"normalized": false,
|
1903 |
+
"rstrip": false,
|
1904 |
+
"single_word": false,
|
1905 |
+
"special": true
|
1906 |
+
},
|
1907 |
+
"128238": {
|
1908 |
+
"content": "<|reserved_special_token_230|>",
|
1909 |
+
"lstrip": false,
|
1910 |
+
"normalized": false,
|
1911 |
+
"rstrip": false,
|
1912 |
+
"single_word": false,
|
1913 |
+
"special": true
|
1914 |
+
},
|
1915 |
+
"128239": {
|
1916 |
+
"content": "<|reserved_special_token_231|>",
|
1917 |
+
"lstrip": false,
|
1918 |
+
"normalized": false,
|
1919 |
+
"rstrip": false,
|
1920 |
+
"single_word": false,
|
1921 |
+
"special": true
|
1922 |
+
},
|
1923 |
+
"128240": {
|
1924 |
+
"content": "<|reserved_special_token_232|>",
|
1925 |
+
"lstrip": false,
|
1926 |
+
"normalized": false,
|
1927 |
+
"rstrip": false,
|
1928 |
+
"single_word": false,
|
1929 |
+
"special": true
|
1930 |
+
},
|
1931 |
+
"128241": {
|
1932 |
+
"content": "<|reserved_special_token_233|>",
|
1933 |
+
"lstrip": false,
|
1934 |
+
"normalized": false,
|
1935 |
+
"rstrip": false,
|
1936 |
+
"single_word": false,
|
1937 |
+
"special": true
|
1938 |
+
},
|
1939 |
+
"128242": {
|
1940 |
+
"content": "<|reserved_special_token_234|>",
|
1941 |
+
"lstrip": false,
|
1942 |
+
"normalized": false,
|
1943 |
+
"rstrip": false,
|
1944 |
+
"single_word": false,
|
1945 |
+
"special": true
|
1946 |
+
},
|
1947 |
+
"128243": {
|
1948 |
+
"content": "<|reserved_special_token_235|>",
|
1949 |
+
"lstrip": false,
|
1950 |
+
"normalized": false,
|
1951 |
+
"rstrip": false,
|
1952 |
+
"single_word": false,
|
1953 |
+
"special": true
|
1954 |
+
},
|
1955 |
+
"128244": {
|
1956 |
+
"content": "<|reserved_special_token_236|>",
|
1957 |
+
"lstrip": false,
|
1958 |
+
"normalized": false,
|
1959 |
+
"rstrip": false,
|
1960 |
+
"single_word": false,
|
1961 |
+
"special": true
|
1962 |
+
},
|
1963 |
+
"128245": {
|
1964 |
+
"content": "<|reserved_special_token_237|>",
|
1965 |
+
"lstrip": false,
|
1966 |
+
"normalized": false,
|
1967 |
+
"rstrip": false,
|
1968 |
+
"single_word": false,
|
1969 |
+
"special": true
|
1970 |
+
},
|
1971 |
+
"128246": {
|
1972 |
+
"content": "<|reserved_special_token_238|>",
|
1973 |
+
"lstrip": false,
|
1974 |
+
"normalized": false,
|
1975 |
+
"rstrip": false,
|
1976 |
+
"single_word": false,
|
1977 |
+
"special": true
|
1978 |
+
},
|
1979 |
+
"128247": {
|
1980 |
+
"content": "<|reserved_special_token_239|>",
|
1981 |
+
"lstrip": false,
|
1982 |
+
"normalized": false,
|
1983 |
+
"rstrip": false,
|
1984 |
+
"single_word": false,
|
1985 |
+
"special": true
|
1986 |
+
},
|
1987 |
+
"128248": {
|
1988 |
+
"content": "<|reserved_special_token_240|>",
|
1989 |
+
"lstrip": false,
|
1990 |
+
"normalized": false,
|
1991 |
+
"rstrip": false,
|
1992 |
+
"single_word": false,
|
1993 |
+
"special": true
|
1994 |
+
},
|
1995 |
+
"128249": {
|
1996 |
+
"content": "<|reserved_special_token_241|>",
|
1997 |
+
"lstrip": false,
|
1998 |
+
"normalized": false,
|
1999 |
+
"rstrip": false,
|
2000 |
+
"single_word": false,
|
2001 |
+
"special": true
|
2002 |
+
},
|
2003 |
+
"128250": {
|
2004 |
+
"content": "<|reserved_special_token_242|>",
|
2005 |
+
"lstrip": false,
|
2006 |
+
"normalized": false,
|
2007 |
+
"rstrip": false,
|
2008 |
+
"single_word": false,
|
2009 |
+
"special": true
|
2010 |
+
},
|
2011 |
+
"128251": {
|
2012 |
+
"content": "<|reserved_special_token_243|>",
|
2013 |
+
"lstrip": false,
|
2014 |
+
"normalized": false,
|
2015 |
+
"rstrip": false,
|
2016 |
+
"single_word": false,
|
2017 |
+
"special": true
|
2018 |
+
},
|
2019 |
+
"128252": {
|
2020 |
+
"content": "<|reserved_special_token_244|>",
|
2021 |
+
"lstrip": false,
|
2022 |
+
"normalized": false,
|
2023 |
+
"rstrip": false,
|
2024 |
+
"single_word": false,
|
2025 |
+
"special": true
|
2026 |
+
},
|
2027 |
+
"128253": {
|
2028 |
+
"content": "<|reserved_special_token_245|>",
|
2029 |
+
"lstrip": false,
|
2030 |
+
"normalized": false,
|
2031 |
+
"rstrip": false,
|
2032 |
+
"single_word": false,
|
2033 |
+
"special": true
|
2034 |
+
},
|
2035 |
+
"128254": {
|
2036 |
+
"content": "<|reserved_special_token_246|>",
|
2037 |
+
"lstrip": false,
|
2038 |
+
"normalized": false,
|
2039 |
+
"rstrip": false,
|
2040 |
+
"single_word": false,
|
2041 |
+
"special": true
|
2042 |
+
},
|
2043 |
+
"128255": {
|
2044 |
+
"content": "<|reserved_special_token_247|>",
|
2045 |
+
"lstrip": false,
|
2046 |
+
"normalized": false,
|
2047 |
+
"rstrip": false,
|
2048 |
+
"single_word": false,
|
2049 |
+
"special": true
|
2050 |
+
}
|
2051 |
+
},
|
2052 |
+
"bos_token": "<|begin_of_text|>",
|
2053 |
+
"chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- set date_string = \"26 Jul 2024\" %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- System message + builtin tools #}\n{{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n{%- if builtin_tools is defined or tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n{%- endif %}\n{%- if builtin_tools is defined %}\n {{- \"Tools: \" + builtin_tools | reject('equalto', 'code_interpreter') | join(\", \") + \"\\n\\n\"}}\n{%- endif %}\n{{- \"Cutting Knowledge Date: December 2023\\n\" }}\n{{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n{%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n{%- endif %}\n{{- system_message }}\n{{- \"<|eot_id|>\" }}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {%- if builtin_tools is defined and tool_call.name in builtin_tools %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- \"<|python_tag|>\" + tool_call.name + \".call(\" }}\n {%- for arg_name, arg_val in tool_call.arguments | items %}\n {{- arg_name + '=\"' + arg_val + '\"' }}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- endif %}\n {%- endfor %}\n {{- \")\" }}\n {%- else %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {%- endif %}\n {%- if builtin_tools is defined %}\n {#- This means we're in ipython mode #}\n {{- \"<|eom_id|>\" }}\n {%- else %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
|
2054 |
+
"clean_up_tokenization_spaces": true,
|
2055 |
+
"eos_token": "<|eot_id|>",
|
2056 |
+
"extra_special_tokens": {},
|
2057 |
+
"model_input_names": [
|
2058 |
+
"input_ids",
|
2059 |
+
"attention_mask"
|
2060 |
+
],
|
2061 |
+
"model_max_length": 131072,
|
2062 |
+
"tokenizer_class": "PreTrainedTokenizerFast"
|
2063 |
+
}
|
mergekit/.github/workflows/pre-commit.yml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: pre-commit
|
2 |
+
|
3 |
+
on:
|
4 |
+
pull_request:
|
5 |
+
push:
|
6 |
+
|
7 |
+
jobs:
|
8 |
+
pre-commit:
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
steps:
|
11 |
+
- uses: actions/checkout@v3
|
12 |
+
- uses: actions/setup-python@v4
|
13 |
+
with:
|
14 |
+
python-version: "3.11"
|
15 |
+
cache: "pip"
|
16 |
+
- uses: pre-commit/action@v3.0.0
|
17 |
+
|
18 |
+
pytest:
|
19 |
+
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
|
20 |
+
name: PyTest
|
21 |
+
needs: [pre-commit]
|
22 |
+
runs-on: ubuntu-latest
|
23 |
+
strategy:
|
24 |
+
fail-fast: false
|
25 |
+
matrix:
|
26 |
+
python_version: ["3.9", "3.10", "3.11"]
|
27 |
+
timeout-minutes: 5
|
28 |
+
|
29 |
+
steps:
|
30 |
+
- uses: actions/checkout@v3
|
31 |
+
- name: Setup Python
|
32 |
+
uses: actions/setup-python@v4
|
33 |
+
with:
|
34 |
+
python-version: ${{ matrix.python_version }}
|
35 |
+
cache: "pip"
|
36 |
+
- name: Install dependencies
|
37 |
+
run: pip3 install -U -e .[test]
|
38 |
+
- name: Run tests
|
39 |
+
run: pytest .
|
mergekit/.gitignore
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*$py.class
|
5 |
+
|
6 |
+
# C extensions
|
7 |
+
*.so
|
8 |
+
|
9 |
+
# Distribution / packaging
|
10 |
+
.Python
|
11 |
+
build/
|
12 |
+
develop-eggs/
|
13 |
+
dist/
|
14 |
+
downloads/
|
15 |
+
eggs/
|
16 |
+
.eggs/
|
17 |
+
lib/
|
18 |
+
lib64/
|
19 |
+
parts/
|
20 |
+
sdist/
|
21 |
+
var/
|
22 |
+
wheels/
|
23 |
+
share/python-wheels/
|
24 |
+
*.egg-info/
|
25 |
+
.installed.cfg
|
26 |
+
*.egg
|
27 |
+
MANIFEST
|
28 |
+
|
29 |
+
# PyInstaller
|
30 |
+
# Usually these files are written by a python script from a template
|
31 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32 |
+
*.manifest
|
33 |
+
*.spec
|
34 |
+
|
35 |
+
# Installer logs
|
36 |
+
pip-log.txt
|
37 |
+
pip-delete-this-directory.txt
|
38 |
+
|
39 |
+
# Unit test / coverage reports
|
40 |
+
htmlcov/
|
41 |
+
.tox/
|
42 |
+
.nox/
|
43 |
+
.coverage
|
44 |
+
.coverage.*
|
45 |
+
.cache
|
46 |
+
nosetests.xml
|
47 |
+
coverage.xml
|
48 |
+
*.cover
|
49 |
+
*.py,cover
|
50 |
+
.hypothesis/
|
51 |
+
.pytest_cache/
|
52 |
+
cover/
|
53 |
+
|
54 |
+
# Translations
|
55 |
+
*.mo
|
56 |
+
*.pot
|
57 |
+
|
58 |
+
# Django stuff:
|
59 |
+
*.log
|
60 |
+
local_settings.py
|
61 |
+
db.sqlite3
|
62 |
+
db.sqlite3-journal
|
63 |
+
|
64 |
+
# Flask stuff:
|
65 |
+
instance/
|
66 |
+
.webassets-cache
|
67 |
+
|
68 |
+
# Scrapy stuff:
|
69 |
+
.scrapy
|
70 |
+
|
71 |
+
# Sphinx documentation
|
72 |
+
docs/_build/
|
73 |
+
|
74 |
+
# PyBuilder
|
75 |
+
.pybuilder/
|
76 |
+
target/
|
77 |
+
|
78 |
+
# Jupyter Notebook
|
79 |
+
.ipynb_checkpoints
|
80 |
+
|
81 |
+
# IPython
|
82 |
+
profile_default/
|
83 |
+
ipython_config.py
|
84 |
+
|
85 |
+
# pyenv
|
86 |
+
# For a library or package, you might want to ignore these files since the code is
|
87 |
+
# intended to run in multiple environments; otherwise, check them in:
|
88 |
+
# .python-version
|
89 |
+
|
90 |
+
# pipenv
|
91 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94 |
+
# install all needed dependencies.
|
95 |
+
#Pipfile.lock
|
96 |
+
|
97 |
+
# poetry
|
98 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
99 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100 |
+
# commonly ignored for libraries.
|
101 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
102 |
+
#poetry.lock
|
103 |
+
|
104 |
+
# pdm
|
105 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
106 |
+
#pdm.lock
|
107 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
108 |
+
# in version control.
|
109 |
+
# https://pdm.fming.dev/#use-with-ide
|
110 |
+
.pdm.toml
|
111 |
+
|
112 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
113 |
+
__pypackages__/
|
114 |
+
|
115 |
+
# Celery stuff
|
116 |
+
celerybeat-schedule
|
117 |
+
celerybeat.pid
|
118 |
+
|
119 |
+
# SageMath parsed files
|
120 |
+
*.sage.py
|
121 |
+
|
122 |
+
# Environments
|
123 |
+
.env
|
124 |
+
.venv
|
125 |
+
env/
|
126 |
+
venv/
|
127 |
+
ENV/
|
128 |
+
env.bak/
|
129 |
+
venv.bak/
|
130 |
+
|
131 |
+
# Spyder project settings
|
132 |
+
.spyderproject
|
133 |
+
.spyproject
|
134 |
+
|
135 |
+
# Rope project settings
|
136 |
+
.ropeproject
|
137 |
+
|
138 |
+
# mkdocs documentation
|
139 |
+
/site
|
140 |
+
|
141 |
+
# mypy
|
142 |
+
.mypy_cache/
|
143 |
+
.dmypy.json
|
144 |
+
dmypy.json
|
145 |
+
|
146 |
+
# Pyre type checker
|
147 |
+
.pyre/
|
148 |
+
|
149 |
+
# pytype static type analyzer
|
150 |
+
.pytype/
|
151 |
+
|
152 |
+
# Cython debug symbols
|
153 |
+
cython_debug/
|
154 |
+
|
155 |
+
# PyCharm
|
156 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
157 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
158 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
159 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
160 |
+
#.idea/
|
mergekit/.pre-commit-config.yaml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
repos:
|
2 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
3 |
+
rev: v3.2.0
|
4 |
+
hooks:
|
5 |
+
- id: check-added-large-files
|
6 |
+
- id: check-yaml
|
7 |
+
args: ["--allow-multiple-documents"]
|
8 |
+
- repo: https://github.com/PyCQA/isort
|
9 |
+
rev: 5.12.0
|
10 |
+
hooks:
|
11 |
+
- id: isort
|
12 |
+
- repo: https://github.com/psf/black
|
13 |
+
rev: 23.11.0
|
14 |
+
hooks:
|
15 |
+
- id: black
|
16 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
17 |
+
rev: v3.2.0
|
18 |
+
hooks:
|
19 |
+
- id: trailing-whitespace
|
20 |
+
- id: end-of-file-fixer
|
mergekit/LICENSE
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
|
9 |
+
This version of the GNU Lesser General Public License incorporates
|
10 |
+
the terms and conditions of version 3 of the GNU General Public
|
11 |
+
License, supplemented by the additional permissions listed below.
|
12 |
+
|
13 |
+
0. Additional Definitions.
|
14 |
+
|
15 |
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16 |
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17 |
+
General Public License.
|
18 |
+
|
19 |
+
"The Library" refers to a covered work governed by this License,
|
20 |
+
other than an Application or a Combined Work as defined below.
|
21 |
+
|
22 |
+
An "Application" is any work that makes use of an interface provided
|
23 |
+
by the Library, but which is not otherwise based on the Library.
|
24 |
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25 |
+
of using an interface provided by the Library.
|
26 |
+
|
27 |
+
A "Combined Work" is a work produced by combining or linking an
|
28 |
+
Application with the Library. The particular version of the Library
|
29 |
+
with which the Combined Work was made is also called the "Linked
|
30 |
+
Version".
|
31 |
+
|
32 |
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33 |
+
Corresponding Source for the Combined Work, excluding any source code
|
34 |
+
for portions of the Combined Work that, considered in isolation, are
|
35 |
+
based on the Application, and not on the Linked Version.
|
36 |
+
|
37 |
+
The "Corresponding Application Code" for a Combined Work means the
|
38 |
+
object code and/or source code for the Application, including any data
|
39 |
+
and utility programs needed for reproducing the Combined Work from the
|
40 |
+
Application, but excluding the System Libraries of the Combined Work.
|
41 |
+
|
42 |
+
1. Exception to Section 3 of the GNU GPL.
|
43 |
+
|
44 |
+
You may convey a covered work under sections 3 and 4 of this License
|
45 |
+
without being bound by section 3 of the GNU GPL.
|
46 |
+
|
47 |
+
2. Conveying Modified Versions.
|
48 |
+
|
49 |
+
If you modify a copy of the Library, and, in your modifications, a
|
50 |
+
facility refers to a function or data to be supplied by an Application
|
51 |
+
that uses the facility (other than as an argument passed when the
|
52 |
+
facility is invoked), then you may convey a copy of the modified
|
53 |
+
version:
|
54 |
+
|
55 |
+
a) under this License, provided that you make a good faith effort to
|
56 |
+
ensure that, in the event an Application does not supply the
|
57 |
+
function or data, the facility still operates, and performs
|
58 |
+
whatever part of its purpose remains meaningful, or
|
59 |
+
|
60 |
+
b) under the GNU GPL, with none of the additional permissions of
|
61 |
+
this License applicable to that copy.
|
62 |
+
|
63 |
+
3. Object Code Incorporating Material from Library Header Files.
|
64 |
+
|
65 |
+
The object code form of an Application may incorporate material from
|
66 |
+
a header file that is part of the Library. You may convey such object
|
67 |
+
code under terms of your choice, provided that, if the incorporated
|
68 |
+
material is not limited to numerical parameters, data structure
|
69 |
+
layouts and accessors, or small macros, inline functions and templates
|
70 |
+
(ten or fewer lines in length), you do both of the following:
|
71 |
+
|
72 |
+
a) Give prominent notice with each copy of the object code that the
|
73 |
+
Library is used in it and that the Library and its use are
|
74 |
+
covered by this License.
|
75 |
+
|
76 |
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77 |
+
document.
|
78 |
+
|
79 |
+
4. Combined Works.
|
80 |
+
|
81 |
+
You may convey a Combined Work under terms of your choice that,
|
82 |
+
taken together, effectively do not restrict modification of the
|
83 |
+
portions of the Library contained in the Combined Work and reverse
|
84 |
+
engineering for debugging such modifications, if you also do each of
|
85 |
+
the following:
|
86 |
+
|
87 |
+
a) Give prominent notice with each copy of the Combined Work that
|
88 |
+
the Library is used in it and that the Library and its use are
|
89 |
+
covered by this License.
|
90 |
+
|
91 |
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92 |
+
document.
|
93 |
+
|
94 |
+
c) For a Combined Work that displays copyright notices during
|
95 |
+
execution, include the copyright notice for the Library among
|
96 |
+
these notices, as well as a reference directing the user to the
|
97 |
+
copies of the GNU GPL and this license document.
|
98 |
+
|
99 |
+
d) Do one of the following:
|
100 |
+
|
101 |
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102 |
+
License, and the Corresponding Application Code in a form
|
103 |
+
suitable for, and under terms that permit, the user to
|
104 |
+
recombine or relink the Application with a modified version of
|
105 |
+
the Linked Version to produce a modified Combined Work, in the
|
106 |
+
manner specified by section 6 of the GNU GPL for conveying
|
107 |
+
Corresponding Source.
|
108 |
+
|
109 |
+
1) Use a suitable shared library mechanism for linking with the
|
110 |
+
Library. A suitable mechanism is one that (a) uses at run time
|
111 |
+
a copy of the Library already present on the user's computer
|
112 |
+
system, and (b) will operate properly with a modified version
|
113 |
+
of the Library that is interface-compatible with the Linked
|
114 |
+
Version.
|
115 |
+
|
116 |
+
e) Provide Installation Information, but only if you would otherwise
|
117 |
+
be required to provide such information under section 6 of the
|
118 |
+
GNU GPL, and only to the extent that such information is
|
119 |
+
necessary to install and execute a modified version of the
|
120 |
+
Combined Work produced by recombining or relinking the
|
121 |
+
Application with a modified version of the Linked Version. (If
|
122 |
+
you use option 4d0, the Installation Information must accompany
|
123 |
+
the Minimal Corresponding Source and Corresponding Application
|
124 |
+
Code. If you use option 4d1, you must provide the Installation
|
125 |
+
Information in the manner specified by section 6 of the GNU GPL
|
126 |
+
for conveying Corresponding Source.)
|
127 |
+
|
128 |
+
5. Combined Libraries.
|
129 |
+
|
130 |
+
You may place library facilities that are a work based on the
|
131 |
+
Library side by side in a single library together with other library
|
132 |
+
facilities that are not Applications and are not covered by this
|
133 |
+
License, and convey such a combined library under terms of your
|
134 |
+
choice, if you do both of the following:
|
135 |
+
|
136 |
+
a) Accompany the combined library with a copy of the same work based
|
137 |
+
on the Library, uncombined with any other library facilities,
|
138 |
+
conveyed under the terms of this License.
|
139 |
+
|
140 |
+
b) Give prominent notice with the combined library that part of it
|
141 |
+
is a work based on the Library, and explaining where to find the
|
142 |
+
accompanying uncombined form of the same work.
|
143 |
+
|
144 |
+
6. Revised Versions of the GNU Lesser General Public License.
|
145 |
+
|
146 |
+
The Free Software Foundation may publish revised and/or new versions
|
147 |
+
of the GNU Lesser General Public License from time to time. Such new
|
148 |
+
versions will be similar in spirit to the present version, but may
|
149 |
+
differ in detail to address new problems or concerns.
|
150 |
+
|
151 |
+
Each version is given a distinguishing version number. If the
|
152 |
+
Library as you received it specifies that a certain numbered version
|
153 |
+
of the GNU Lesser General Public License "or any later version"
|
154 |
+
applies to it, you have the option of following the terms and
|
155 |
+
conditions either of that published version or of any later version
|
156 |
+
published by the Free Software Foundation. If the Library as you
|
157 |
+
received it does not specify a version number of the GNU Lesser
|
158 |
+
General Public License, you may choose any version of the GNU Lesser
|
159 |
+
General Public License ever published by the Free Software Foundation.
|
160 |
+
|
161 |
+
If the Library as you received it specifies that a proxy can decide
|
162 |
+
whether future versions of the GNU Lesser General Public License shall
|
163 |
+
apply, that proxy's public statement of acceptance of any version is
|
164 |
+
permanent authorization for you to choose that version for the
|
165 |
+
Library.
|
mergekit/README.md
ADDED
@@ -0,0 +1,418 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# mergekit
|
2 |
+
|
3 |
+
`mergekit` is a toolkit for merging pre-trained language models. `mergekit` uses an out-of-core approach to perform unreasonably elaborate merges in resource-constrained situations. Merges can be run entirely on CPU or accelerated with as little as 8 GB of VRAM. Many merging algorithms are supported, with more coming as they catch my attention.
|
4 |
+
|
5 |
+
## Contents
|
6 |
+
|
7 |
+
- [Why Merge Models?](#why-merge-models)
|
8 |
+
- [Features](#features)
|
9 |
+
- [Installation](#installation)
|
10 |
+
- [Usage](#usage)
|
11 |
+
- [Merge Configuration](#merge-configuration)
|
12 |
+
- [Parameter Specification](#parameter-specification)
|
13 |
+
- [Tokenizer Configuration](#tokenizer-configuration)
|
14 |
+
- [Chat Template Configuration](#chat-template-configuration)
|
15 |
+
- [Examples](#examples)
|
16 |
+
- [Merge Methods](#merge-methods)
|
17 |
+
- [LoRA extraction](#lora-extraction)
|
18 |
+
- [Mixture of Experts merging](#mixture-of-experts-merging)
|
19 |
+
- [Evolutionary merge methods](#evolutionary-merge-methods)
|
20 |
+
- [Merge in the Cloud](#-merge-in-the-cloud-)
|
21 |
+
- [Citation](#citation)
|
22 |
+
|
23 |
+
## Why Merge Models?
|
24 |
+
|
25 |
+
Model merging is a powerful technique that allows combining the strengths of different models without the computational overhead of ensembling or the need for additional training. By operating directly in the weight space of models, merging can:
|
26 |
+
|
27 |
+
- Combine multiple specialized models into a single versatile model
|
28 |
+
- Transfer capabilities between models without access to training data
|
29 |
+
- Find optimal trade-offs between different model behaviors
|
30 |
+
- Improve performance while maintaining inference costs
|
31 |
+
- Create new capabilities through creative model combinations
|
32 |
+
|
33 |
+
Unlike traditional ensembling which requires running multiple models, merged models maintain the same inference cost as a single model while often achieving comparable or superior performance.
|
34 |
+
|
35 |
+
## Features
|
36 |
+
|
37 |
+
Key features of `mergekit` include:
|
38 |
+
|
39 |
+
- Supports Llama, Mistral, GPT-NeoX, StableLM, and more
|
40 |
+
- Many [merge methods](#merge-methods)
|
41 |
+
- GPU or CPU execution
|
42 |
+
- Lazy loading of tensors for low memory use
|
43 |
+
- Interpolated gradients for parameter values (inspired by Gryphe's [BlockMerge_Gradient](https://github.com/Gryphe/BlockMerge_Gradient) script)
|
44 |
+
- Piecewise assembly of language models from layers ("Frankenmerging")
|
45 |
+
- [Mixture of Experts merging](#mixture-of-experts-merging)
|
46 |
+
- [LORA extraction](#lora-extraction)
|
47 |
+
- [Evolutionary merge methods](#evolutionary-merge-methods)
|
48 |
+
|
49 |
+
🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](https://app.arcee.ai). There is also a [Hugging Face Space](https://huggingface.co/mergekit-community) with limited amounts of GPUs.
|
50 |
+
|
51 |
+
## Installation
|
52 |
+
|
53 |
+
```sh
|
54 |
+
git clone https://github.com/arcee-ai/mergekit.git
|
55 |
+
cd mergekit
|
56 |
+
|
57 |
+
pip install -e . # install the package and make scripts available
|
58 |
+
```
|
59 |
+
|
60 |
+
If the above fails with the error of:
|
61 |
+
|
62 |
+
```
|
63 |
+
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode:
|
64 |
+
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)
|
65 |
+
```
|
66 |
+
|
67 |
+
You may need to upgrade pip to > 21.3 with the command `python3 -m pip install --upgrade pip`
|
68 |
+
|
69 |
+
## Usage
|
70 |
+
|
71 |
+
The script `mergekit-yaml` is the main entry point for `mergekit`. It takes a YAML configuration file and an output path, like so:
|
72 |
+
|
73 |
+
```sh
|
74 |
+
mergekit-yaml path/to/your/config.yml ./output-model-directory [--cuda] [--lazy-unpickle] [--allow-crimes] [... other options]
|
75 |
+
```
|
76 |
+
|
77 |
+
This will run the merge and write your merged model to `./output-model-directory`.
|
78 |
+
|
79 |
+
For more information on the arguments accepted by `mergekit-yaml` run the command `mergekit-yaml --help`.
|
80 |
+
|
81 |
+
### Uploading to Huggingface
|
82 |
+
|
83 |
+
When you have a merged model you're happy with, you may want to share it on the Hugging Face Hub. `mergekit` generates a `README.md` for your merge with some basic information for a model card. You can edit it to include more details about your merge, like giving it a good name or explaining what it's good at; rewrite it entirely; or use the generated `README.md` as-is. It is also possible to edit your `README.md` online once it has been uploaded to the Hub.
|
84 |
+
|
85 |
+
Once you're happy with your model card and merged model, you can upload it to the Hugging Face Hub using the [huggingface_hub](https://huggingface.co/docs/huggingface_hub/index) Python library.
|
86 |
+
|
87 |
+
```sh
|
88 |
+
# log in to huggingface with an access token (must have write permission)
|
89 |
+
huggingface-cli login
|
90 |
+
# upload your model
|
91 |
+
huggingface-cli upload your_hf_username/my-cool-model ./output-model-directory .
|
92 |
+
```
|
93 |
+
|
94 |
+
The [documentation](https://huggingface.co/docs/huggingface_hub/guides/cli#huggingface-cli-upload) for `huggingface_hub` goes into more detail about other options for uploading.
|
95 |
+
|
96 |
+
## Merge Configuration
|
97 |
+
|
98 |
+
Merge configurations are YAML documents specifying the operations to perform in order to produce your merged model.
|
99 |
+
Below are the primary elements of a configuration file:
|
100 |
+
|
101 |
+
- `merge_method`: Specifies the method to use for merging models. See [Merge Methods](#merge-methods) for a list.
|
102 |
+
- `slices`: Defines slices of layers from different models to be used. This field is mutually exclusive with `models`.
|
103 |
+
- `models`: Defines entire models to be used for merging. This field is mutually exclusive with `slices`.
|
104 |
+
- `base_model`: Specifies the base model used in some merging methods.
|
105 |
+
- `parameters`: Holds various parameters such as weights and densities, which can also be specified at different levels of the configuration.
|
106 |
+
- `dtype`: Specifies the data type used for the merging operation.
|
107 |
+
- `tokenizer` or `tokenizer_source`: Determines how to construct a tokenizer for the merged model.
|
108 |
+
- `chat_template`: Specifies a chat template for the merged model.
|
109 |
+
|
110 |
+
### Parameter Specification
|
111 |
+
|
112 |
+
Parameters are flexible and can be set with varying precedence. They can be specified conditionally using tensor name filters, which allows finer control such as differentiating between attention heads and fully connected layers.
|
113 |
+
|
114 |
+
Parameters can be specified as:
|
115 |
+
|
116 |
+
- **Scalars**: Single floating-point values.
|
117 |
+
- **Gradients**: List of floating-point values, specifying an interpolated gradient.
|
118 |
+
|
119 |
+
The parameters can be set at different levels, with decreasing precedence as follows:
|
120 |
+
|
121 |
+
1. `slices.*.sources.parameters` - applying to a specific input slice
|
122 |
+
2. `slices.*.parameters` - applying to a specific output slice
|
123 |
+
3. `models.*.parameters` or `input_model_parameters` - applying to any tensors coming from specific input models
|
124 |
+
4. `parameters` - catchall
|
125 |
+
|
126 |
+
### Tokenizer Configuration
|
127 |
+
|
128 |
+
The tokenizer behavior can be configured in two ways: using the new `tokenizer` field (recommended) or the legacy `tokenizer_source` field (maintained for backward compatibility). These fields are mutually exclusive - you should use one or the other, not both.
|
129 |
+
|
130 |
+
#### Modern Configuration (tokenizer)
|
131 |
+
|
132 |
+
The `tokenizer` field provides fine-grained control over vocabulary and embeddings:
|
133 |
+
|
134 |
+
```yaml
|
135 |
+
tokenizer:
|
136 |
+
source: "union" # or "base" or a specific model path
|
137 |
+
tokens: # Optional: configure specific tokens
|
138 |
+
<token_name>:
|
139 |
+
source: ... # Specify embedding source
|
140 |
+
force: false # Optional: force this embedding for all models
|
141 |
+
pad_to_multiple_of: null # Optional: pad vocabulary size
|
142 |
+
```
|
143 |
+
|
144 |
+
##### Tokenizer Source
|
145 |
+
|
146 |
+
The `source` field determines the vocabulary of the output model:
|
147 |
+
|
148 |
+
- `union`: Combine vocabularies from all input models (default)
|
149 |
+
- `base`: Use vocabulary from the base model
|
150 |
+
- `"path/to/model"`: Use vocabulary from a specific model
|
151 |
+
|
152 |
+
##### Token Embedding Handling
|
153 |
+
|
154 |
+
When merging models with different vocabularies, mergekit uses smart defaults to handle token embeddings:
|
155 |
+
|
156 |
+
- If a token exists in the base model, its embedding is used as the default
|
157 |
+
- If only one model has the token, that model's embedding is used
|
158 |
+
- Otherwise, an average of all available embeddings is used
|
159 |
+
|
160 |
+
You can override these defaults for specific tokens:
|
161 |
+
|
162 |
+
```yaml
|
163 |
+
tokenizer:
|
164 |
+
source: union
|
165 |
+
tokens:
|
166 |
+
# Use embedding from a specific model
|
167 |
+
<|im_start|>:
|
168 |
+
source: "path/to/chatml/model"
|
169 |
+
|
170 |
+
# Force a specific embedding for all models
|
171 |
+
<|special|>:
|
172 |
+
source: "path/to/model"
|
173 |
+
force: true
|
174 |
+
|
175 |
+
# Map a token to another model's token embedding
|
176 |
+
<|renamed_token|>:
|
177 |
+
source:
|
178 |
+
kind: "model_token"
|
179 |
+
model: "path/to/model"
|
180 |
+
token: "<|original_token|>" # or use token_id: 1234
|
181 |
+
```
|
182 |
+
|
183 |
+
##### Practical Example
|
184 |
+
|
185 |
+
Here's how you might preserve both Llama 3 Instruct and ChatML prompt formats when merging models:
|
186 |
+
|
187 |
+
```yaml
|
188 |
+
tokenizer:
|
189 |
+
source: union
|
190 |
+
tokens:
|
191 |
+
# ChatML tokens
|
192 |
+
<|im_start|>:
|
193 |
+
source: "chatml_model"
|
194 |
+
<|im_end|>:
|
195 |
+
source: "chatml_model"
|
196 |
+
|
197 |
+
# Llama 3 tokens - force original embeddings
|
198 |
+
<|start_header_id|>:
|
199 |
+
source: "llama3_model"
|
200 |
+
force: true
|
201 |
+
<|end_header_id|>:
|
202 |
+
source: "llama3_model"
|
203 |
+
force: true
|
204 |
+
<|eot_id|>:
|
205 |
+
source: "llama3_model"
|
206 |
+
force: true
|
207 |
+
```
|
208 |
+
|
209 |
+
#### Legacy Configuration (tokenizer_source)
|
210 |
+
|
211 |
+
For backward compatibility, the `tokenizer_source` field is still supported:
|
212 |
+
|
213 |
+
```yaml
|
214 |
+
tokenizer_source: "union" # or "base" or a model path
|
215 |
+
```
|
216 |
+
|
217 |
+
This provides basic tokenizer selection but lacks the fine-grained control of the modern `tokenizer` field.
|
218 |
+
|
219 |
+
### Chat Template Configuration
|
220 |
+
|
221 |
+
The optional `chat_template` field allows overriding the chat template used for the merged model.
|
222 |
+
|
223 |
+
```yaml
|
224 |
+
chat_template: "auto" # or a template name or Jinja2 template
|
225 |
+
```
|
226 |
+
|
227 |
+
Options include:
|
228 |
+
|
229 |
+
- `"auto"`: Automatically select the most common template among input models
|
230 |
+
- Built-in templates: `"alpaca"`, `"chatml"`, `"llama3"`, `"mistral"`, `"exaone"`
|
231 |
+
- A Jinja2 template string for custom formatting
|
232 |
+
|
233 |
+
### Examples
|
234 |
+
|
235 |
+
Several examples of merge configurations are available in [`examples/`](examples/).
|
236 |
+
|
237 |
+
## Merge Methods
|
238 |
+
|
239 |
+
A quick overview of the currently supported merge methods:
|
240 |
+
|
241 |
+
| Method | `merge_method` value | Multi-Model | Uses base model |
|
242 |
+
| ------------------------------------------------------------------------------------------------ | -------------------- | ----------- | --------------- |
|
243 |
+
| Linear ([Model Soups](https://arxiv.org/abs/2203.05482)) | `linear` | ✅ | ❌ |
|
244 |
+
| SLERP | `slerp` | ❌ | ✅ |
|
245 |
+
| Nearswap | `nearswap` | ❌ | ✅ |
|
246 |
+
| [Task Arithmetic](https://arxiv.org/abs/2212.04089) | `task_arithmetic` | ✅ | ✅ |
|
247 |
+
| [TIES](https://arxiv.org/abs/2306.01708) | `ties` | ✅ | ✅ |
|
248 |
+
| [DARE](https://arxiv.org/abs/2311.03099) [TIES](https://arxiv.org/abs/2306.01708) | `dare_ties` | ✅ | ✅ |
|
249 |
+
| [DARE](https://arxiv.org/abs/2311.03099) [Task Arithmetic](https://arxiv.org/abs/2212.04089) | `dare_linear` | ✅ | ✅ |
|
250 |
+
| Passthrough | `passthrough` | ❌ | ❌ |
|
251 |
+
| [Model Breadcrumbs](https://arxiv.org/abs/2312.06795) | `breadcrumbs` | ✅ | ✅ |
|
252 |
+
| [Model Breadcrumbs](https://arxiv.org/abs/2312.06795) + [TIES](https://arxiv.org/abs/2306.01708) | `breadcrumbs_ties` | ✅ | ✅ |
|
253 |
+
| [Model Stock](https://arxiv.org/abs/2403.19522) | `model_stock` | ✅ | ✅ |
|
254 |
+
| NuSLERP | `nuslerp` | ❌ | ✅ |
|
255 |
+
| [DELLA](https://arxiv.org/abs/2406.11617) | `della` | ✅ | ✅ |
|
256 |
+
| [DELLA](https://arxiv.org/abs/2406.11617) [Task Arithmetic](https://arxiv.org/abs/2212.04089) | `della_linear` | ✅ | ✅ |
|
257 |
+
|
258 |
+
### Linear
|
259 |
+
|
260 |
+
The classic merge method - a simple weighted average.
|
261 |
+
|
262 |
+
Parameters:
|
263 |
+
|
264 |
+
- `weight` - relative (or absolute if `normalize=False`) weighting of a given tensor
|
265 |
+
- `normalize` - if true, the weights of all models contributing to a tensor will be normalized. Default behavior.
|
266 |
+
|
267 |
+
### SLERP
|
268 |
+
|
269 |
+
Spherically interpolate the parameters of two models. One must be set as `base_model`.
|
270 |
+
|
271 |
+
Parameters:
|
272 |
+
|
273 |
+
- `t` - interpolation factor. At `t=0` will return `base_model`, at `t=1` will return the other one.
|
274 |
+
|
275 |
+
### Nearswap
|
276 |
+
|
277 |
+
Interpolates base model with secondary model if similarity is below t. Accepts two models.
|
278 |
+
|
279 |
+
Parameters:
|
280 |
+
|
281 |
+
- `t` - similarity threshold
|
282 |
+
|
283 |
+
### [Task Arithmetic](https://arxiv.org/abs/2212.04089)
|
284 |
+
|
285 |
+
Computes "task vectors" for each model by subtracting a base model. Merges the task vectors linearly and adds back the base. Works great for models that were fine tuned from a common ancestor. Also a super useful mental framework for several of the more involved merge methods.
|
286 |
+
|
287 |
+
Parameters: same as [Linear](#linear)
|
288 |
+
|
289 |
+
### [TIES](https://arxiv.org/abs/2306.01708)
|
290 |
+
|
291 |
+
Builds on the task arithmetic framework. Resolves interference between models by sparsifying the task vectors and applying a sign consensus algorithm. Allows you to merge a larger number of models and retain more of their strengths.
|
292 |
+
|
293 |
+
Parameters: same as [Linear](#linear), plus:
|
294 |
+
|
295 |
+
- `density` - fraction of weights in differences from the base model to retain
|
296 |
+
|
297 |
+
### [DARE](https://arxiv.org/abs/2311.03099)
|
298 |
+
|
299 |
+
In the same vein as TIES, sparsifies task vectors to reduce interference. Differs in that DARE uses random pruning with a novel rescaling to better match performance of the original models. DARE can be used either with the sign consensus algorithm of TIES (`dare_ties`) or without (`dare_linear`).
|
300 |
+
|
301 |
+
Parameters: same as [TIES](#ties) for `dare_ties`, or [Linear](#linear) for `dare_linear`
|
302 |
+
|
303 |
+
### Passthrough
|
304 |
+
|
305 |
+
`passthrough` is a no-op that simply passes input tensors through unmodified. It is meant to be used for layer-stacking type merges where you have only one input model. Useful for frankenmerging.
|
306 |
+
|
307 |
+
### [Model Breadcrumbs](https://arxiv.org/abs/2312.06795)
|
308 |
+
|
309 |
+
An extension of task arithmetic that discards both small and extremely large differences from the base model. As with DARE, the Model Breadcrumbs algorithm can be used with (`breadcrumbs_ties`) or without (`breadcrumbs`) the sign consensus algorithm of TIES.
|
310 |
+
|
311 |
+
Parameters: same as [Linear](#linear), plus:
|
312 |
+
|
313 |
+
- `density` - fraction of weights in differences from the base model to retain
|
314 |
+
- `gamma` - fraction of largest magnitude differences to remove
|
315 |
+
|
316 |
+
Note that `gamma` corresponds with the parameter `β` described in the paper, while `density` is the final density of the sparsified tensors (related to `γ` and `β` by `density = 1 - γ - β`). For good default values, try `density: 0.9` and `gamma: 0.01`.
|
317 |
+
|
318 |
+
### [Model Stock](https://arxiv.org/abs/2403.19522)
|
319 |
+
|
320 |
+
Uses some neat geometric properties of fine tuned models to compute good weights for linear interpolation. Requires at least three models, including a base model.
|
321 |
+
|
322 |
+
Parameters:
|
323 |
+
|
324 |
+
- `filter_wise`: if true, weight calculation will be per-row rather than per-tensor. Not recommended.
|
325 |
+
|
326 |
+
### NuSLERP
|
327 |
+
|
328 |
+
Spherically interpolate between parameters, but with more options and more sensical configuration! Does not require a base model, but can use one to do spherical interpolation of task vectors. Only works with either two models or two plus a base model.
|
329 |
+
|
330 |
+
Parameters:
|
331 |
+
|
332 |
+
- `weight`: relative weighting of a given tensor
|
333 |
+
- `nuslerp_flatten`: set to false to do row-wise/column-wise interpolation instead of treating tensors as vectors
|
334 |
+
- `nuslerp_row_wise`: SLERP row vectors instead of column vectors
|
335 |
+
|
336 |
+
To replicate the behavior of the original `slerp` method, set `weight` to `1-t` and `t` for your first and second model respectively.
|
337 |
+
|
338 |
+
### [DELLA](https://arxiv.org/abs/2406.11617)
|
339 |
+
|
340 |
+
Building upon DARE, DELLA uses adaptive pruning based on parameter magnitudes. DELLA first ranks parameters in each row of delta parameters and assigns drop probabilities inversely proportional to their magnitudes. This allows it to retain more important changes while reducing interference. After pruning, it rescales the remaining parameters similar to [DARE](#dare). DELLA can be used with (`della`) or without (`della_linear`) the sign elect step of TIES
|
341 |
+
|
342 |
+
Parameters: same as [Linear](#linear), plus:
|
343 |
+
|
344 |
+
- `density` - fraction of weights in differences from the base model to retain
|
345 |
+
- `epsilon` - maximum change in drop probability based on magnitude. Drop probabilities assigned will range from `density - epsilon` to `density + epsilon`. (When selecting values for `density` and `epsilon`, ensure that the range of probabilities falls within 0 to 1)
|
346 |
+
- `lambda` - scaling factor for the final merged delta parameters before merging with the base parameters.
|
347 |
+
|
348 |
+
## LoRA extraction
|
349 |
+
|
350 |
+
Mergekit allows extracting PEFT-compatible low-rank approximations of finetuned models.
|
351 |
+
|
352 |
+
### Usage
|
353 |
+
|
354 |
+
```sh
|
355 |
+
mergekit-extract-lora finetuned_model_id_or_path base_model_id_or_path output_path [--no-lazy-unpickle] --rank=desired_rank
|
356 |
+
```
|
357 |
+
|
358 |
+
## Mixture of Experts merging
|
359 |
+
|
360 |
+
The `mergekit-moe` script supports merging multiple dense models into a mixture of experts, either for direct use or for further training. For more details see the [`mergekit-moe` documentation](docs/moe.md).
|
361 |
+
|
362 |
+
## Evolutionary merge methods
|
363 |
+
|
364 |
+
See [`docs/evolve.md`](docs/evolve.md) for details.
|
365 |
+
|
366 |
+
## ✨ Merge in the Cloud ✨
|
367 |
+
|
368 |
+
We host merging on Arcee's cloud GPUs - you can launch a cloud merge in the [Arcee App](https://app.arcee.ai). Or through python - grab an ARCEE_API_KEY:
|
369 |
+
|
370 |
+
`export ARCEE_API_KEY=<your-api-key>`
|
371 |
+
`pip install -q arcee-py`
|
372 |
+
|
373 |
+
```python
|
374 |
+
import arcee
|
375 |
+
arcee.merge_yaml("bio-merge","./examples/bio-merge.yml")
|
376 |
+
```
|
377 |
+
|
378 |
+
Check your merge status at the [Arcee App](https://app.arcee.ai)
|
379 |
+
|
380 |
+
When complete, either deploy your merge:
|
381 |
+
|
382 |
+
```python
|
383 |
+
arcee.start_deployment("bio-merge", merging="bio-merge")
|
384 |
+
```
|
385 |
+
|
386 |
+
Or download your merge:
|
387 |
+
|
388 |
+
`!arcee merging download bio-merge`
|
389 |
+
|
390 |
+
## Citation
|
391 |
+
|
392 |
+
If you find `mergekit` useful in your research, please consider citing the [paper](https://aclanthology.org/2024.emnlp-industry.36/):
|
393 |
+
|
394 |
+
```bibtex
|
395 |
+
@inproceedings{goddard-etal-2024-arcees,
|
396 |
+
title = "Arcee{'}s {M}erge{K}it: A Toolkit for Merging Large Language Models",
|
397 |
+
author = "Goddard, Charles and
|
398 |
+
Siriwardhana, Shamane and
|
399 |
+
Ehghaghi, Malikeh and
|
400 |
+
Meyers, Luke and
|
401 |
+
Karpukhin, Vladimir and
|
402 |
+
Benedict, Brian and
|
403 |
+
McQuade, Mark and
|
404 |
+
Solawetz, Jacob",
|
405 |
+
editor = "Dernoncourt, Franck and
|
406 |
+
Preo{\c{t}}iuc-Pietro, Daniel and
|
407 |
+
Shimorina, Anastasia",
|
408 |
+
booktitle = "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track",
|
409 |
+
month = nov,
|
410 |
+
year = "2024",
|
411 |
+
address = "Miami, Florida, US",
|
412 |
+
publisher = "Association for Computational Linguistics",
|
413 |
+
url = "https://aclanthology.org/2024.emnlp-industry.36",
|
414 |
+
doi = "10.18653/v1/2024.emnlp-industry.36",
|
415 |
+
pages = "477--485",
|
416 |
+
abstract = "The rapid growth of open-source language models provides the opportunity to merge model checkpoints, combining their parameters to improve performance and versatility. Advances in transfer learning have led to numerous task-specific models, which model merging can integrate into powerful multitask models without additional training. MergeKit is an open-source library designed to support this process with an efficient and extensible framework suitable for any hardware. It has facilitated the merging of thousands of models, contributing to some of the world{'}s most powerful open-source model checkpoints. The library is accessible at: https://github.com/arcee-ai/mergekit.",
|
417 |
+
}
|
418 |
+
```
|
mergekit/docs/evolve.md
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# mergekit-evolve
|
2 |
+
|
3 |
+
`mergekit-evolve` is a script that uses an evolutionary algorithm (CMA-ES) to optimize the parameters of a merge against model metrics. This is inspired by SakanaAI's [Evolutionary Optimization of Model Merging Recipes](https://arxiv.org/abs/2403.13187), in particular their parameter-space approach. `mergekit-evolve` uses EleutherAI's [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to define and evaluate the scoring function. The script is set up to be run either single-node or on a Ray cluster and has a few different strategies for scheduling operations depending on your particular configuration of compute.
|
4 |
+
|
5 |
+
## Installation
|
6 |
+
|
7 |
+
Install `mergekit` with the `evolve` (and optionally `vllm`) features:
|
8 |
+
|
9 |
+
```sh
|
10 |
+
git clone https://github.com/arcee-ai/mergekit.git
|
11 |
+
cd mergekit
|
12 |
+
|
13 |
+
pip install -e .[evolve,vllm]
|
14 |
+
```
|
15 |
+
|
16 |
+
If you had a perfectly good pytorch environment going and installing an older version of vLLM downgraded it and broke flash attention, run the following commands to fix it:
|
17 |
+
|
18 |
+
```sh
|
19 |
+
pip uninstall flash-attn
|
20 |
+
pip cache purge
|
21 |
+
pip install flash-attn
|
22 |
+
```
|
23 |
+
|
24 |
+
## Configuration
|
25 |
+
|
26 |
+
`mergekit-evolve` takes in a YAML configuration file that defines how the merge is parameterized and what metrics to optimize. The general syntax is as follows:
|
27 |
+
|
28 |
+
```yml
|
29 |
+
genome:
|
30 |
+
models:
|
31 |
+
- model_1
|
32 |
+
- model_2
|
33 |
+
...
|
34 |
+
- model_n
|
35 |
+
merge_method: dare_ties
|
36 |
+
base_model: base_model_if_needed
|
37 |
+
tokenizer_source: null # optional
|
38 |
+
layer_granularity: 8
|
39 |
+
|
40 |
+
# optional:
|
41 |
+
normalize: false
|
42 |
+
allow_negative_weights: false
|
43 |
+
smooth: false
|
44 |
+
filters: ...
|
45 |
+
tasks:
|
46 |
+
- name: lm_eval_task_name
|
47 |
+
weight: 1.0 # optional
|
48 |
+
metric: "acc,none" # defaults to acc,none
|
49 |
+
- name: ... # as many as you want
|
50 |
+
```
|
51 |
+
|
52 |
+
### Genome Definition
|
53 |
+
|
54 |
+
The `genome` section of the configuration file defines the parameter space that `mergekit-evolve` will be optimizing in.
|
55 |
+
|
56 |
+
#### `models`
|
57 |
+
|
58 |
+
This should be a list of all of the models you want available to be merged. Depending on the merge method not all are guaranteed to be used in the final merge.
|
59 |
+
|
60 |
+
#### `merge_method`
|
61 |
+
|
62 |
+
Merge method to be used. Currently supported values are `linear`, `dare_ties`, `task_arithmetic`, `ties`, and `slerp`.
|
63 |
+
|
64 |
+
#### `base_model`
|
65 |
+
|
66 |
+
The base model for the merge, if applicable.
|
67 |
+
|
68 |
+
#### `layer_granularity`
|
69 |
+
|
70 |
+
A set of parameters will be introduced for each consecutive slice of `layer_granularity` layers. So for example, a 32-layer model like `mistralai/Mistral-7B-v0.1` with `layer_granularity: 8` will be divided into 4 groups of 8 layers with different merge parameters for each. The value specified here must be a divisor of the number of layers in your input models. Large values of `layer_granularity` will reduce the search space greatly, meaning you will get faster convergence at the cost of a potentially less good global solution.
|
71 |
+
|
72 |
+
When not set, one set of parameters will be used for all layers.
|
73 |
+
|
74 |
+
#### `normalize`
|
75 |
+
|
76 |
+
Sets the `normalize` flag when merging. For methods like `linear`, `ties`, and `dare_ties` this constrains the search space to a set of definitely valid models. Similarly to `layer_granularity`, this can greatly speed up convergence at the cost of ruling out oddball solutions that might score better than more standard merges.
|
77 |
+
|
78 |
+
#### `allow_negative_weights`
|
79 |
+
|
80 |
+
Pretty self explanatory. When this flag is not set, the absolute value of weight parameters is used. Sensible search space reduction for `linear` and `slerp`. For task arithmetic based methods you probably want `allow_negative_weights: true`.
|
81 |
+
|
82 |
+
#### `smooth`
|
83 |
+
|
84 |
+
If set to `true`, then parameter values will be interpolated across layers instead of assigning a single, fixed value to each block.
|
85 |
+
|
86 |
+
#### `filters`
|
87 |
+
|
88 |
+
Accepts a list of filters, as in `mergekit-yaml`, by which to separate the parameters. So, for example, setting filters as below for a Llama-based merge:
|
89 |
+
|
90 |
+
```yaml
|
91 |
+
filters:
|
92 |
+
- self_attn
|
93 |
+
- mlp
|
94 |
+
```
|
95 |
+
|
96 |
+
Will divide up the merge parameters into three groups - self attention parameters, MLP parameters, and a third for everything else. Separating the parameters out like this can be very beneficial when merging models trained on different prompt formats. It also makes your parameter space three times as big though!
|
97 |
+
|
98 |
+
### Task Definition
|
99 |
+
|
100 |
+
To evaluate the produced merges you need to specify a list of tasks supported by the EleutherAI LM evaluation harness. This can be either [built in tasks](https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks) (don't be naughty) or tasks you define yourself (see the [New Task Guide](https://github.com/EleutherAI/lm-evaluation-harness/blob/main/docs/new_task_guide.md) for how). If your task does not use `acc` as the metric then you must specify the correct metric name. Each task can also optionally have a weight associated.
|
101 |
+
|
102 |
+
`mergekit-evolve` aims to maximize the score of the merge, so if you are using any tasks or metrics where a lower score is better (like perplexity) be sure to assign a negative weight to that task.
|
103 |
+
|
104 |
+
## Running `mergekit-evolve`
|
105 |
+
|
106 |
+
```sh
|
107 |
+
mergekit-evolve [OPTIONS] --storage-path PATH GENOME_CONFIG_PATH
|
108 |
+
```
|
109 |
+
|
110 |
+
`mergekit-evolve` needs a storage path specified, where it will save the input models, merges to evaluate, and the config for the current best merge evaluated. If you are not using in-memory merging this can require a _lot_ of space - expect at least one fp16 model per GPU.
|
111 |
+
|
112 |
+
Some important options:
|
113 |
+
|
114 |
+
### Scheduling Strategy (`--strategy`)
|
115 |
+
|
116 |
+
There are three different strategies implemented for scheduling merging and evaluation jobs.
|
117 |
+
|
118 |
+
#### `pool`
|
119 |
+
|
120 |
+
Assigns an actor to each GPU in your cluster and guarantees merges and evaluations are performed on the same node. This is a safe default suitable for any configuration, local or distributed.
|
121 |
+
|
122 |
+
#### `buffered`
|
123 |
+
|
124 |
+
Maintains a buffer of tasks scheduled to ensure that there is always a model merging or ready to evaluate for each GPU. Allows for concurrent merging and evaluation of models on the same GPU if enough VRAM is available. Only suitable for a single-node setup or when `--storage-path` points to a fast shared filesystem.
|
125 |
+
|
126 |
+
#### `serial`
|
127 |
+
|
128 |
+
Uses Ray placement groups to ensure merges and their evaluations happen on the same node, but otherwise just lets Ray take the wheel. Maybe give a try if you're having trouble with the other two, otherwise probably don't use it.
|
129 |
+
|
130 |
+
### Evaluation LLM Backend
|
131 |
+
|
132 |
+
By default `mergekit-evolve` will use the `hf` backend for `lm-eval`. To use vLLM instead, pass the `--vllm` flag.
|
133 |
+
|
134 |
+
### On-Disk vs. In-Memory
|
135 |
+
|
136 |
+
By default `mergekit-evolve` will perform merges, write the result to disk, then start up an instance of lm-eval pointing at that path. This is a safe default and will generally always work but also causes a lot of GPU downtime and eats disk space. When using the `pool` scheduling strategy, you have the option to instead keep a model resident in memory and directly update its parameters instead of merging to disk. This is much faster and uses no additional disk space. However, it does involve mucking around in the internals of vLLM and the LM evaluation harness. So it might break at any moment! Choose wisely. Use `--in-memory` to enable this mode.
|
137 |
+
|
138 |
+
### Task search path
|
139 |
+
|
140 |
+
If you're using custom task definitions (and you should be) then you can append to the search path using the `--task-search-path` option. This should point to the directory your custom task YAML is in (or a parent of that directory). Multiple paths can be included by repeating the option.
|
141 |
+
|
142 |
+
### Batch size
|
143 |
+
|
144 |
+
Override the batch size used during merge evaluation. If using vLLM `auto` is recommended (default).
|
145 |
+
|
146 |
+
### CMA-ES options
|
147 |
+
|
148 |
+
#### `--max-fevals`
|
149 |
+
|
150 |
+
Maximum number of merges to evaluate. Note that the `cma` package is very loosey-goosey with this number and will happily go over by 50% depending on the size of each generation. Set to 100 by default.
|
151 |
+
|
152 |
+
#### `--sigma0`
|
153 |
+
|
154 |
+
Initial value of sigma for CMA-ES. No need to play with this unless you really know what you're doing.
|
155 |
+
|
156 |
+
### WandB logging
|
157 |
+
|
158 |
+
`mergekit-evolve` supports logging metrics to Weights & Biases. Enable this functionality with the `--wandb` flag. Project and entity names can be overridden with the `--wandb-project` and `--wandb-entity` options.
|
159 |
+
|
160 |
+
### Example
|
161 |
+
|
162 |
+
```sh
|
163 |
+
mergekit-evolve --strategy pool --wandb --wandb-project mergekit-evolve --wandb-entity arcee-ai --storage-path /path/to/mergekit-evolve/ ./config.yml
|
164 |
+
```
|
165 |
+
|
166 |
+
## Output
|
167 |
+
|
168 |
+
`mergekit-evolve` will write the merge configuration for the best merge found so far to the storage path with the filename `best_config.yaml`. If you're using WandB it will also log the config as an artifact. The script will keep running until a KeyboardInterrupt is received or `--max-fevals` is generously exceeded.
|
169 |
+
|
170 |
+
## Caveats
|
171 |
+
|
172 |
+
`mergekit-evolve` is a work in progress and has probably not been tested on your specific configuration. Keep an eye on the output before leaving it running, and if you run in to any issues don't hesitate to file an issue!
|
173 |
+
|
174 |
+
## Acknowledgements
|
175 |
+
|
176 |
+
Thanks to SakanaAI for the inspiration and the EleutherAI team for the LM evaluation harness.
|
mergekit/docs/moe.md
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# mergekit-moe
|
2 |
+
|
3 |
+
`mergekit-moe` is a script for combining Mistral or Llama models of the same size into Mixtral Mixture of Experts models. The script will combine the self-attention and layer normalization parameters from a "base" model with the MLP parameters from a set of "expert" models.
|
4 |
+
|
5 |
+
If using the `hidden` or `cheap_embed` gate mode, the output model will be usable without any further training. If you are initializing a model to do further training on, such as for sparse upcycling, then use the `random` gate mode to get a model ready for training.
|
6 |
+
|
7 |
+
## Configuration
|
8 |
+
|
9 |
+
`mergekit-moe` uses its own YML configuration syntax, which looks like so:
|
10 |
+
|
11 |
+
```yml
|
12 |
+
base_model: path/to/self_attn_donor
|
13 |
+
gate_mode: hidden # one of "hidden", "cheap_embed", or "random"
|
14 |
+
dtype: bfloat16 # output dtype (float32, float16, or bfloat16)
|
15 |
+
## (optional)
|
16 |
+
# experts_per_token: 2
|
17 |
+
experts:
|
18 |
+
- source_model: expert_model_1
|
19 |
+
positive_prompts:
|
20 |
+
- "This is a prompt that is demonstrative of what expert_model_1 excels at"
|
21 |
+
## (optional)
|
22 |
+
# negative_prompts:
|
23 |
+
# - "This is a prompt expert_model_1 should not be used for"
|
24 |
+
- source_model: expert_model_2
|
25 |
+
# ... and so on
|
26 |
+
```
|
27 |
+
|
28 |
+
The script takes two arguments, an input config and an output path: `mergekit-moe ./config.yml ./my-clowncar-moe-12x180B`
|
29 |
+
|
30 |
+
Currently the script can output models that use the Mixtral, Deepseek MoE, or Qwen MoE architectures. Some output architectures support a shared expert which will be activated for all tokens, which can be configured like this:
|
31 |
+
|
32 |
+
```yml
|
33 |
+
base_model: path/to/self_attn_donor
|
34 |
+
gate_mode: hidden # one of "hidden", "cheap_embed", or "random"
|
35 |
+
dtype: bfloat16 # output dtype (float32, float16, or bfloat16)
|
36 |
+
experts:
|
37 |
+
...
|
38 |
+
shared_experts:
|
39 |
+
- source_model: model_name
|
40 |
+
positive_prompts: # required by Qwen MoE for "hidden" gate mode, otherwise not allowed
|
41 |
+
- "blah blah"
|
42 |
+
# (optional, but recommended:)
|
43 |
+
residual_scale: 0.1 # downweight output from shared expert to prevent overcooking the model
|
44 |
+
```
|
45 |
+
|
46 |
+
Currently only up to one shared expert is supported.
|
47 |
+
|
48 |
+
An appropriate architecture will be inferred based on the input models and presence or absence of shared experts in your configuration. Alternatively, you can explicitly specify an output architecture by setting the `architecture:` field in your config. For example:
|
49 |
+
|
50 |
+
```yml
|
51 |
+
base_model: path/to/self_attn_donor
|
52 |
+
architecture: qwen
|
53 |
+
# ... and so on
|
54 |
+
```
|
55 |
+
|
56 |
+
### Gate Modes
|
57 |
+
|
58 |
+
There are three methods for populating the MoE gates implemented.
|
59 |
+
|
60 |
+
#### "hidden"
|
61 |
+
|
62 |
+
Uses the hidden state representations of the positive/negative prompts for MoE gate parameters. Best quality and most effective option; the default. Requires evaluating each prompt using the base model so you might not be able to use this on constrained hardware (depending on the model). You can use `--load-in-8bit` or `--load-in-4bit` to reduce VRAM usage.
|
63 |
+
|
64 |
+
#### "cheap_embed"
|
65 |
+
|
66 |
+
Uses only the raw token embedding of the prompts, using the same gate parameters for every layer. Distinctly less effective than "hidden". Can be run on much, much lower end hardware.
|
67 |
+
|
68 |
+
#### "random"
|
69 |
+
|
70 |
+
Randomly initializes the MoE gates. Good for if you are going to fine tune the model afterwards, or maybe if you want something a little unhinged? I won't judge.
|
71 |
+
|
72 |
+
## Example Configurations
|
73 |
+
|
74 |
+
Sparse upcycling of smol_llama into a 8x220M MoE:
|
75 |
+
|
76 |
+
```yml
|
77 |
+
base_model: BEE-spoke-data/smol_llama-220M-GQA
|
78 |
+
gate_mode: random
|
79 |
+
dtype: bfloat16
|
80 |
+
experts:
|
81 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
82 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
83 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
84 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
85 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
86 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
87 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
88 |
+
- source_model: BEE-spoke-data/smol_llama-220M-GQA
|
89 |
+
# and then train the sucker!
|
90 |
+
```
|
91 |
+
|
92 |
+
Shove some Mistral models in a clown car:
|
93 |
+
|
94 |
+
```yml
|
95 |
+
base_model: NousResearch/Hermes-2-Pro-Mistral-7B
|
96 |
+
gate_mode: hidden
|
97 |
+
dtype: bfloat16
|
98 |
+
experts:
|
99 |
+
- source_model: NousResearch/Hermes-2-Pro-Mistral-7B
|
100 |
+
positive_prompts:
|
101 |
+
- "<|im_start|>user\nHello, who are you?<|im_end|>"
|
102 |
+
- "<|im_start|>user\nI need help with"
|
103 |
+
- source_model: BioMistral/BioMistral-7B-DARE
|
104 |
+
positive_prompts:
|
105 |
+
- "As a doctor of medicine,"
|
106 |
+
- source_model: PocketDoc/Dans-AdventurousWinds-7b
|
107 |
+
positive_prompts:
|
108 |
+
- "[Genres: Science Fiction]\n[Tags: humor, old school, sci fi]"
|
109 |
+
- "> get ye flask"
|
110 |
+
- "[Mode: Interactive Storyteller]"
|
111 |
+
- source_model: VAGOsolutions/SauerkrautLM-7b-HerO
|
112 |
+
positive_prompts:
|
113 |
+
- "<|im_start|>user\nWie geht es dir?<|im_end|>"
|
114 |
+
- "Das ist ein Satz auf Deutsch."
|
115 |
+
```
|
116 |
+
|
117 |
+
## FAQ
|
118 |
+
|
119 |
+
### What does the "Your model has duplicated tensors but the --clone-tensors flag is not set" warning mean?
|
120 |
+
|
121 |
+
Answer from [Charles O. Goddard (cg123)](https://github.com/cg123)
|
122 |
+
(also see [this GitHub issue](https://github.com/arcee-ai/mergekit/issues/279#issuecomment-2081818104)):
|
123 |
+
|
124 |
+
> This is completely benign. This happens when a single tensor from a model is used in multiple places, like when doing sparse upcycling with the moe script or doing passthrough merges that repeat layers. Having `--clone-tensors` set can use slightly more memory, but having it unset will slow down saving and introduce small memory usage spikes in cases where this warning occurs. It's honestly a small enough difference that the warning could be removed entirely.
|
mergekit/examples/bio-merge.yml
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
models:
|
2 |
+
- model: mistralai/Mistral-7B-Instruct-v0.2
|
3 |
+
parameters:
|
4 |
+
density: 0.5
|
5 |
+
weight: 0.5
|
6 |
+
- model: BioMistral/BioMistral-7B
|
7 |
+
parameters:
|
8 |
+
density: 0.5
|
9 |
+
weight: 0.5
|
10 |
+
merge_method: ties
|
11 |
+
base_model: mistralai/Mistral-7B-v0.1
|
12 |
+
parameters:
|
13 |
+
normalize: false
|
14 |
+
int8_mask: true
|
15 |
+
dtype: float16
|
mergekit/examples/gradient-slerp.yml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
slices:
|
2 |
+
- sources:
|
3 |
+
- model: psmathur/orca_mini_v3_13b
|
4 |
+
layer_range: [0, 40]
|
5 |
+
- model: garage-bAInd/Platypus2-13B
|
6 |
+
layer_range: [0, 40]
|
7 |
+
# or, the equivalent models: syntax:
|
8 |
+
# models:
|
9 |
+
# - model: psmathur/orca_mini_v3_13b
|
10 |
+
# - model: garage-bAInd/Platypus2-13B
|
11 |
+
merge_method: slerp
|
12 |
+
base_model: psmathur/orca_mini_v3_13b
|
13 |
+
parameters:
|
14 |
+
t:
|
15 |
+
- filter: self_attn
|
16 |
+
value: [0, 0.5, 0.3, 0.7, 1]
|
17 |
+
- filter: mlp
|
18 |
+
value: [1, 0.5, 0.7, 0.3, 0]
|
19 |
+
- value: 0.5 # fallback for rest of tensors
|
20 |
+
dtype: float16
|
mergekit/examples/linear.yml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
models:
|
2 |
+
- model: psmathur/orca_mini_v3_13b
|
3 |
+
parameters:
|
4 |
+
weight: 1.0
|
5 |
+
- model: WizardLM/WizardLM-13B-V1.2
|
6 |
+
parameters:
|
7 |
+
weight: 0.3
|
8 |
+
- model: garage-bAInd/Platypus2-13B
|
9 |
+
parameters:
|
10 |
+
weight: 0.5
|
11 |
+
merge_method: linear
|
12 |
+
dtype: float16
|
mergekit/examples/mega.yml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
slices:
|
2 |
+
- sources:
|
3 |
+
- model: psmathur/orca_mini_v3_13b
|
4 |
+
layer_range: [0, 40]
|
5 |
+
- model: garage-bAInd/Platypus2-13B
|
6 |
+
layer_range: [0, 40]
|
7 |
+
merge_method: slerp
|
8 |
+
base_model: psmathur/orca_mini_v3_13b
|
9 |
+
parameters:
|
10 |
+
t:
|
11 |
+
- filter: self_attn
|
12 |
+
value: [0, 0.5, 0.3, 0.7, 1]
|
13 |
+
- filter: mlp
|
14 |
+
value: [1, 0.5, 0.7, 0.3, 0]
|
15 |
+
- value: 0.5 # fallback for rest of tensors
|
16 |
+
dtype: float16
|
17 |
+
name: gradient-slerp
|
18 |
+
---
|
19 |
+
models:
|
20 |
+
- model: gradient-slerp
|
21 |
+
parameters:
|
22 |
+
density: [1, 0.7, 0.1] # density gradient
|
23 |
+
weight: 1.0
|
24 |
+
- model: WizardLM/WizardMath-13B-V1.0
|
25 |
+
parameters:
|
26 |
+
density: 0.33
|
27 |
+
weight:
|
28 |
+
- filter: mlp
|
29 |
+
value: 0.5
|
30 |
+
- value: 0
|
31 |
+
merge_method: ties
|
32 |
+
base_model: TheBloke/Llama-2-13B-fp16
|
33 |
+
parameters:
|
34 |
+
normalize: true
|
35 |
+
int8_mask: true
|
36 |
+
dtype: float16
|
37 |
+
name: gradient-slerp-ties
|
mergekit/examples/orcamini-platy-44layer.yml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
slices:
|
2 |
+
- sources:
|
3 |
+
- model: psmathur/orca_mini_v3_13b
|
4 |
+
layer_range: [0, 24]
|
5 |
+
- sources:
|
6 |
+
- model: garage-bAInd/Platypus2-13B
|
7 |
+
layer_range: [20, 40]
|
8 |
+
merge_method: passthrough
|
9 |
+
dtype: float16
|
mergekit/examples/ties.yml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
models:
|
2 |
+
- model: psmathur/orca_mini_v3_13b
|
3 |
+
parameters:
|
4 |
+
density: [1, 0.7, 0.1] # density gradient
|
5 |
+
weight: 1.0
|
6 |
+
- model: garage-bAInd/Platypus2-13B
|
7 |
+
parameters:
|
8 |
+
density: 0.5
|
9 |
+
weight: [0, 0.3, 0.7, 1] # weight gradient
|
10 |
+
- model: WizardLM/WizardMath-13B-V1.0
|
11 |
+
parameters:
|
12 |
+
density: 0.33
|
13 |
+
weight:
|
14 |
+
- filter: mlp
|
15 |
+
value: 0.5
|
16 |
+
- value: 0
|
17 |
+
merge_method: ties
|
18 |
+
base_model: TheBloke/Llama-2-13B-fp16
|
19 |
+
parameters:
|
20 |
+
normalize: true
|
21 |
+
int8_mask: true
|
22 |
+
dtype: float16
|
mergekit/mergekit.egg-info/PKG-INFO
ADDED
@@ -0,0 +1,458 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: mergekit
|
3 |
+
Version: 0.0.5.2
|
4 |
+
Summary: Tools for merging pre-trained large language models
|
5 |
+
Author-email: Charles Goddard <chargoddard@gmail.com>
|
6 |
+
License: LGPL-3.0-or-later
|
7 |
+
Project-URL: repository, https://github.com/cg123/mergekit
|
8 |
+
Description-Content-Type: text/markdown
|
9 |
+
License-File: LICENSE
|
10 |
+
Requires-Dist: torch>=2.0.0
|
11 |
+
Requires-Dist: tqdm==4.66.5
|
12 |
+
Requires-Dist: click==8.1.7
|
13 |
+
Requires-Dist: safetensors~=0.4.3
|
14 |
+
Requires-Dist: accelerate~=1.0.1
|
15 |
+
Requires-Dist: pydantic~=2.9.2
|
16 |
+
Requires-Dist: immutables==0.20
|
17 |
+
Requires-Dist: transformers>=4.45.2
|
18 |
+
Requires-Dist: tokenizers>=0.20.1
|
19 |
+
Requires-Dist: huggingface_hub
|
20 |
+
Requires-Dist: peft
|
21 |
+
Requires-Dist: typing-extensions
|
22 |
+
Requires-Dist: sentencepiece
|
23 |
+
Requires-Dist: protobuf
|
24 |
+
Requires-Dist: scipy
|
25 |
+
Requires-Dist: datasets
|
26 |
+
Provides-Extra: dev
|
27 |
+
Requires-Dist: black~=24.10.0; extra == "dev"
|
28 |
+
Requires-Dist: isort~=5.13.2; extra == "dev"
|
29 |
+
Requires-Dist: pre-commit~=4.0.1; extra == "dev"
|
30 |
+
Provides-Extra: test
|
31 |
+
Requires-Dist: pytest~=8.3.3; extra == "test"
|
32 |
+
Provides-Extra: evolve
|
33 |
+
Requires-Dist: ray; extra == "evolve"
|
34 |
+
Requires-Dist: cma; extra == "evolve"
|
35 |
+
Requires-Dist: lm_eval; extra == "evolve"
|
36 |
+
Requires-Dist: wandb; extra == "evolve"
|
37 |
+
Provides-Extra: vllm
|
38 |
+
Requires-Dist: vllm==0.3.2; extra == "vllm"
|
39 |
+
Requires-Dist: lm_eval[vllm]; extra == "vllm"
|
40 |
+
|
41 |
+
# mergekit
|
42 |
+
|
43 |
+
`mergekit` is a toolkit for merging pre-trained language models. `mergekit` uses an out-of-core approach to perform unreasonably elaborate merges in resource-constrained situations. Merges can be run entirely on CPU or accelerated with as little as 8 GB of VRAM. Many merging algorithms are supported, with more coming as they catch my attention.
|
44 |
+
|
45 |
+
## Contents
|
46 |
+
|
47 |
+
- [Why Merge Models?](#why-merge-models)
|
48 |
+
- [Features](#features)
|
49 |
+
- [Installation](#installation)
|
50 |
+
- [Usage](#usage)
|
51 |
+
- [Merge Configuration](#merge-configuration)
|
52 |
+
- [Parameter Specification](#parameter-specification)
|
53 |
+
- [Tokenizer Configuration](#tokenizer-configuration)
|
54 |
+
- [Chat Template Configuration](#chat-template-configuration)
|
55 |
+
- [Examples](#examples)
|
56 |
+
- [Merge Methods](#merge-methods)
|
57 |
+
- [LoRA extraction](#lora-extraction)
|
58 |
+
- [Mixture of Experts merging](#mixture-of-experts-merging)
|
59 |
+
- [Evolutionary merge methods](#evolutionary-merge-methods)
|
60 |
+
- [Merge in the Cloud](#-merge-in-the-cloud-)
|
61 |
+
- [Citation](#citation)
|
62 |
+
|
63 |
+
## Why Merge Models?
|
64 |
+
|
65 |
+
Model merging is a powerful technique that allows combining the strengths of different models without the computational overhead of ensembling or the need for additional training. By operating directly in the weight space of models, merging can:
|
66 |
+
|
67 |
+
- Combine multiple specialized models into a single versatile model
|
68 |
+
- Transfer capabilities between models without access to training data
|
69 |
+
- Find optimal trade-offs between different model behaviors
|
70 |
+
- Improve performance while maintaining inference costs
|
71 |
+
- Create new capabilities through creative model combinations
|
72 |
+
|
73 |
+
Unlike traditional ensembling which requires running multiple models, merged models maintain the same inference cost as a single model while often achieving comparable or superior performance.
|
74 |
+
|
75 |
+
## Features
|
76 |
+
|
77 |
+
Key features of `mergekit` include:
|
78 |
+
|
79 |
+
- Supports Llama, Mistral, GPT-NeoX, StableLM, and more
|
80 |
+
- Many [merge methods](#merge-methods)
|
81 |
+
- GPU or CPU execution
|
82 |
+
- Lazy loading of tensors for low memory use
|
83 |
+
- Interpolated gradients for parameter values (inspired by Gryphe's [BlockMerge_Gradient](https://github.com/Gryphe/BlockMerge_Gradient) script)
|
84 |
+
- Piecewise assembly of language models from layers ("Frankenmerging")
|
85 |
+
- [Mixture of Experts merging](#mixture-of-experts-merging)
|
86 |
+
- [LORA extraction](#lora-extraction)
|
87 |
+
- [Evolutionary merge methods](#evolutionary-merge-methods)
|
88 |
+
|
89 |
+
🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](https://app.arcee.ai). There is also a [Hugging Face Space](https://huggingface.co/mergekit-community) with limited amounts of GPUs.
|
90 |
+
|
91 |
+
## Installation
|
92 |
+
|
93 |
+
```sh
|
94 |
+
git clone https://github.com/arcee-ai/mergekit.git
|
95 |
+
cd mergekit
|
96 |
+
|
97 |
+
pip install -e . # install the package and make scripts available
|
98 |
+
```
|
99 |
+
|
100 |
+
If the above fails with the error of:
|
101 |
+
|
102 |
+
```
|
103 |
+
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode:
|
104 |
+
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)
|
105 |
+
```
|
106 |
+
|
107 |
+
You may need to upgrade pip to > 21.3 with the command `python3 -m pip install --upgrade pip`
|
108 |
+
|
109 |
+
## Usage
|
110 |
+
|
111 |
+
The script `mergekit-yaml` is the main entry point for `mergekit`. It takes a YAML configuration file and an output path, like so:
|
112 |
+
|
113 |
+
```sh
|
114 |
+
mergekit-yaml path/to/your/config.yml ./output-model-directory [--cuda] [--lazy-unpickle] [--allow-crimes] [... other options]
|
115 |
+
```
|
116 |
+
|
117 |
+
This will run the merge and write your merged model to `./output-model-directory`.
|
118 |
+
|
119 |
+
For more information on the arguments accepted by `mergekit-yaml` run the command `mergekit-yaml --help`.
|
120 |
+
|
121 |
+
### Uploading to Huggingface
|
122 |
+
|
123 |
+
When you have a merged model you're happy with, you may want to share it on the Hugging Face Hub. `mergekit` generates a `README.md` for your merge with some basic information for a model card. You can edit it to include more details about your merge, like giving it a good name or explaining what it's good at; rewrite it entirely; or use the generated `README.md` as-is. It is also possible to edit your `README.md` online once it has been uploaded to the Hub.
|
124 |
+
|
125 |
+
Once you're happy with your model card and merged model, you can upload it to the Hugging Face Hub using the [huggingface_hub](https://huggingface.co/docs/huggingface_hub/index) Python library.
|
126 |
+
|
127 |
+
```sh
|
128 |
+
# log in to huggingface with an access token (must have write permission)
|
129 |
+
huggingface-cli login
|
130 |
+
# upload your model
|
131 |
+
huggingface-cli upload your_hf_username/my-cool-model ./output-model-directory .
|
132 |
+
```
|
133 |
+
|
134 |
+
The [documentation](https://huggingface.co/docs/huggingface_hub/guides/cli#huggingface-cli-upload) for `huggingface_hub` goes into more detail about other options for uploading.
|
135 |
+
|
136 |
+
## Merge Configuration
|
137 |
+
|
138 |
+
Merge configurations are YAML documents specifying the operations to perform in order to produce your merged model.
|
139 |
+
Below are the primary elements of a configuration file:
|
140 |
+
|
141 |
+
- `merge_method`: Specifies the method to use for merging models. See [Merge Methods](#merge-methods) for a list.
|
142 |
+
- `slices`: Defines slices of layers from different models to be used. This field is mutually exclusive with `models`.
|
143 |
+
- `models`: Defines entire models to be used for merging. This field is mutually exclusive with `slices`.
|
144 |
+
- `base_model`: Specifies the base model used in some merging methods.
|
145 |
+
- `parameters`: Holds various parameters such as weights and densities, which can also be specified at different levels of the configuration.
|
146 |
+
- `dtype`: Specifies the data type used for the merging operation.
|
147 |
+
- `tokenizer` or `tokenizer_source`: Determines how to construct a tokenizer for the merged model.
|
148 |
+
- `chat_template`: Specifies a chat template for the merged model.
|
149 |
+
|
150 |
+
### Parameter Specification
|
151 |
+
|
152 |
+
Parameters are flexible and can be set with varying precedence. They can be specified conditionally using tensor name filters, which allows finer control such as differentiating between attention heads and fully connected layers.
|
153 |
+
|
154 |
+
Parameters can be specified as:
|
155 |
+
|
156 |
+
- **Scalars**: Single floating-point values.
|
157 |
+
- **Gradients**: List of floating-point values, specifying an interpolated gradient.
|
158 |
+
|
159 |
+
The parameters can be set at different levels, with decreasing precedence as follows:
|
160 |
+
|
161 |
+
1. `slices.*.sources.parameters` - applying to a specific input slice
|
162 |
+
2. `slices.*.parameters` - applying to a specific output slice
|
163 |
+
3. `models.*.parameters` or `input_model_parameters` - applying to any tensors coming from specific input models
|
164 |
+
4. `parameters` - catchall
|
165 |
+
|
166 |
+
### Tokenizer Configuration
|
167 |
+
|
168 |
+
The tokenizer behavior can be configured in two ways: using the new `tokenizer` field (recommended) or the legacy `tokenizer_source` field (maintained for backward compatibility). These fields are mutually exclusive - you should use one or the other, not both.
|
169 |
+
|
170 |
+
#### Modern Configuration (tokenizer)
|
171 |
+
|
172 |
+
The `tokenizer` field provides fine-grained control over vocabulary and embeddings:
|
173 |
+
|
174 |
+
```yaml
|
175 |
+
tokenizer:
|
176 |
+
source: "union" # or "base" or a specific model path
|
177 |
+
tokens: # Optional: configure specific tokens
|
178 |
+
<token_name>:
|
179 |
+
source: ... # Specify embedding source
|
180 |
+
force: false # Optional: force this embedding for all models
|
181 |
+
pad_to_multiple_of: null # Optional: pad vocabulary size
|
182 |
+
```
|
183 |
+
|
184 |
+
##### Tokenizer Source
|
185 |
+
|
186 |
+
The `source` field determines the vocabulary of the output model:
|
187 |
+
|
188 |
+
- `union`: Combine vocabularies from all input models (default)
|
189 |
+
- `base`: Use vocabulary from the base model
|
190 |
+
- `"path/to/model"`: Use vocabulary from a specific model
|
191 |
+
|
192 |
+
##### Token Embedding Handling
|
193 |
+
|
194 |
+
When merging models with different vocabularies, mergekit uses smart defaults to handle token embeddings:
|
195 |
+
|
196 |
+
- If a token exists in the base model, its embedding is used as the default
|
197 |
+
- If only one model has the token, that model's embedding is used
|
198 |
+
- Otherwise, an average of all available embeddings is used
|
199 |
+
|
200 |
+
You can override these defaults for specific tokens:
|
201 |
+
|
202 |
+
```yaml
|
203 |
+
tokenizer:
|
204 |
+
source: union
|
205 |
+
tokens:
|
206 |
+
# Use embedding from a specific model
|
207 |
+
<|im_start|>:
|
208 |
+
source: "path/to/chatml/model"
|
209 |
+
|
210 |
+
# Force a specific embedding for all models
|
211 |
+
<|special|>:
|
212 |
+
source: "path/to/model"
|
213 |
+
force: true
|
214 |
+
|
215 |
+
# Map a token to another model's token embedding
|
216 |
+
<|renamed_token|>:
|
217 |
+
source:
|
218 |
+
kind: "model_token"
|
219 |
+
model: "path/to/model"
|
220 |
+
token: "<|original_token|>" # or use token_id: 1234
|
221 |
+
```
|
222 |
+
|
223 |
+
##### Practical Example
|
224 |
+
|
225 |
+
Here's how you might preserve both Llama 3 Instruct and ChatML prompt formats when merging models:
|
226 |
+
|
227 |
+
```yaml
|
228 |
+
tokenizer:
|
229 |
+
source: union
|
230 |
+
tokens:
|
231 |
+
# ChatML tokens
|
232 |
+
<|im_start|>:
|
233 |
+
source: "chatml_model"
|
234 |
+
<|im_end|>:
|
235 |
+
source: "chatml_model"
|
236 |
+
|
237 |
+
# Llama 3 tokens - force original embeddings
|
238 |
+
<|start_header_id|>:
|
239 |
+
source: "llama3_model"
|
240 |
+
force: true
|
241 |
+
<|end_header_id|>:
|
242 |
+
source: "llama3_model"
|
243 |
+
force: true
|
244 |
+
<|eot_id|>:
|
245 |
+
source: "llama3_model"
|
246 |
+
force: true
|
247 |
+
```
|
248 |
+
|
249 |
+
#### Legacy Configuration (tokenizer_source)
|
250 |
+
|
251 |
+
For backward compatibility, the `tokenizer_source` field is still supported:
|
252 |
+
|
253 |
+
```yaml
|
254 |
+
tokenizer_source: "union" # or "base" or a model path
|
255 |
+
```
|
256 |
+
|
257 |
+
This provides basic tokenizer selection but lacks the fine-grained control of the modern `tokenizer` field.
|
258 |
+
|
259 |
+
### Chat Template Configuration
|
260 |
+
|
261 |
+
The optional `chat_template` field allows overriding the chat template used for the merged model.
|
262 |
+
|
263 |
+
```yaml
|
264 |
+
chat_template: "auto" # or a template name or Jinja2 template
|
265 |
+
```
|
266 |
+
|
267 |
+
Options include:
|
268 |
+
|
269 |
+
- `"auto"`: Automatically select the most common template among input models
|
270 |
+
- Built-in templates: `"alpaca"`, `"chatml"`, `"llama3"`, `"mistral"`, `"exaone"`
|
271 |
+
- A Jinja2 template string for custom formatting
|
272 |
+
|
273 |
+
### Examples
|
274 |
+
|
275 |
+
Several examples of merge configurations are available in [`examples/`](examples/).
|
276 |
+
|
277 |
+
## Merge Methods
|
278 |
+
|
279 |
+
A quick overview of the currently supported merge methods:
|
280 |
+
|
281 |
+
| Method | `merge_method` value | Multi-Model | Uses base model |
|
282 |
+
| ------------------------------------------------------------------------------------------------ | -------------------- | ----------- | --------------- |
|
283 |
+
| Linear ([Model Soups](https://arxiv.org/abs/2203.05482)) | `linear` | ✅ | ❌ |
|
284 |
+
| SLERP | `slerp` | ❌ | ✅ |
|
285 |
+
| Nearswap | `nearswap` | ❌ | ✅ |
|
286 |
+
| [Task Arithmetic](https://arxiv.org/abs/2212.04089) | `task_arithmetic` | ✅ | ✅ |
|
287 |
+
| [TIES](https://arxiv.org/abs/2306.01708) | `ties` | ✅ | ✅ |
|
288 |
+
| [DARE](https://arxiv.org/abs/2311.03099) [TIES](https://arxiv.org/abs/2306.01708) | `dare_ties` | ✅ | ✅ |
|
289 |
+
| [DARE](https://arxiv.org/abs/2311.03099) [Task Arithmetic](https://arxiv.org/abs/2212.04089) | `dare_linear` | ✅ | ✅ |
|
290 |
+
| Passthrough | `passthrough` | ❌ | ❌ |
|
291 |
+
| [Model Breadcrumbs](https://arxiv.org/abs/2312.06795) | `breadcrumbs` | ✅ | ✅ |
|
292 |
+
| [Model Breadcrumbs](https://arxiv.org/abs/2312.06795) + [TIES](https://arxiv.org/abs/2306.01708) | `breadcrumbs_ties` | ✅ | ✅ |
|
293 |
+
| [Model Stock](https://arxiv.org/abs/2403.19522) | `model_stock` | ✅ | ✅ |
|
294 |
+
| NuSLERP | `nuslerp` | ❌ | ✅ |
|
295 |
+
| [DELLA](https://arxiv.org/abs/2406.11617) | `della` | ✅ | ✅ |
|
296 |
+
| [DELLA](https://arxiv.org/abs/2406.11617) [Task Arithmetic](https://arxiv.org/abs/2212.04089) | `della_linear` | ✅ | ✅ |
|
297 |
+
|
298 |
+
### Linear
|
299 |
+
|
300 |
+
The classic merge method - a simple weighted average.
|
301 |
+
|
302 |
+
Parameters:
|
303 |
+
|
304 |
+
- `weight` - relative (or absolute if `normalize=False`) weighting of a given tensor
|
305 |
+
- `normalize` - if true, the weights of all models contributing to a tensor will be normalized. Default behavior.
|
306 |
+
|
307 |
+
### SLERP
|
308 |
+
|
309 |
+
Spherically interpolate the parameters of two models. One must be set as `base_model`.
|
310 |
+
|
311 |
+
Parameters:
|
312 |
+
|
313 |
+
- `t` - interpolation factor. At `t=0` will return `base_model`, at `t=1` will return the other one.
|
314 |
+
|
315 |
+
### Nearswap
|
316 |
+
|
317 |
+
Interpolates base model with secondary model if similarity is below t. Accepts two models.
|
318 |
+
|
319 |
+
Parameters:
|
320 |
+
|
321 |
+
- `t` - similarity threshold
|
322 |
+
|
323 |
+
### [Task Arithmetic](https://arxiv.org/abs/2212.04089)
|
324 |
+
|
325 |
+
Computes "task vectors" for each model by subtracting a base model. Merges the task vectors linearly and adds back the base. Works great for models that were fine tuned from a common ancestor. Also a super useful mental framework for several of the more involved merge methods.
|
326 |
+
|
327 |
+
Parameters: same as [Linear](#linear)
|
328 |
+
|
329 |
+
### [TIES](https://arxiv.org/abs/2306.01708)
|
330 |
+
|
331 |
+
Builds on the task arithmetic framework. Resolves interference between models by sparsifying the task vectors and applying a sign consensus algorithm. Allows you to merge a larger number of models and retain more of their strengths.
|
332 |
+
|
333 |
+
Parameters: same as [Linear](#linear), plus:
|
334 |
+
|
335 |
+
- `density` - fraction of weights in differences from the base model to retain
|
336 |
+
|
337 |
+
### [DARE](https://arxiv.org/abs/2311.03099)
|
338 |
+
|
339 |
+
In the same vein as TIES, sparsifies task vectors to reduce interference. Differs in that DARE uses random pruning with a novel rescaling to better match performance of the original models. DARE can be used either with the sign consensus algorithm of TIES (`dare_ties`) or without (`dare_linear`).
|
340 |
+
|
341 |
+
Parameters: same as [TIES](#ties) for `dare_ties`, or [Linear](#linear) for `dare_linear`
|
342 |
+
|
343 |
+
### Passthrough
|
344 |
+
|
345 |
+
`passthrough` is a no-op that simply passes input tensors through unmodified. It is meant to be used for layer-stacking type merges where you have only one input model. Useful for frankenmerging.
|
346 |
+
|
347 |
+
### [Model Breadcrumbs](https://arxiv.org/abs/2312.06795)
|
348 |
+
|
349 |
+
An extension of task arithmetic that discards both small and extremely large differences from the base model. As with DARE, the Model Breadcrumbs algorithm can be used with (`breadcrumbs_ties`) or without (`breadcrumbs`) the sign consensus algorithm of TIES.
|
350 |
+
|
351 |
+
Parameters: same as [Linear](#linear), plus:
|
352 |
+
|
353 |
+
- `density` - fraction of weights in differences from the base model to retain
|
354 |
+
- `gamma` - fraction of largest magnitude differences to remove
|
355 |
+
|
356 |
+
Note that `gamma` corresponds with the parameter `β` described in the paper, while `density` is the final density of the sparsified tensors (related to `γ` and `β` by `density = 1 - γ - β`). For good default values, try `density: 0.9` and `gamma: 0.01`.
|
357 |
+
|
358 |
+
### [Model Stock](https://arxiv.org/abs/2403.19522)
|
359 |
+
|
360 |
+
Uses some neat geometric properties of fine tuned models to compute good weights for linear interpolation. Requires at least three models, including a base model.
|
361 |
+
|
362 |
+
Parameters:
|
363 |
+
|
364 |
+
- `filter_wise`: if true, weight calculation will be per-row rather than per-tensor. Not recommended.
|
365 |
+
|
366 |
+
### NuSLERP
|
367 |
+
|
368 |
+
Spherically interpolate between parameters, but with more options and more sensical configuration! Does not require a base model, but can use one to do spherical interpolation of task vectors. Only works with either two models or two plus a base model.
|
369 |
+
|
370 |
+
Parameters:
|
371 |
+
|
372 |
+
- `weight`: relative weighting of a given tensor
|
373 |
+
- `nuslerp_flatten`: set to false to do row-wise/column-wise interpolation instead of treating tensors as vectors
|
374 |
+
- `nuslerp_row_wise`: SLERP row vectors instead of column vectors
|
375 |
+
|
376 |
+
To replicate the behavior of the original `slerp` method, set `weight` to `1-t` and `t` for your first and second model respectively.
|
377 |
+
|
378 |
+
### [DELLA](https://arxiv.org/abs/2406.11617)
|
379 |
+
|
380 |
+
Building upon DARE, DELLA uses adaptive pruning based on parameter magnitudes. DELLA first ranks parameters in each row of delta parameters and assigns drop probabilities inversely proportional to their magnitudes. This allows it to retain more important changes while reducing interference. After pruning, it rescales the remaining parameters similar to [DARE](#dare). DELLA can be used with (`della`) or without (`della_linear`) the sign elect step of TIES
|
381 |
+
|
382 |
+
Parameters: same as [Linear](#linear), plus:
|
383 |
+
|
384 |
+
- `density` - fraction of weights in differences from the base model to retain
|
385 |
+
- `epsilon` - maximum change in drop probability based on magnitude. Drop probabilities assigned will range from `density - epsilon` to `density + epsilon`. (When selecting values for `density` and `epsilon`, ensure that the range of probabilities falls within 0 to 1)
|
386 |
+
- `lambda` - scaling factor for the final merged delta parameters before merging with the base parameters.
|
387 |
+
|
388 |
+
## LoRA extraction
|
389 |
+
|
390 |
+
Mergekit allows extracting PEFT-compatible low-rank approximations of finetuned models.
|
391 |
+
|
392 |
+
### Usage
|
393 |
+
|
394 |
+
```sh
|
395 |
+
mergekit-extract-lora finetuned_model_id_or_path base_model_id_or_path output_path [--no-lazy-unpickle] --rank=desired_rank
|
396 |
+
```
|
397 |
+
|
398 |
+
## Mixture of Experts merging
|
399 |
+
|
400 |
+
The `mergekit-moe` script supports merging multiple dense models into a mixture of experts, either for direct use or for further training. For more details see the [`mergekit-moe` documentation](docs/moe.md).
|
401 |
+
|
402 |
+
## Evolutionary merge methods
|
403 |
+
|
404 |
+
See [`docs/evolve.md`](docs/evolve.md) for details.
|
405 |
+
|
406 |
+
## ✨ Merge in the Cloud ✨
|
407 |
+
|
408 |
+
We host merging on Arcee's cloud GPUs - you can launch a cloud merge in the [Arcee App](https://app.arcee.ai). Or through python - grab an ARCEE_API_KEY:
|
409 |
+
|
410 |
+
`export ARCEE_API_KEY=<your-api-key>`
|
411 |
+
`pip install -q arcee-py`
|
412 |
+
|
413 |
+
```python
|
414 |
+
import arcee
|
415 |
+
arcee.merge_yaml("bio-merge","./examples/bio-merge.yml")
|
416 |
+
```
|
417 |
+
|
418 |
+
Check your merge status at the [Arcee App](https://app.arcee.ai)
|
419 |
+
|
420 |
+
When complete, either deploy your merge:
|
421 |
+
|
422 |
+
```python
|
423 |
+
arcee.start_deployment("bio-merge", merging="bio-merge")
|
424 |
+
```
|
425 |
+
|
426 |
+
Or download your merge:
|
427 |
+
|
428 |
+
`!arcee merging download bio-merge`
|
429 |
+
|
430 |
+
## Citation
|
431 |
+
|
432 |
+
If you find `mergekit` useful in your research, please consider citing the [paper](https://aclanthology.org/2024.emnlp-industry.36/):
|
433 |
+
|
434 |
+
```bibtex
|
435 |
+
@inproceedings{goddard-etal-2024-arcees,
|
436 |
+
title = "Arcee{'}s {M}erge{K}it: A Toolkit for Merging Large Language Models",
|
437 |
+
author = "Goddard, Charles and
|
438 |
+
Siriwardhana, Shamane and
|
439 |
+
Ehghaghi, Malikeh and
|
440 |
+
Meyers, Luke and
|
441 |
+
Karpukhin, Vladimir and
|
442 |
+
Benedict, Brian and
|
443 |
+
McQuade, Mark and
|
444 |
+
Solawetz, Jacob",
|
445 |
+
editor = "Dernoncourt, Franck and
|
446 |
+
Preo{\c{t}}iuc-Pietro, Daniel and
|
447 |
+
Shimorina, Anastasia",
|
448 |
+
booktitle = "Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track",
|
449 |
+
month = nov,
|
450 |
+
year = "2024",
|
451 |
+
address = "Miami, Florida, US",
|
452 |
+
publisher = "Association for Computational Linguistics",
|
453 |
+
url = "https://aclanthology.org/2024.emnlp-industry.36",
|
454 |
+
doi = "10.18653/v1/2024.emnlp-industry.36",
|
455 |
+
pages = "477--485",
|
456 |
+
abstract = "The rapid growth of open-source language models provides the opportunity to merge model checkpoints, combining their parameters to improve performance and versatility. Advances in transfer learning have led to numerous task-specific models, which model merging can integrate into powerful multitask models without additional training. MergeKit is an open-source library designed to support this process with an efficient and extensible framework suitable for any hardware. It has facilitated the merging of thousands of models, contributing to some of the world{'}s most powerful open-source model checkpoints. The library is accessible at: https://github.com/arcee-ai/mergekit.",
|
457 |
+
}
|
458 |
+
```
|
mergekit/mergekit.egg-info/SOURCES.txt
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
LICENSE
|
2 |
+
README.md
|
3 |
+
pyproject.toml
|
4 |
+
mergekit/__init__.py
|
5 |
+
mergekit/architecture.py
|
6 |
+
mergekit/card.py
|
7 |
+
mergekit/common.py
|
8 |
+
mergekit/config.py
|
9 |
+
mergekit/graph.py
|
10 |
+
mergekit/merge.py
|
11 |
+
mergekit/options.py
|
12 |
+
mergekit/plan.py
|
13 |
+
mergekit/sparsify.py
|
14 |
+
mergekit.egg-info/PKG-INFO
|
15 |
+
mergekit.egg-info/SOURCES.txt
|
16 |
+
mergekit.egg-info/dependency_links.txt
|
17 |
+
mergekit.egg-info/entry_points.txt
|
18 |
+
mergekit.egg-info/requires.txt
|
19 |
+
mergekit.egg-info/top_level.txt
|
20 |
+
mergekit/_data/__init__.py
|
21 |
+
mergekit/_data/architectures/__init__.py
|
22 |
+
mergekit/_data/architectures/baichuan.json
|
23 |
+
mergekit/_data/architectures/bert-masked-lm.json
|
24 |
+
mergekit/_data/architectures/bert-sequence-classification.json
|
25 |
+
mergekit/_data/architectures/bert.json
|
26 |
+
mergekit/_data/architectures/chatglm.json
|
27 |
+
mergekit/_data/architectures/cohere.json
|
28 |
+
mergekit/_data/architectures/distilbert-masked-lm.json
|
29 |
+
mergekit/_data/architectures/distilbert-sequence-classification.json
|
30 |
+
mergekit/_data/architectures/distilbert-token-classification.json
|
31 |
+
mergekit/_data/architectures/distilbert.json
|
32 |
+
mergekit/_data/architectures/exaone.json
|
33 |
+
mergekit/_data/architectures/falcon.json
|
34 |
+
mergekit/_data/architectures/gemma.json
|
35 |
+
mergekit/_data/architectures/gemma2.json
|
36 |
+
mergekit/_data/architectures/gpt-neox.json
|
37 |
+
mergekit/_data/architectures/gpt2-sequence-classification.json
|
38 |
+
mergekit/_data/architectures/gpt2.json
|
39 |
+
mergekit/_data/architectures/gptbigcode.json
|
40 |
+
mergekit/_data/architectures/internlm2.json
|
41 |
+
mergekit/_data/architectures/jais.json
|
42 |
+
mergekit/_data/architectures/llama.json
|
43 |
+
mergekit/_data/architectures/mamba.json
|
44 |
+
mergekit/_data/architectures/mistral.json
|
45 |
+
mergekit/_data/architectures/phi-1.json
|
46 |
+
mergekit/_data/architectures/phi2-old.json
|
47 |
+
mergekit/_data/architectures/phi2.json
|
48 |
+
mergekit/_data/architectures/phi3-small.json
|
49 |
+
mergekit/_data/architectures/phi3.json
|
50 |
+
mergekit/_data/architectures/qwen.json
|
51 |
+
mergekit/_data/architectures/qwen2.json
|
52 |
+
mergekit/_data/architectures/roberta-masked-lm.json
|
53 |
+
mergekit/_data/architectures/roberta-sequence-classification.json
|
54 |
+
mergekit/_data/architectures/roberta-token-classification.json
|
55 |
+
mergekit/_data/architectures/roberta.json
|
56 |
+
mergekit/_data/architectures/solar.json
|
57 |
+
mergekit/_data/architectures/stablelm.json
|
58 |
+
mergekit/_data/architectures/stablelm2.json
|
59 |
+
mergekit/_data/architectures/starcoder2.json
|
60 |
+
mergekit/_data/chat_templates/__init__.py
|
61 |
+
mergekit/_data/chat_templates/alpaca.jinja
|
62 |
+
mergekit/_data/chat_templates/chatml.jinja
|
63 |
+
mergekit/_data/chat_templates/exaone.jinja
|
64 |
+
mergekit/_data/chat_templates/llama3.jinja
|
65 |
+
mergekit/_data/chat_templates/mistral.jinja
|
66 |
+
mergekit/evo/__init__.py
|
67 |
+
mergekit/evo/actors.py
|
68 |
+
mergekit/evo/config.py
|
69 |
+
mergekit/evo/genome.py
|
70 |
+
mergekit/evo/helpers.py
|
71 |
+
mergekit/evo/monkeypatch.py
|
72 |
+
mergekit/evo/strategy.py
|
73 |
+
mergekit/io/__init__.py
|
74 |
+
mergekit/io/lazy_tensor_loader.py
|
75 |
+
mergekit/io/lazy_unpickle.py
|
76 |
+
mergekit/io/loader.py
|
77 |
+
mergekit/io/tasks.py
|
78 |
+
mergekit/io/tensor_writer.py
|
79 |
+
mergekit/merge_methods/__init__.py
|
80 |
+
mergekit/merge_methods/base.py
|
81 |
+
mergekit/merge_methods/generalized_task_arithmetic.py
|
82 |
+
mergekit/merge_methods/linear.py
|
83 |
+
mergekit/merge_methods/model_stock.py
|
84 |
+
mergekit/merge_methods/nearswap.py
|
85 |
+
mergekit/merge_methods/nuslerp.py
|
86 |
+
mergekit/merge_methods/passthrough.py
|
87 |
+
mergekit/merge_methods/rectify_embed.py
|
88 |
+
mergekit/merge_methods/slerp.py
|
89 |
+
mergekit/merge_methods/tokenizer_permute.py
|
90 |
+
mergekit/moe/__init__.py
|
91 |
+
mergekit/moe/arch.py
|
92 |
+
mergekit/moe/common.py
|
93 |
+
mergekit/moe/config.py
|
94 |
+
mergekit/moe/deepseek.py
|
95 |
+
mergekit/moe/mixtral.py
|
96 |
+
mergekit/moe/qwen.py
|
97 |
+
mergekit/moe/router.py
|
98 |
+
mergekit/scripts/__init__.py
|
99 |
+
mergekit/scripts/bakllama.py
|
100 |
+
mergekit/scripts/evolve.py
|
101 |
+
mergekit/scripts/extract_lora.py
|
102 |
+
mergekit/scripts/layershuffle.py
|
103 |
+
mergekit/scripts/legacy.py
|
104 |
+
mergekit/scripts/megamerge.py
|
105 |
+
mergekit/scripts/moe.py
|
106 |
+
mergekit/scripts/run_yaml.py
|
107 |
+
mergekit/scripts/tokensurgeon.py
|
108 |
+
mergekit/tokenizer/__init__.py
|
109 |
+
mergekit/tokenizer/build.py
|
110 |
+
mergekit/tokenizer/config.py
|
111 |
+
mergekit/tokenizer/embed.py
|
112 |
+
tests/test_basic_merges.py
|
113 |
+
tests/test_chat_template.py
|
114 |
+
tests/test_graph.py
|
115 |
+
tests/test_io.py
|
116 |
+
tests/test_lazy_unpickle.py
|
117 |
+
tests/test_modelref.py
|
118 |
+
tests/test_sparsify.py
|
119 |
+
tests/test_tokenizer.py
|
mergekit/mergekit.egg-info/dependency_links.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
|
mergekit/mergekit.egg-info/entry_points.txt
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[console_scripts]
|
2 |
+
bakllama = mergekit.scripts.bakllama:main
|
3 |
+
mergekit-evolve = mergekit.scripts.evolve:main
|
4 |
+
mergekit-extract-lora = mergekit.scripts.extract_lora:main
|
5 |
+
mergekit-layershuffle = mergekit.scripts.layershuffle:main
|
6 |
+
mergekit-legacy = mergekit.scripts.legacy:main
|
7 |
+
mergekit-mega = mergekit.scripts.megamerge:main
|
8 |
+
mergekit-moe = mergekit.scripts.moe:main
|
9 |
+
mergekit-tokensurgeon = mergekit.scripts.tokensurgeon:main
|
10 |
+
mergekit-yaml = mergekit.scripts.run_yaml:main
|
mergekit/mergekit.egg-info/requires.txt
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch>=2.0.0
|
2 |
+
tqdm==4.66.5
|
3 |
+
click==8.1.7
|
4 |
+
safetensors~=0.4.3
|
5 |
+
accelerate~=1.0.1
|
6 |
+
pydantic~=2.9.2
|
7 |
+
immutables==0.20
|
8 |
+
transformers>=4.45.2
|
9 |
+
tokenizers>=0.20.1
|
10 |
+
huggingface_hub
|
11 |
+
peft
|
12 |
+
typing-extensions
|
13 |
+
sentencepiece
|
14 |
+
protobuf
|
15 |
+
scipy
|
16 |
+
datasets
|
17 |
+
|
18 |
+
[dev]
|
19 |
+
black~=24.10.0
|
20 |
+
isort~=5.13.2
|
21 |
+
pre-commit~=4.0.1
|
22 |
+
|
23 |
+
[evolve]
|
24 |
+
ray
|
25 |
+
cma
|
26 |
+
lm_eval
|
27 |
+
wandb
|
28 |
+
|
29 |
+
[test]
|
30 |
+
pytest~=8.3.3
|
31 |
+
|
32 |
+
[vllm]
|
33 |
+
vllm==0.3.2
|
34 |
+
lm_eval[vllm]
|
mergekit/mergekit.egg-info/top_level.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
mergekit
|
mergekit/mergekit/__init__.py
ADDED
File without changes
|
mergekit/mergekit/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (138 Bytes). View file
|
|
mergekit/mergekit/__pycache__/architecture.cpython-310.pyc
ADDED
Binary file (14.1 kB). View file
|
|
mergekit/mergekit/__pycache__/card.cpython-310.pyc
ADDED
Binary file (5.69 kB). View file
|
|
mergekit/mergekit/__pycache__/common.cpython-310.pyc
ADDED
Binary file (8.7 kB). View file
|
|
mergekit/mergekit/__pycache__/config.cpython-310.pyc
ADDED
Binary file (7.03 kB). View file
|
|
mergekit/mergekit/__pycache__/graph.cpython-310.pyc
ADDED
Binary file (8 kB). View file
|
|
mergekit/mergekit/__pycache__/merge.cpython-310.pyc
ADDED
Binary file (6.58 kB). View file
|
|
mergekit/mergekit/__pycache__/options.cpython-310.pyc
ADDED
Binary file (3.44 kB). View file
|
|
mergekit/mergekit/__pycache__/plan.cpython-310.pyc
ADDED
Binary file (8.53 kB). View file
|
|
mergekit/mergekit/__pycache__/sparsify.cpython-310.pyc
ADDED
Binary file (4.46 kB). View file
|
|
mergekit/mergekit/_data/__init__.py
ADDED
File without changes
|
mergekit/mergekit/_data/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (144 Bytes). View file
|
|
mergekit/mergekit/_data/architectures/__init__.py
ADDED
File without changes
|
mergekit/mergekit/_data/architectures/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (158 Bytes). View file
|
|
mergekit/mergekit/_data/architectures/baichuan.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "baichuan",
|
3 |
+
"architectures": [
|
4 |
+
"BaichuanForCausalLM"
|
5 |
+
],
|
6 |
+
"pre_weights": [
|
7 |
+
{
|
8 |
+
"name": "model.embed_tokens.weight",
|
9 |
+
"is_embed": true
|
10 |
+
}
|
11 |
+
],
|
12 |
+
"post_weights": [
|
13 |
+
{
|
14 |
+
"name": "model.norm.weight"
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"name": "lm_head.weight",
|
18 |
+
"is_embed": true
|
19 |
+
}
|
20 |
+
],
|
21 |
+
"num_layers_config_key": "num_hidden_layers",
|
22 |
+
"layer_templates": {
|
23 |
+
"weights": [
|
24 |
+
{
|
25 |
+
"name": "model.layers.${layer_index}.input_layernorm.weight"
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"name": "model.layers.${layer_index}.self_attn.W_pack.weight"
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"name": "model.layers.${layer_index}.self_attn.o_proj.weight"
|
32 |
+
},
|
33 |
+
{
|
34 |
+
"name": "model.layers.${layer_index}.post_attention_layernorm.weight"
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"name": "model.layers.${layer_index}.mlp.gate_proj.weight"
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"name": "model.layers.${layer_index}.mlp.down_proj.weight"
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"name": "model.layers.${layer_index}.mlp.up_proj.weight"
|
44 |
+
}
|
45 |
+
]
|
46 |
+
}
|
47 |
+
}
|
mergekit/mergekit/_data/architectures/bert-masked-lm.json
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "bert",
|
3 |
+
"architectures": [
|
4 |
+
"BertForMaskedLM"
|
5 |
+
],
|
6 |
+
"pre_weights": [
|
7 |
+
{
|
8 |
+
"name": "bert.embeddings.position_embeddings.weight"
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"name": "bert.embeddings.token_type_embeddings.weight"
|
12 |
+
},
|
13 |
+
{
|
14 |
+
"name": "bert.embeddings.word_embeddings.weight",
|
15 |
+
"is_embed": true
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"name": "bert.embeddings.LayerNorm.bias",
|
19 |
+
"aliases": [
|
20 |
+
"bert.embeddings.LayerNorm.beta"
|
21 |
+
]
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"name": "bert.embeddings.LayerNorm.weight",
|
25 |
+
"aliases": [
|
26 |
+
"bert.embeddings.LayerNorm.gamma"
|
27 |
+
]
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"name": "bert.embeddings.position_ids",
|
31 |
+
"optional": true,
|
32 |
+
"force_dtype": "int64"
|
33 |
+
}
|
34 |
+
],
|
35 |
+
"post_weights": [
|
36 |
+
{
|
37 |
+
"name": "bert.pooler.dense.weight"
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"name": "bert.pooler.dense.bias"
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"name": "cls.predictions.bias"
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"name": "cls.predictions.decoder.weight",
|
47 |
+
"optional": true,
|
48 |
+
"tied_names": [
|
49 |
+
"bert.embeddings.word_embeddings.weight"
|
50 |
+
],
|
51 |
+
"is_embed": true
|
52 |
+
}
|
53 |
+
],
|
54 |
+
"num_layers_config_key": "num_hidden_layers",
|
55 |
+
"layer_templates": {
|
56 |
+
"weights": [
|
57 |
+
{
|
58 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.query.weight"
|
59 |
+
},
|
60 |
+
{
|
61 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.query.bias"
|
62 |
+
},
|
63 |
+
{
|
64 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.key.weight"
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.key.bias"
|
68 |
+
},
|
69 |
+
{
|
70 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.value.weight"
|
71 |
+
},
|
72 |
+
{
|
73 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.value.bias"
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.dense.weight"
|
77 |
+
},
|
78 |
+
{
|
79 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.dense.bias"
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.LayerNorm.bias",
|
83 |
+
"aliases": [
|
84 |
+
"bert.encoder.layer.${layer_index}.attention.output.LayerNorm.beta"
|
85 |
+
]
|
86 |
+
},
|
87 |
+
{
|
88 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.LayerNorm.weight",
|
89 |
+
"aliases": [
|
90 |
+
"bert.encoder.layer.${layer_index}.attention.output.LayerNorm.gamma"
|
91 |
+
]
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"name": "bert.encoder.layer.${layer_index}.intermediate.dense.weight"
|
95 |
+
},
|
96 |
+
{
|
97 |
+
"name": "bert.encoder.layer.${layer_index}.intermediate.dense.bias"
|
98 |
+
},
|
99 |
+
{
|
100 |
+
"name": "bert.encoder.layer.${layer_index}.output.dense.weight"
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"name": "bert.encoder.layer.${layer_index}.output.dense.bias"
|
104 |
+
},
|
105 |
+
{
|
106 |
+
"name": "bert.encoder.layer.${layer_index}.output.LayerNorm.bias",
|
107 |
+
"aliases": [
|
108 |
+
"bert.encoder.layer.${layer_index}.output.LayerNorm.beta"
|
109 |
+
]
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"name": "bert.encoder.layer.${layer_index}.output.LayerNorm.weight",
|
113 |
+
"aliases": [
|
114 |
+
"bert.encoder.layer.${layer_index}.output.LayerNorm.gamma"
|
115 |
+
]
|
116 |
+
}
|
117 |
+
]
|
118 |
+
}
|
119 |
+
}
|
mergekit/mergekit/_data/architectures/bert-sequence-classification.json
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "bert",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification",
|
5 |
+
"BertForMultipleChoice",
|
6 |
+
"BertForTokenClassification"
|
7 |
+
],
|
8 |
+
"pre_weights": [
|
9 |
+
{
|
10 |
+
"name": "bert.embeddings.position_embeddings.weight"
|
11 |
+
},
|
12 |
+
{
|
13 |
+
"name": "bert.embeddings.token_type_embeddings.weight"
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"name": "bert.embeddings.word_embeddings.weight",
|
17 |
+
"is_embed": true
|
18 |
+
},
|
19 |
+
{
|
20 |
+
"name": "bert.embeddings.LayerNorm.bias",
|
21 |
+
"aliases": [
|
22 |
+
"bert.embeddings.LayerNorm.beta"
|
23 |
+
]
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"name": "bert.embeddings.LayerNorm.weight",
|
27 |
+
"aliases": [
|
28 |
+
"bert.embeddings.LayerNorm.gamma"
|
29 |
+
]
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"name": "bert.embeddings.position_ids",
|
33 |
+
"optional": true,
|
34 |
+
"force_dtype": "int64"
|
35 |
+
}
|
36 |
+
],
|
37 |
+
"post_weights": [
|
38 |
+
{
|
39 |
+
"name": "bert.pooler.dense.weight",
|
40 |
+
"optional": true
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"name": "bert.pooler.dense.bias",
|
44 |
+
"optional": true
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"name": "classifier.bias"
|
48 |
+
},
|
49 |
+
{
|
50 |
+
"name": "classifier.weight"
|
51 |
+
}
|
52 |
+
],
|
53 |
+
"num_layers_config_key": "num_hidden_layers",
|
54 |
+
"layer_templates": {
|
55 |
+
"weights": [
|
56 |
+
{
|
57 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.query.weight"
|
58 |
+
},
|
59 |
+
{
|
60 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.query.bias"
|
61 |
+
},
|
62 |
+
{
|
63 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.key.weight"
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.key.bias"
|
67 |
+
},
|
68 |
+
{
|
69 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.value.weight"
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"name": "bert.encoder.layer.${layer_index}.attention.self.value.bias"
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.dense.weight"
|
76 |
+
},
|
77 |
+
{
|
78 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.dense.bias"
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.LayerNorm.bias",
|
82 |
+
"aliases": [
|
83 |
+
"bert.encoder.layer.${layer_index}.attention.output.LayerNorm.beta"
|
84 |
+
]
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"name": "bert.encoder.layer.${layer_index}.attention.output.LayerNorm.weight",
|
88 |
+
"aliases": [
|
89 |
+
"bert.encoder.layer.${layer_index}.attention.output.LayerNorm.gamma"
|
90 |
+
]
|
91 |
+
},
|
92 |
+
{
|
93 |
+
"name": "bert.encoder.layer.${layer_index}.intermediate.dense.weight"
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"name": "bert.encoder.layer.${layer_index}.intermediate.dense.bias"
|
97 |
+
},
|
98 |
+
{
|
99 |
+
"name": "bert.encoder.layer.${layer_index}.output.dense.weight"
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"name": "bert.encoder.layer.${layer_index}.output.dense.bias"
|
103 |
+
},
|
104 |
+
{
|
105 |
+
"name": "bert.encoder.layer.${layer_index}.output.LayerNorm.bias",
|
106 |
+
"aliases": [
|
107 |
+
"bert.encoder.layer.${layer_index}.output.LayerNorm.beta"
|
108 |
+
]
|
109 |
+
},
|
110 |
+
{
|
111 |
+
"name": "bert.encoder.layer.${layer_index}.output.LayerNorm.weight",
|
112 |
+
"aliases": [
|
113 |
+
"bert.encoder.layer.${layer_index}.output.LayerNorm.gamma"
|
114 |
+
]
|
115 |
+
}
|
116 |
+
]
|
117 |
+
}
|
118 |
+
}
|