Skyro-4X8B / README.md
saucam's picture
Update README.md
3fd6cbf verified
|
raw
history blame
2.56 kB
metadata
tags:
  - merge
  - mergekit
  - moe
  - frankenmoe
  - abacusai/Llama-3-Smaug-8B
  - cognitivecomputations/dolphin-2.9-llama3-8b
  - Weyaxi/Einstein-v6.1-Llama3-8B
  - dreamgen-preview/opus-v1.2-llama-3-8b-base-run3.4-epoch2
base_model:
  - abacusai/Llama-3-Smaug-8B
  - cognitivecomputations/dolphin-2.9-llama3-8b
  - Weyaxi/Einstein-v6.1-Llama3-8B
  - dreamgen-preview/opus-v1.2-llama-3-8b-base-run3.4-epoch2

Skyro-4X8B

Skyro-4X8B is a Mixure of Experts (MoE) made with the following models using Mergekit:

🧩 Configuration

base_model: meta-llama/Meta-Llama-3-8B
gate_mode: hidden
experts:
  - source_model: abacusai/Llama-3-Smaug-8B
    positive_prompts:
    - "chat"
    - "assistant"
    - "tell me"
    - "explain"
    - "I want"
  - source_model: cognitivecomputations/dolphin-2.9-llama3-8b
    positive_prompts:
    - "math"
    - "mathematics"
    - "code"
    - "engineering"
    - "solve"
    - "logic"
    - "rationality"
    - "puzzle"
    - "solve"
  - source_model: Weyaxi/Einstein-v6.1-Llama3-8B
    positive_prompts:
    - "science"
    - "medical"
    - "physics"
    - "engineering"
    - "math"
    - "logic"
    - "rationality"
    - "mathematics"
    - "solve"
  - source_model: dreamgen-preview/opus-v1.2-llama-3-8b-base-run3.4-epoch2
    positive_prompts:
    - "story"
    - "roleplay"
    - "role-play"
    - "storywriting"
    - "character"
    - "narrative"
    - "creative"

💻 Usage

!pip install -qU transformers accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "saucam/Skyro-4X8B"
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"])