This is a direct extraction of the 8 experts from
Mixtral-8x7b-Instruct-v0.1
, and a transfer of them into the DeepSeek-MoE Architecture.
Expert Configuration:
It is 2 experts per token.
Performance:
Performance is identical to instruct, if not a little better.
Evaluations:
Evals will come when compute clears up, it also appears more malleable to training.
Experimentation:
This is the first of a few MoE expert extraction and modification projects we're working on, more to come. Enjoy.
Instruction Format
To leverage instruction fine-tuning, your prompts should be enclosed with
[INST]
and
[/INST]
tokens. The very first instruction should begin with a begin-of-sentence id, while subsequent instructions should not. Assistant generation will conclude with an end-of-sentence token id.
Example
text = "<s>[INST] What is your favourite condiment? [/INST]"
"Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!</s>"
"[INST] Do you have mayonnaise recipes? [/INST]"
Applying the Chat Template
This format can be implemented using the
apply_chat_template()
method from the
transformers
library:
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda"# the device to load the model onto# Load the model and tokenizer
model = AutoModelForCausalLM.from_pretrained("cognitivecomputations/DeepMixtral-8x7b-Instruct", trust_remote_code=True, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("cognitivecomputations/DeepMixtral-8x7b-Instruct")
# Define the conversation messages
messages = [
{"role": "user", "content": "What is your favourite condiment?"},
{"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
{"role": "user", "content": "Do you have mayonnaise recipes?"}
]
# Apply chat template
encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
model_inputs = encodeds.to(device)
model.to(device)
# Generate response
generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
decoded = tokenizer.batch_decode(generated_ids)
print(decoded[0])
Special Thanks: Eric Hartford, and Fernando Neto.
Lucas Atkins (Crystalcareai)
Runs of QuixiAI DeepMixtral-8x7b-Instruct on huggingface.co
86
Total runs
-1
24-hour runs
-2
3-day runs
-7
7-day runs
36
30-day runs
More Information About DeepMixtral-8x7b-Instruct huggingface.co Model
More DeepMixtral-8x7b-Instruct license Visit here:
DeepMixtral-8x7b-Instruct huggingface.co is an AI model on huggingface.co that provides DeepMixtral-8x7b-Instruct's model effect (), which can be used instantly with this QuixiAI DeepMixtral-8x7b-Instruct model. huggingface.co supports a free trial of the DeepMixtral-8x7b-Instruct model, and also provides paid use of the DeepMixtral-8x7b-Instruct. Support call DeepMixtral-8x7b-Instruct model through api, including Node.js, Python, http.
DeepMixtral-8x7b-Instruct huggingface.co is an online trial and call api platform, which integrates DeepMixtral-8x7b-Instruct's modeling effects, including api services, and provides a free online trial of DeepMixtral-8x7b-Instruct, you can try DeepMixtral-8x7b-Instruct online for free by clicking the link below.
QuixiAI DeepMixtral-8x7b-Instruct online free url in huggingface.co:
DeepMixtral-8x7b-Instruct is an open source model from GitHub that offers a free installation service, and any user can find DeepMixtral-8x7b-Instruct on GitHub to install. At the same time, huggingface.co provides the effect of DeepMixtral-8x7b-Instruct install, users can directly use DeepMixtral-8x7b-Instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
DeepMixtral-8x7b-Instruct install url in huggingface.co: