Text Generation
Transformers
Safetensors
mixtral
Mixture of Experts
mergekit
Merge
chinese
arabic
english
multilingual
german
french
gagan3012/MetaModel
jeonsworld/CarbonVillain-en-10.7B-v2
jeonsworld/CarbonVillain-en-10.7B-v4
TomGrc/FusionNet_linear
DopeorNope/SOLARC-M-10.7B
VAGOsolutions/SauerkrautLM-SOLAR-Instruct
upstage/SOLAR-10.7B-Instruct-v1.0
fblgit/UNA-SOLAR-10.7B-Instruct-v1.0
conversational
text-generation-inference
Inference Endpoints
Upload folder using huggingface_hub
Browse files- README.md +114 -0
- config.json +34 -0
- mergekit_moe_config.yml +20 -0
- model-00001-of-00015.safetensors +3 -0
- model-00002-of-00015.safetensors +3 -0
- model-00003-of-00015.safetensors +3 -0
- model-00004-of-00015.safetensors +3 -0
- model-00005-of-00015.safetensors +3 -0
- model-00006-of-00015.safetensors +3 -0
- model-00007-of-00015.safetensors +3 -0
- model-00008-of-00015.safetensors +3 -0
- model-00009-of-00015.safetensors +3 -0
- model-00010-of-00015.safetensors +3 -0
- model-00011-of-00015.safetensors +3 -0
- model-00012-of-00015.safetensors +3 -0
- model-00013-of-00015.safetensors +3 -0
- model-00014-of-00015.safetensors +3 -0
- model-00015-of-00015.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +24 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +43 -0
README.md
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- moe
|
5 |
+
- mergekit
|
6 |
+
- merge
|
7 |
+
- chinese
|
8 |
+
- arabic
|
9 |
+
- english
|
10 |
+
- multilingual
|
11 |
+
- german
|
12 |
+
- french
|
13 |
+
- openchat/openchat-3.5-1210
|
14 |
+
- beowolx/CodeNinja-1.0-OpenChat-7B
|
15 |
+
- maywell/PiVoT-0.1-Starling-LM-RP
|
16 |
+
- WizardLM/WizardMath-7B-V1.1
|
17 |
+
- davidkim205/komt-mistral-7b-v1
|
18 |
+
- OpenBuddy/openbuddy-zephyr-7b-v14.1
|
19 |
+
- manishiitg/open-aditi-hi-v1
|
20 |
+
- VAGOsolutions/SauerkrautLM-7b-v1-mistral
|
21 |
+
---
|
22 |
+
|
23 |
+
# MetaModel_moex8
|
24 |
+
|
25 |
+
This model is a Mixure of Experts (MoE) made with [mergekit](https://github.com/cg123/mergekit) (mixtral branch). It uses the following base models:
|
26 |
+
* [openchat/openchat-3.5-1210](https://huggingface.co/openchat/openchat-3.5-1210)
|
27 |
+
* [beowolx/CodeNinja-1.0-OpenChat-7B](https://huggingface.co/beowolx/CodeNinja-1.0-OpenChat-7B)
|
28 |
+
* [maywell/PiVoT-0.1-Starling-LM-RP](https://huggingface.co/maywell/PiVoT-0.1-Starling-LM-RP)
|
29 |
+
* [WizardLM/WizardMath-7B-V1.1](https://huggingface.co/WizardLM/WizardMath-7B-V1.1)
|
30 |
+
* [davidkim205/komt-mistral-7b-v1](https://huggingface.co/davidkim205/komt-mistral-7b-v1)
|
31 |
+
* [OpenBuddy/openbuddy-zephyr-7b-v14.1](https://huggingface.co/OpenBuddy/openbuddy-zephyr-7b-v14.1)
|
32 |
+
* [manishiitg/open-aditi-hi-v1](https://huggingface.co/manishiitg/open-aditi-hi-v1)
|
33 |
+
* [VAGOsolutions/SauerkrautLM-7b-v1-mistral](https://huggingface.co/VAGOsolutions/SauerkrautLM-7b-v1-mistral)
|
34 |
+
|
35 |
+
## 🧩 Configuration
|
36 |
+
|
37 |
+
```yamlbase_model: mlabonne/NeuralMarcoro14-7B
|
38 |
+
dtype: bfloat16
|
39 |
+
experts:
|
40 |
+
- positive_prompts:
|
41 |
+
- chat
|
42 |
+
- assistant
|
43 |
+
- tell me
|
44 |
+
- explain
|
45 |
+
source_model: openchat/openchat-3.5-1210
|
46 |
+
- positive_prompts:
|
47 |
+
- code
|
48 |
+
- python
|
49 |
+
- javascript
|
50 |
+
- programming
|
51 |
+
- algorithm
|
52 |
+
source_model: beowolx/CodeNinja-1.0-OpenChat-7B
|
53 |
+
- positive_prompts:
|
54 |
+
- storywriting
|
55 |
+
- write
|
56 |
+
- scene
|
57 |
+
- story
|
58 |
+
- character
|
59 |
+
source_model: maywell/PiVoT-0.1-Starling-LM-RP
|
60 |
+
- positive_prompts:
|
61 |
+
- reason
|
62 |
+
- math
|
63 |
+
- mathematics
|
64 |
+
- solve
|
65 |
+
- count
|
66 |
+
source_model: WizardLM/WizardMath-7B-V1.1
|
67 |
+
- positive_prompts:
|
68 |
+
- korean
|
69 |
+
- answer in korean
|
70 |
+
- korea
|
71 |
+
source_model: davidkim205/komt-mistral-7b-v1
|
72 |
+
- positive_prompts:
|
73 |
+
- chinese
|
74 |
+
- china
|
75 |
+
- answer in chinese
|
76 |
+
source_model: OpenBuddy/openbuddy-zephyr-7b-v14.1
|
77 |
+
- positive_prompts:
|
78 |
+
- hindi
|
79 |
+
- india
|
80 |
+
- hindu
|
81 |
+
- answer in hindi
|
82 |
+
source_model: manishiitg/open-aditi-hi-v1
|
83 |
+
- positive_prompts:
|
84 |
+
- german
|
85 |
+
- germany
|
86 |
+
- answer in german
|
87 |
+
- deutsch
|
88 |
+
source_model: VAGOsolutions/SauerkrautLM-7b-v1-mistral
|
89 |
+
gate_mode: hidden
|
90 |
+
```
|
91 |
+
|
92 |
+
## 💻 Usage
|
93 |
+
|
94 |
+
```python
|
95 |
+
!pip install -qU transformers bitsandbytes accelerate
|
96 |
+
|
97 |
+
from transformers import AutoTokenizer
|
98 |
+
import transformers
|
99 |
+
import torch
|
100 |
+
|
101 |
+
model = "gagan3012/MetaModel_moex8"
|
102 |
+
|
103 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
104 |
+
pipeline = transformers.pipeline(
|
105 |
+
"text-generation",
|
106 |
+
model=model,
|
107 |
+
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
108 |
+
)
|
109 |
+
|
110 |
+
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
111 |
+
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
112 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
113 |
+
print(outputs[0]["generated_text"])
|
114 |
+
```
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "jeonsworld/CarbonVillain-en-10.7B-v4",
|
3 |
+
"architectures": [
|
4 |
+
"MixtralForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_bias": false,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bos_token_id": 1,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "silu",
|
11 |
+
"hidden_size": 4096,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 14336,
|
14 |
+
"max_position_embeddings": 4096,
|
15 |
+
"model_type": "mixtral",
|
16 |
+
"num_attention_heads": 32,
|
17 |
+
"num_experts_per_tok": 2,
|
18 |
+
"num_hidden_layers": 48,
|
19 |
+
"num_key_value_heads": 8,
|
20 |
+
"num_local_experts": 8,
|
21 |
+
"output_router_logits": false,
|
22 |
+
"pad_token_id": 2,
|
23 |
+
"pretraining_tp": 1,
|
24 |
+
"rms_norm_eps": 1e-05,
|
25 |
+
"rope_scaling": null,
|
26 |
+
"rope_theta": 10000.0,
|
27 |
+
"router_aux_loss_coef": 0.001,
|
28 |
+
"sliding_window": null,
|
29 |
+
"tie_word_embeddings": false,
|
30 |
+
"torch_dtype": "float16",
|
31 |
+
"transformers_version": "4.36.2",
|
32 |
+
"use_cache": true,
|
33 |
+
"vocab_size": 32000
|
34 |
+
}
|
mergekit_moe_config.yml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
base_model: jeonsworld/CarbonVillain-en-10.7B-v4
|
2 |
+
gate_mode: hidden
|
3 |
+
dtype: bfloat16
|
4 |
+
experts:
|
5 |
+
- source_model: gagan3012/MetaModel
|
6 |
+
positive_prompts: [""]
|
7 |
+
- source_model: jeonsworld/CarbonVillain-en-10.7B-v2
|
8 |
+
positive_prompts: [""]
|
9 |
+
- source_model: jeonsworld/CarbonVillain-en-10.7B-v4
|
10 |
+
positive_prompts: [""]
|
11 |
+
- source_model: TomGrc/FusionNet_linear
|
12 |
+
positive_prompts: [""]
|
13 |
+
- source_model: DopeorNope/SOLARC-M-10.7B
|
14 |
+
positive_prompts: [""]
|
15 |
+
- source_model: VAGOsolutions/SauerkrautLM-SOLAR-Instruct
|
16 |
+
positive_prompts: [""]
|
17 |
+
- source_model: upstage/SOLAR-10.7B-Instruct-v1.0
|
18 |
+
positive_prompts: [""]
|
19 |
+
- source_model: fblgit/UNA-SOLAR-10.7B-Instruct-v1.0
|
20 |
+
positive_prompts: [""]
|
model-00001-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c291c150295140eec7ea7311fd37e1f9088157433927dff3d27b27d0bf1d6c68
|
3 |
+
size 9919946528
|
model-00002-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38ba2d64b77ff9b8caa67ddefb1bfc1538c1814d7397bc7830d9158938ad4f8d
|
3 |
+
size 9982454760
|
model-00003-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3e9943fb78210d4c454b6296d72bd3f9dbf36f941c5ab18e134e84e2d8712633
|
3 |
+
size 9982454760
|
model-00004-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d1741eaf25cadd8012e7c78e296bb4867978dc705a6eadab24af59be5c42e44
|
3 |
+
size 9982454760
|
model-00005-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:78f659b411e07fb84ab64d3102c4e9489b385a41a5a2326aa4f63351d34463b2
|
3 |
+
size 9982454720
|
model-00006-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:05c4494e41f97a5631b7c40466c8a1d5f189ede8849e64fdb25b5274673f89b3
|
3 |
+
size 9982454712
|
model-00007-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:20cf440adba8567bb7aaa20994cc3f14dbbb43175847c4ae8d266a4a12a6122d
|
3 |
+
size 9982454760
|
model-00008-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7a9510068d4a0f9613de42e332434e4bc95c0a29ea235afc25fae2654445dfa8
|
3 |
+
size 9982454760
|
model-00009-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4621d9262f377ab5e6b239d38694c164db4260050d91e39f8919b2d654aaab2a
|
3 |
+
size 9982454760
|
model-00010-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5224818062e82caba6e78d9271c7e40f77aa5443ec89d9659a8127c97e4d873e
|
3 |
+
size 9982454680
|
model-00011-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c216266f0ea59c30890fc446be202c843b47f27660675124e73b592d3b0f5ce8
|
3 |
+
size 9982454752
|
model-00012-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2637cfb2b443386a1f16c7f4d107767c8e71ae329b040e35e36295f83c88b444
|
3 |
+
size 9982454760
|
model-00013-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:53fe85f2c5bdb118e38b21a575ca8a96a9fd982a352f8546ed52179e044a1c99
|
3 |
+
size 9982454760
|
model-00014-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:970799f420ba13bfbec0f360663d00895209f715f4930dd2ba7c07b0d9ef0aff
|
3 |
+
size 9999648648
|
model-00015-of-00015.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:040d97482c0940b1f31294c6639b5a4ccdb29a18fc04bc275e0e1844b71fe632
|
3 |
+
size 137369408
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "</s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": "<s>",
|
17 |
+
"unk_token": {
|
18 |
+
"content": "<unk>",
|
19 |
+
"lstrip": false,
|
20 |
+
"normalized": false,
|
21 |
+
"rstrip": false,
|
22 |
+
"single_word": false
|
23 |
+
}
|
24 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
}
|
29 |
+
},
|
30 |
+
"additional_special_tokens": [],
|
31 |
+
"bos_token": "<s>",
|
32 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{% if message['content']%}{{'### System:\n' + message['content']+'\n\n'}}{% endif %}{% elif message['role'] == 'user' %}{{'### User:\n' + message['content']+'\n\n'}}{% elif message['role'] == 'assistant' %}{{'### Assistant:\n' + message['content']}}{% endif %}{% if loop.last and add_generation_prompt %}{{ '### Assistant:\n' }}{% endif %}{% endfor %}",
|
33 |
+
"clean_up_tokenization_spaces": false,
|
34 |
+
"eos_token": "</s>",
|
35 |
+
"legacy": true,
|
36 |
+
"model_max_length": 1000000000000000019884624838656,
|
37 |
+
"pad_token": "<s>",
|
38 |
+
"sp_model_kwargs": {},
|
39 |
+
"spaces_between_special_tokens": false,
|
40 |
+
"tokenizer_class": "LlamaTokenizer",
|
41 |
+
"unk_token": "<unk>",
|
42 |
+
"use_default_system_prompt": true
|
43 |
+
}
|