Mixture of Experts
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
| 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](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing): | |
| * [allenai/Olmo-3-7B](https://huggingface.co/allenai/Olmo-3-7B) | |
| * [allenai/Olmo-3-7B-Instruct](https://huggingface.co/allenai/Olmo-3-7B-Instruct) | |
| * [allenai/Olmo-3-7B-Think](https://huggingface.co/allenai/Olmo-3-7B-Think) | |
| * [allenai/Olmo-3-7B-Think-SFT](https://huggingface.co/allenai/Olmo-3-7B-Think-SFT) | |
| * [allenai/Olmo-3-7B-Think-DPO](https://huggingface.co/allenai/Olmo-3-7B-Think-DPO) | |
| * [allenai/Olmo-3-7B-RL-Zero-IF](https://huggingface.co/allenai/Olmo-3-7B-RL-Zero-IF) | |
| * [allenai/Olmo-3-7B-RL-Zero-Math](https://huggingface.co/allenai/Olmo-3-7B-RL-Zero-Math) | |
| * [allenai/Olmo-3-7B-RL-Zero-Code](https://huggingface.co/allenai/Olmo-3-7B-RL-Zero-Code) | |
| * [allenai/Olmo-3-7B-RL-Zero-Mix](https://huggingface.co/allenai/Olmo-3-7B-RL-Zero-Mix) | |
| ## 🧩 Configuration | |
| ```yaml | |
| 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 | |
| ```python | |
| !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"]) | |
| ``` |