初始化项目,由ModelHub XC社区提供模型
Model: jambroz/sixtyoneeighty-4x7B-v1 Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
88
README.md
Normal file
88
README.md
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
tags:
|
||||
- moe
|
||||
- frankenmoe
|
||||
- merge
|
||||
- mergekit
|
||||
- lazymergekit
|
||||
- jambroz/sixtyoneeighty-7b-chat
|
||||
base_model:
|
||||
- jambroz/sixtyoneeighty-7b-chat
|
||||
- NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
|
||||
- S-miguel/The-Trinity-Coder-7B
|
||||
- chihoonlee10/T3Q-Mistral-Orca-Math-DPO
|
||||
---
|
||||
|
||||
# sixtyoneeighty-7b-MOE
|
||||
|
||||
sixtyoneeighty-7b-MOE is a Mixure of Experts (MoE) made with the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
|
||||
* [jambroz/sixtyoneeighty-7b-chat](https://huggingface.co/jambroz/sixtyoneeighty-7b-chat)
|
||||
* [NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story](https://huggingface.co/NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story)
|
||||
* [S-miguel/The-Trinity-Coder-7B](https://huggingface.co/S-miguel/The-Trinity-Coder-7B)
|
||||
* [chihoonlee10/T3Q-Mistral-Orca-Math-DPO](https://huggingface.co/chihoonlee10/T3Q-Mistral-Orca-Math-DPO)
|
||||
|
||||
## 🧩 Configuration
|
||||
|
||||
```yaml
|
||||
base_model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
|
||||
gate_mode: hidden
|
||||
dtype: bfloat16
|
||||
experts_per_token: 2
|
||||
experts:
|
||||
- source_model: jambroz/sixtyoneeighty-7b-chat
|
||||
positive_prompts:
|
||||
- "What are some fun activities to do in Seattle?"
|
||||
- "What are some fun historical facts about New York City?"
|
||||
negative_prompts:
|
||||
- "Write a Python script to scrape data from a website."
|
||||
- "Explain the key differences between Bayesian and frequentist statistics."
|
||||
|
||||
- source_model: NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
|
||||
positive_prompts:
|
||||
- "Write me a fictional story about dragons and wizards?"
|
||||
- "From now on take on the role of Dwayne Johnson"
|
||||
negative_prompts:
|
||||
- "When is the next solar eclipse."
|
||||
- "What year did World War II end?"
|
||||
|
||||
- source_model: S-miguel/The-Trinity-Coder-7B
|
||||
positive_prompts:
|
||||
- "Can you review my JavaScript code and suggest ways to optimize it for better performance?"
|
||||
- "I'm getting an 'undefined variable' error in my Python script. Here's the code: [code snippet]"
|
||||
negative_prompts:
|
||||
- "What are some effective strategies for managing stress and anxiety?"
|
||||
- "Compare and contrast the themes in 'The Great Gatsby' and 'The Catcher in the Rye'."
|
||||
|
||||
- source_model: chihoonlee10/T3Q-Mistral-Orca-Math-DPO
|
||||
positive_prompts:
|
||||
- "What's a square root of 1337?"
|
||||
- "Find the midpoint of the line segment with the given end points (-5,7) and (-2,1)"
|
||||
negative_prompts:
|
||||
- "What are some effective strategies for managing stress and anxiety?"
|
||||
- "Compare and contrast the themes in 'The Great Gatsby' and 'The Catcher in the Rye'."
|
||||
```
|
||||
|
||||
## 💻 Usage
|
||||
|
||||
```python
|
||||
!pip install -qU transformers bitsandbytes accelerate
|
||||
|
||||
from transformers import AutoTokenizer
|
||||
import transformers
|
||||
import torch
|
||||
|
||||
model = "jambroz/sixtyoneeighty-7b-MOE"
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained(model)
|
||||
pipeline = transformers.pipeline(
|
||||
"text-generation",
|
||||
model=model,
|
||||
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
||||
)
|
||||
|
||||
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
||||
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
||||
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
||||
print(outputs[0]["generated_text"])
|
||||
```
|
||||
4
added_tokens.json
Normal file
4
added_tokens.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"<|im_end|>": 32000,
|
||||
"<|im_start|>": 32001
|
||||
}
|
||||
30
config.json
Normal file
30
config.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"_name_or_path": "cognitivecomputations/dolphin-2.8-mistral-7b-v02",
|
||||
"architectures": [
|
||||
"MixtralForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 32000,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 14336,
|
||||
"max_position_embeddings": 32768,
|
||||
"model_type": "mixtral",
|
||||
"num_attention_heads": 32,
|
||||
"num_experts_per_tok": 2,
|
||||
"num_hidden_layers": 32,
|
||||
"num_key_value_heads": 8,
|
||||
"num_local_experts": 4,
|
||||
"output_router_logits": false,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_theta": 1000000.0,
|
||||
"router_aux_loss_coef": 0.001,
|
||||
"sliding_window": null,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.39.3",
|
||||
"use_cache": false,
|
||||
"vocab_size": 32002
|
||||
}
|
||||
37
mergekit_moe_config.yml
Normal file
37
mergekit_moe_config.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
base_model: cognitivecomputations/dolphin-2.8-mistral-7b-v02
|
||||
gate_mode: hidden
|
||||
dtype: bfloat16
|
||||
experts_per_token: 2
|
||||
experts:
|
||||
- source_model: jambroz/sixtyoneeighty-7b-chat
|
||||
positive_prompts:
|
||||
- "What are some fun activities to do in Seattle?"
|
||||
- "What are some fun historical facts about New York City?"
|
||||
negative_prompts:
|
||||
- "Write a Python script to scrape data from a website."
|
||||
- "Explain the key differences between Bayesian and frequentist statistics."
|
||||
|
||||
- source_model: NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
|
||||
positive_prompts:
|
||||
- "Write me a fictional story about dragons and wizards?"
|
||||
- "From now on take on the role of Dwayne Johnson"
|
||||
negative_prompts:
|
||||
- "When is the next solar eclipse."
|
||||
- "What year did World War II end?"
|
||||
|
||||
- source_model: S-miguel/The-Trinity-Coder-7B
|
||||
positive_prompts:
|
||||
- "Can you review my JavaScript code and suggest ways to optimize it for better performance?"
|
||||
- "I'm getting an 'undefined variable' error in my Python script. Here's the code: [code snippet]"
|
||||
negative_prompts:
|
||||
- "What are some effective strategies for managing stress and anxiety?"
|
||||
- "Compare and contrast the themes in 'The Great Gatsby' and 'The Catcher in the Rye'."
|
||||
|
||||
- source_model: chihoonlee10/T3Q-Mistral-Orca-Math-DPO
|
||||
positive_prompts:
|
||||
- "What's a square root of 1337?"
|
||||
- "Find the midpoint of the line segment with the given end points (-5,7) and (-2,1)"
|
||||
negative_prompts:
|
||||
- "What are some effective strategies for managing stress and anxiety?"
|
||||
- "Compare and contrast the themes in 'The Great Gatsby' and 'The Catcher in the Rye'."
|
||||
3
model-00001-of-00005.safetensors
Normal file
3
model-00001-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:78c7dc2c4ecfa1feb4a44fb7ec092a8fb56d437b3d787d307b41b374fd36924c
|
||||
size 9919846472
|
||||
3
model-00002-of-00005.safetensors
Normal file
3
model-00002-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ecd2f210b30b68a9fabcaea8569f5c484d3ec0ef647c86d829ef0d13a28b8a8b
|
||||
size 9982454720
|
||||
3
model-00003-of-00005.safetensors
Normal file
3
model-00003-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:27b295ed1f97980ed5bad3fe40c6da1cae79aadf3bec9bf49ccaa234a20d982b
|
||||
size 9982454752
|
||||
3
model-00004-of-00005.safetensors
Normal file
3
model-00004-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e21b19ef99e2724f2df95f52830037e18244792f84f4530099854273e04e1372
|
||||
size 9982454720
|
||||
3
model-00005-of-00005.safetensors
Normal file
3
model-00005-of-00005.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:802f18d4e43bec6e70305b0179f4e3297ecafd623e578bdf0749dffad5760ff3
|
||||
size 8440279464
|
||||
1
model.safetensors.index.json
Normal file
1
model.safetensors.index.json
Normal file
File diff suppressed because one or more lines are too long
24
special_tokens_map.json
Normal file
24
special_tokens_map.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": "<s>",
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
91147
tokenizer.json
Normal file
91147
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
tokenizer.model
(Stored with Git LFS)
Normal file
BIN
tokenizer.model
(Stored with Git LFS)
Normal file
Binary file not shown.
60
tokenizer_config.json
Normal file
60
tokenizer_config.json
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"add_bos_token": true,
|
||||
"add_eos_token": false,
|
||||
"add_prefix_space": true,
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32000": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"32001": {
|
||||
"content": "<|im_start|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": false
|
||||
}
|
||||
},
|
||||
"bos_token": "<s>",
|
||||
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": "<|im_end|>",
|
||||
"legacy": true,
|
||||
"model_max_length": 1000000000000000019884624838656,
|
||||
"pad_token": "<s>",
|
||||
"sp_model_kwargs": {},
|
||||
"spaces_between_special_tokens": false,
|
||||
"tokenizer_class": "LlamaTokenizer",
|
||||
"unk_token": "<unk>",
|
||||
"use_default_system_prompt": false,
|
||||
"use_fast": true
|
||||
}
|
||||
Reference in New Issue
Block a user