jsuheb's picture
Upload folder using huggingface_hub
ac9a103 verified
metadata
license: apache-2.0
base_model:
  - allenai/Olmo-3-7B
  - allenai/Olmo-3-7B-Instruct
  - allenai/Olmo-3-7B-Think
  - allenai/Olmo-3-7B-Think-SFT
  - allenai/Olmo-3-7B-Think-DPO
  - allenai/Olmo-3-7B-RL-Zero-IF
  - allenai/Olmo-3-7B-RL-Zero-Math
  - allenai/Olmo-3-7B-RL-Zero-Code
  - allenai/Olmo-3-7B-RL-Zero-Mix
tags:
  - moe
  - frankenmoe
  - merge
  - mergekit
  - lazymergekit
  - allenai/Olmo-3-7B
  - allenai/Olmo-3-7B-Instruct
  - allenai/Olmo-3-7B-Think
  - allenai/Olmo-3-7B-Think-SFT
  - allenai/Olmo-3-7B-Think-DPO
  - allenai/Olmo-3-7B-RL-Zero-IF
  - allenai/Olmo-3-7B-RL-Zero-Math
  - allenai/Olmo-3-7B-RL-Zero-Code
  - allenai/Olmo-3-7B-RL-Zero-Mix

olmo3-7b-slerp

olmo3-7b-slerp is a Mixture of Experts (MoE) made with the following models using LazyMergekit:

🧩 Configuration

slices:
  - sources:
      - model: allenai/Olmo-3-7B
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-Instruct
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-Think
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-Think-SFT
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-Think-DPO
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-RL-Zero-IF
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-RL-Zero-Math
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-RL-Zero-Code
        layer_range: [0, 32]
      - model: allenai/Olmo-3-7B-RL-Zero-Mix
base_model: allenai/Olmo-3-7B
experts:
  - source_model: allenai/Olmo-3-7B
    weight: 0.2
  - source_model: allenai/Olmo-3-7B-Instruct
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-Think
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-Think-SFT
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-Think-DPO
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-RL-Zero-IF
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-RL-Zero-Math
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-RL-Zero-Code
    weight: 0.1
  - source_model: allenai/Olmo-3-7B-RL-Zero-Mix
    weight: 0.1
parameters:
  t:
    - filter: self_attn
      value: [0, 0.5, 0.3, 0.7, 1]
    - filter: mlp
      value: [1, 0.5, 0.7, 0.3, 0]
    - value: 0.5
merge_type: slerp
dtype: bfloat16
layer_range: [0, 32]

💻 Usage

!pip install -qU transformers bitsandbytes accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "jsuheb/olmo3-7b-slerp"

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