[WIP] Upload folder using huggingface_hub (multi-commit 1c80ac458986d80c7963513ad29ba8a01b29003a042410818860d629b06af463)

#9
README.md CHANGED
@@ -49,15 +49,6 @@ More details can be found in our paper.
49
  If you use LibMoE, please cite it using this BibTeX:
50
 
51
  ```
52
- @misc{nguyen2024libmoelibrarycomprehensivebenchmarking,
53
- title={LIBMoE: A Library for comprehensive benchmarking Mixture of Experts in Large Language Models},
54
- author={Nam V. Nguyen and Thong T. Doan and Luong Tran and Van Nguyen and Quang Pham},
55
- year={2024},
56
- eprint={2411.00918},
57
- archivePrefix={arXiv},
58
- primaryClass={cs.CL},
59
- url={https://arxiv.org/abs/2411.00918},
60
- }
61
  ```
62
 
63
 
 
49
  If you use LibMoE, please cite it using this BibTeX:
50
 
51
  ```
 
 
 
 
 
 
 
 
 
52
  ```
53
 
54
 
sft/hyperrouter/added_tokens.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "<|assistant|>": 32001,
3
- "<|endoftext|>": 32000,
4
- "<|end|>": 32007,
5
- "<|placeholder1|>": 32002,
6
- "<|placeholder2|>": 32003,
7
- "<|placeholder3|>": 32004,
8
- "<|placeholder4|>": 32005,
9
- "<|placeholder5|>": 32008,
10
- "<|placeholder6|>": 32009,
11
- "<|system|>": 32006,
12
- "<|user|>": 32010
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/hyperrouter/config.json DELETED
@@ -1,68 +0,0 @@
1
- {
2
- "_name_or_path": "/cm/archive/thongdt4/toolkitmoe/checkpoints/phi3mini-siglip224/pft",
3
- "architectures": [
4
- "LlavaPhiForCausalLM"
5
- ],
6
- "attention_bias": false,
7
- "attention_dropout": 0.0,
8
- "auto_map": {
9
- "AutoConfig": "configuration_phi3.Phi3Config",
10
- "AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM"
11
- },
12
- "balance_loss_coef": 0.1,
13
- "bos_token_id": 1,
14
- "clip_smoe": true,
15
- "dropout": false,
16
- "embd_pdrop": 0.0,
17
- "eos_token_id": 32000,
18
- "freeze_mm_mlp_adapter": false,
19
- "hidden_act": "silu",
20
- "hidden_size": 3072,
21
- "image_aspect_ratio": "pad",
22
- "initializer_range": 0.02,
23
- "intermediate_size": 8192,
24
- "local_rank": 0,
25
- "max_position_embeddings": 4096,
26
- "mlp_smoe": true,
27
- "mm_hidden_size": 1152,
28
- "mm_patch_merge_type": "flat",
29
- "mm_projector_lr": null,
30
- "mm_projector_type": "moe",
31
- "mm_use_im_patch_token": false,
32
- "mm_use_im_start_end": false,
33
- "mm_vision_select_feature": "patch",
34
- "mm_vision_select_layer": -2,
35
- "mm_vision_tower": "google/siglip-so400m-patch14-224",
36
- "model_type": "llava_phi",
37
- "moe_name": "hyperrouter",
38
- "num_attention_heads": 32,
39
- "num_experts": 4,
40
- "num_hidden_layers": 32,
41
- "num_key_value_heads": 32,
42
- "num_layers": 3,
43
- "num_selected": 2,
44
- "original_max_position_embeddings": 4096,
45
- "pad_token_id": 32000,
46
- "resid_pdrop": 0.0,
47
- "rms_norm_eps": 1e-05,
48
- "rope_scaling": null,
49
- "rope_theta": 10000.0,
50
- "router_z_loss_coef": 0.01,
51
- "scales": [
52
- 1,
53
- 3
54
- ],
55
- "sliding_window": 2047,
56
- "tie_word_embeddings": false,
57
- "tokenizer_model_max_length": 2048,
58
- "tokenizer_padding_side": "right",
59
- "topk_max": 2,
60
- "topk_min": 1,
61
- "torch_dtype": "bfloat16",
62
- "training": true,
63
- "transformers_version": "4.43.2",
64
- "tune_mm_mlp_adapter": false,
65
- "use_cache": true,
66
- "use_mm_proj": true,
67
- "vocab_size": 32064
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/hyperrouter/generation_config.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "_from_model_config": true,
3
- "bos_token_id": 1,
4
- "do_sample": true,
5
- "eos_token_id": [
6
- 32000,
7
- 32001,
8
- 32007
9
- ],
10
- "pad_token_id": 32000,
11
- "transformers_version": "4.43.2"
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/hyperrouter/model-00001-of-00003.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9b4d0844c655591f1968d2ce825d5e82df6c438775c090daee14b7412ccc7055
3
- size 4972489328
 
 
 
 
sft/hyperrouter/model-00002-of-00003.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7ee48788c3759ffa9c2c4ed88ce6ee26a64e9e3c0e1386318292139ce2c500cf
3
- size 4995022432
 
 
 
 
sft/hyperrouter/model-00003-of-00003.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:73a616bad6c479415ca0994b6c542dc194b7ded1ce11a763ca4163704544dd86
3
- size 342468696
 
 
 
 
sft/hyperrouter/model.safetensors.index.json DELETED
The diff for this file is too large to render. See raw diff
 
sft/hyperrouter/special_tokens_map.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "bos_token": {
3
- "content": "<s>",
4
- "lstrip": false,
5
- "normalized": false,
6
- "rstrip": false,
7
- "single_word": false
8
- },
9
- "eos_token": {
10
- "content": "<|endoftext|>",
11
- "lstrip": false,
12
- "normalized": false,
13
- "rstrip": false,
14
- "single_word": false
15
- },
16
- "pad_token": "<unk>",
17
- "unk_token": {
18
- "content": "<unk>",
19
- "lstrip": false,
20
- "normalized": false,
21
- "rstrip": false,
22
- "single_word": false
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/hyperrouter/tokenizer.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
- size 499723
 
 
 
 
sft/hyperrouter/tokenizer_config.json DELETED
@@ -1,132 +0,0 @@
1
- {
2
- "add_bos_token": true,
3
- "add_eos_token": false,
4
- "add_prefix_space": true,
5
- "added_tokens_decoder": {
6
- "0": {
7
- "content": "<unk>",
8
- "lstrip": false,
9
- "normalized": false,
10
- "rstrip": false,
11
- "single_word": false,
12
- "special": true
13
- },
14
- "1": {
15
- "content": "<s>",
16
- "lstrip": false,
17
- "normalized": false,
18
- "rstrip": false,
19
- "single_word": false,
20
- "special": true
21
- },
22
- "2": {
23
- "content": "</s>",
24
- "lstrip": false,
25
- "normalized": false,
26
- "rstrip": true,
27
- "single_word": false,
28
- "special": false
29
- },
30
- "32000": {
31
- "content": "<|endoftext|>",
32
- "lstrip": false,
33
- "normalized": false,
34
- "rstrip": false,
35
- "single_word": false,
36
- "special": true
37
- },
38
- "32001": {
39
- "content": "<|assistant|>",
40
- "lstrip": false,
41
- "normalized": false,
42
- "rstrip": true,
43
- "single_word": false,
44
- "special": true
45
- },
46
- "32002": {
47
- "content": "<|placeholder1|>",
48
- "lstrip": false,
49
- "normalized": false,
50
- "rstrip": true,
51
- "single_word": false,
52
- "special": true
53
- },
54
- "32003": {
55
- "content": "<|placeholder2|>",
56
- "lstrip": false,
57
- "normalized": false,
58
- "rstrip": true,
59
- "single_word": false,
60
- "special": true
61
- },
62
- "32004": {
63
- "content": "<|placeholder3|>",
64
- "lstrip": false,
65
- "normalized": false,
66
- "rstrip": true,
67
- "single_word": false,
68
- "special": true
69
- },
70
- "32005": {
71
- "content": "<|placeholder4|>",
72
- "lstrip": false,
73
- "normalized": false,
74
- "rstrip": true,
75
- "single_word": false,
76
- "special": true
77
- },
78
- "32006": {
79
- "content": "<|system|>",
80
- "lstrip": false,
81
- "normalized": false,
82
- "rstrip": true,
83
- "single_word": false,
84
- "special": true
85
- },
86
- "32007": {
87
- "content": "<|end|>",
88
- "lstrip": false,
89
- "normalized": false,
90
- "rstrip": true,
91
- "single_word": false,
92
- "special": true
93
- },
94
- "32008": {
95
- "content": "<|placeholder5|>",
96
- "lstrip": false,
97
- "normalized": false,
98
- "rstrip": true,
99
- "single_word": false,
100
- "special": true
101
- },
102
- "32009": {
103
- "content": "<|placeholder6|>",
104
- "lstrip": false,
105
- "normalized": false,
106
- "rstrip": true,
107
- "single_word": false,
108
- "special": true
109
- },
110
- "32010": {
111
- "content": "<|user|>",
112
- "lstrip": false,
113
- "normalized": false,
114
- "rstrip": true,
115
- "single_word": false,
116
- "special": true
117
- }
118
- },
119
- "bos_token": "<s>",
120
- "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
121
- "clean_up_tokenization_spaces": false,
122
- "eos_token": "<|endoftext|>",
123
- "legacy": false,
124
- "model_max_length": 2048,
125
- "pad_token": "<unk>",
126
- "padding_side": "right",
127
- "sp_model_kwargs": {},
128
- "spaces_between_special_tokens": false,
129
- "tokenizer_class": "LlamaTokenizer",
130
- "unk_token": "<unk>",
131
- "use_default_system_prompt": false
132
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/hyperrouter/trainer_state.json DELETED
The diff for this file is too large to render. See raw diff
 
sft/hyperrouter/training_args.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c09427a177e86daca87c380071eb69bb649199ac37ec8b4066e07e5d8e69e1bb
3
- size 7352
 
 
 
 
sft/smoe_perturbed/added_tokens.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "<|assistant|>": 32001,
3
- "<|endoftext|>": 32000,
4
- "<|end|>": 32007,
5
- "<|placeholder1|>": 32002,
6
- "<|placeholder2|>": 32003,
7
- "<|placeholder3|>": 32004,
8
- "<|placeholder4|>": 32005,
9
- "<|placeholder5|>": 32008,
10
- "<|placeholder6|>": 32009,
11
- "<|system|>": 32006,
12
- "<|user|>": 32010
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/smoe_perturbed/config.json DELETED
@@ -1,66 +0,0 @@
1
- {
2
- "_name_or_path": "/cm/archive/thongdt4/toolkitmoe/checkpoints/phi3mini-siglip224/pft",
3
- "architectures": [
4
- "LlavaPhiForCausalLM"
5
- ],
6
- "attention_bias": false,
7
- "attention_dropout": 0.0,
8
- "auto_map": {
9
- "AutoConfig": "configuration_phi3.Phi3Config",
10
- "AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM"
11
- },
12
- "balance_loss_coef": 0.1,
13
- "bos_token_id": 1,
14
- "clip_smoe": true,
15
- "dropout": false,
16
- "embd_pdrop": 0.0,
17
- "eos_token_id": 32000,
18
- "freeze_mm_mlp_adapter": false,
19
- "hidden_act": "silu",
20
- "hidden_size": 3072,
21
- "image_aspect_ratio": "pad",
22
- "initializer_range": 0.02,
23
- "intermediate_size": 8192,
24
- "local_rank": 0,
25
- "max_position_embeddings": 4096,
26
- "mlp_smoe": true,
27
- "mm_hidden_size": 1152,
28
- "mm_patch_merge_type": "flat",
29
- "mm_projector_lr": null,
30
- "mm_projector_type": "moe",
31
- "mm_use_im_patch_token": false,
32
- "mm_use_im_start_end": false,
33
- "mm_vision_select_feature": "patch",
34
- "mm_vision_select_layer": -2,
35
- "mm_vision_tower": "google/siglip-so400m-patch14-224",
36
- "model_type": "llava_phi",
37
- "moe_name": "smoe_perturbed",
38
- "num_attention_heads": 32,
39
- "num_experts": 2,
40
- "num_hidden_layers": 32,
41
- "num_key_value_heads": 32,
42
- "num_layers": 3,
43
- "num_selected": 2,
44
- "original_max_position_embeddings": 4096,
45
- "pad_token_id": 32000,
46
- "resid_pdrop": 0.0,
47
- "rms_norm_eps": 1e-05,
48
- "rope_scaling": null,
49
- "rope_theta": 10000.0,
50
- "router_z_loss_coef": 0.01,
51
- "scales": [
52
- 1,
53
- 3
54
- ],
55
- "sliding_window": 2047,
56
- "tie_word_embeddings": false,
57
- "tokenizer_model_max_length": 2048,
58
- "tokenizer_padding_side": "right",
59
- "torch_dtype": "bfloat16",
60
- "training": true,
61
- "transformers_version": "4.43.2",
62
- "tune_mm_mlp_adapter": false,
63
- "use_cache": true,
64
- "use_mm_proj": true,
65
- "vocab_size": 32064
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/smoe_perturbed/generation_config.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "_from_model_config": true,
3
- "bos_token_id": 1,
4
- "do_sample": true,
5
- "eos_token_id": [
6
- 32000,
7
- 32001,
8
- 32007
9
- ],
10
- "pad_token_id": 32000,
11
- "transformers_version": "4.43.2"
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/smoe_perturbed/model-00001-of-00003.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:915e651ce990462da7bd2d15c47fbf7141493b9056075cdd87e9933faf29ce88
3
- size 4972489328
 
 
 
 
sft/smoe_perturbed/model-00002-of-00003.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9a9941e4a220b4474c69c45c86b21a19feb2b12065416612d3f25c4a8ccd8044
3
- size 4985533608
 
 
 
 
sft/smoe_perturbed/model-00003-of-00003.safetensors DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e1b22a19161e149a6276cb8cd7c5b2fd1fc3cbe86decb5523a7703a9ac029e8
3
- size 248943664
 
 
 
 
sft/smoe_perturbed/model.safetensors.index.json DELETED
The diff for this file is too large to render. See raw diff
 
sft/smoe_perturbed/special_tokens_map.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "bos_token": {
3
- "content": "<s>",
4
- "lstrip": false,
5
- "normalized": false,
6
- "rstrip": false,
7
- "single_word": false
8
- },
9
- "eos_token": {
10
- "content": "<|endoftext|>",
11
- "lstrip": false,
12
- "normalized": false,
13
- "rstrip": false,
14
- "single_word": false
15
- },
16
- "pad_token": "<unk>",
17
- "unk_token": {
18
- "content": "<unk>",
19
- "lstrip": false,
20
- "normalized": false,
21
- "rstrip": false,
22
- "single_word": false
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/smoe_perturbed/tokenizer.model DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
- size 499723
 
 
 
 
sft/smoe_perturbed/tokenizer_config.json DELETED
@@ -1,132 +0,0 @@
1
- {
2
- "add_bos_token": true,
3
- "add_eos_token": false,
4
- "add_prefix_space": true,
5
- "added_tokens_decoder": {
6
- "0": {
7
- "content": "<unk>",
8
- "lstrip": false,
9
- "normalized": false,
10
- "rstrip": false,
11
- "single_word": false,
12
- "special": true
13
- },
14
- "1": {
15
- "content": "<s>",
16
- "lstrip": false,
17
- "normalized": false,
18
- "rstrip": false,
19
- "single_word": false,
20
- "special": true
21
- },
22
- "2": {
23
- "content": "</s>",
24
- "lstrip": false,
25
- "normalized": false,
26
- "rstrip": true,
27
- "single_word": false,
28
- "special": false
29
- },
30
- "32000": {
31
- "content": "<|endoftext|>",
32
- "lstrip": false,
33
- "normalized": false,
34
- "rstrip": false,
35
- "single_word": false,
36
- "special": true
37
- },
38
- "32001": {
39
- "content": "<|assistant|>",
40
- "lstrip": false,
41
- "normalized": false,
42
- "rstrip": true,
43
- "single_word": false,
44
- "special": true
45
- },
46
- "32002": {
47
- "content": "<|placeholder1|>",
48
- "lstrip": false,
49
- "normalized": false,
50
- "rstrip": true,
51
- "single_word": false,
52
- "special": true
53
- },
54
- "32003": {
55
- "content": "<|placeholder2|>",
56
- "lstrip": false,
57
- "normalized": false,
58
- "rstrip": true,
59
- "single_word": false,
60
- "special": true
61
- },
62
- "32004": {
63
- "content": "<|placeholder3|>",
64
- "lstrip": false,
65
- "normalized": false,
66
- "rstrip": true,
67
- "single_word": false,
68
- "special": true
69
- },
70
- "32005": {
71
- "content": "<|placeholder4|>",
72
- "lstrip": false,
73
- "normalized": false,
74
- "rstrip": true,
75
- "single_word": false,
76
- "special": true
77
- },
78
- "32006": {
79
- "content": "<|system|>",
80
- "lstrip": false,
81
- "normalized": false,
82
- "rstrip": true,
83
- "single_word": false,
84
- "special": true
85
- },
86
- "32007": {
87
- "content": "<|end|>",
88
- "lstrip": false,
89
- "normalized": false,
90
- "rstrip": true,
91
- "single_word": false,
92
- "special": true
93
- },
94
- "32008": {
95
- "content": "<|placeholder5|>",
96
- "lstrip": false,
97
- "normalized": false,
98
- "rstrip": true,
99
- "single_word": false,
100
- "special": true
101
- },
102
- "32009": {
103
- "content": "<|placeholder6|>",
104
- "lstrip": false,
105
- "normalized": false,
106
- "rstrip": true,
107
- "single_word": false,
108
- "special": true
109
- },
110
- "32010": {
111
- "content": "<|user|>",
112
- "lstrip": false,
113
- "normalized": false,
114
- "rstrip": true,
115
- "single_word": false,
116
- "special": true
117
- }
118
- },
119
- "bos_token": "<s>",
120
- "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
121
- "clean_up_tokenization_spaces": false,
122
- "eos_token": "<|endoftext|>",
123
- "legacy": false,
124
- "model_max_length": 2048,
125
- "pad_token": "<unk>",
126
- "padding_side": "right",
127
- "sp_model_kwargs": {},
128
- "spaces_between_special_tokens": false,
129
- "tokenizer_class": "LlamaTokenizer",
130
- "unk_token": "<unk>",
131
- "use_default_system_prompt": false
132
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sft/smoe_perturbed/trainer_state.json DELETED
The diff for this file is too large to render. See raw diff
 
sft/smoe_perturbed/training_args.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5535ab3f5cdfe493c63007a35f0c6db959c4db6a57a9b1bffbca65f253ccf5d6
3
- size 8184