CoolFace
Modelpublic

mlabonne/Zebrafish-7B

sourceHugging Facecc-by-nc-4.0updated 2y agoView on Hugging Face
14likes72downloads
Model Card

Zebrafish-7B

Zebrafish-7B is my first model using the new merge method called Model Stock.

Zebrafish-7B is a merge of the following models using LazyMergekit:

Special thanks to Charles Goddard for the quick implementation!

🏆 Evaluation

Nous

ModelAverageAGIEvalGPT4AllTruthfulQABigbench
mlabonne/AlphaMonarch-7B 📄62.7445.3777.0178.3950.2
**mlabonne/Zebrafish-7B** 📄62.4144.9277.1878.2549.28
mlabonne/Beyonder-4x7B-v3 📄61.9145.8576.6774.9850.12
mlabonne/NeuralBeagle14-7B 📄60.2546.0676.7770.3247.86
mistralai/Mistral-7B-Instruct-v0.2 📄54.8138.571.6466.8242.29

🧩 Configuration

yaml
models:
  - model: mistralai/Mistral-7B-v0.1
  - model: liminerity/M7-7b
  - model: rwitz/experiment26-truthy-iter-0
merge_method: model_stock
base_model: mistralai/Mistral-7B-v0.1
dtype: bfloat16

💻 Usage

python
!pip install -qU transformers accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "mlabonne/Zebrafish-7B"
messages = [{"role": "user", "content": "What is a large language model?"}]

tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    torch_dtype=torch.float16,
    device_map="auto",
)

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"])