File size: 3,354 Bytes
92b5c28
 
 
 
 
 
 
 
 
 
 
45bf756
52fd47d
 
 
 
 
 
 
 
 
acf66e6
92b5c28
 
bbe41db
 
 
c464b2a
92b5c28
 
 
 
 
 
 
 
52fd47d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62257b4
52fd47d
 
 
 
 
 
 
 
92b5c28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
license: apache-2.0
tags:
- moe
- merge
- mergekit
- lazymergekit
- BEE-spoke-data/smol_llama-220M-openhermes
- BEE-spoke-data/beecoder-220M-python
- BEE-spoke-data/zephyr-220m-sft-full
- BEE-spoke-data/zephyr-220m-dpo-full
- text-generation
datasets:
- JeanKaddour/minipile
- pszemraj/simple_wikipedia_LM
- mattymchen/refinedweb-3m
- HuggingFaceH4/ultrachat_200k
- teknium/openhermes
- HuggingFaceH4/ultrafeedback_binarized
- EleutherAI/proof-pile-2
- bigcode/the-stack-smol-xl
pipeline_tag: text-generation
---

🌟 Buying me coffee is a direct way to show support for this project. 
<a href="https://www.buymeacoffee.com/isotonic"><img src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" alt=""></a>


# smol_llama-4x220M-MoE

smol_llama-4x220M-MoE is a Mixure of Experts (MoE) made with the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
* [BEE-spoke-data/smol_llama-220M-openhermes](https://huggingface.co/BEE-spoke-data/smol_llama-220M-openhermes)
* [BEE-spoke-data/beecoder-220M-python](https://huggingface.co/BEE-spoke-data/beecoder-220M-python)
* [BEE-spoke-data/zephyr-220m-sft-full](https://huggingface.co/BEE-spoke-data/zephyr-220m-sft-full)
* [BEE-spoke-data/zephyr-220m-dpo-full](https://huggingface.co/BEE-spoke-data/zephyr-220m-dpo-full)

## 💻 Usage

```python
!pip install -qU transformers bitsandbytes accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "Isotonic/smol_llama-4x220M-MoE"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    model_kwargs={"torch_dtype": torch.bfloat16},
)

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

## 🧩 Configuration

```yamlbase_model: BEE-spoke-data/smol_llama-220M-openhermes
experts:
  - source_model: BEE-spoke-data/smol_llama-220M-openhermes
    positive_prompts:
    - "reasoning"
    - "logic"
    - "problem-solving"
    - "critical thinking"
    - "analysis"
    - "synthesis"
    - "evaluation"
    - "decision-making"
    - "judgment"
    - "insight"

  - source_model: BEE-spoke-data/beecoder-220M-python
    positive_prompts:
    - "program"
    - "software"
    - "develop"
    - "build"
    - "create"
    - "design"
    - "implement"
    - "debug"
    - "test"
    - "code"
    - "python"
    - "programming"
    - "algorithm"
    - "function"

  - source_model: BEE-spoke-data/zephyr-220m-sft-full
    positive_prompts:
    - "storytelling"
    - "narrative"
    - "fiction"
    - "creative writing"
    - "plot"
    - "characters"
    - "dialogue"
    - "setting"
    - "emotion"
    - "imagination"
    - "scene"
    - "story"
    - "character"
    
  - source_model: BEE-spoke-data/zephyr-220m-dpo-full
    positive_prompts:
    - "chat"
    - "conversation"
    - "dialogue"
    - "discuss"
    - "ask questions"
    - "share thoughts"
    - "explore ideas"
    - "learn new things"
    - "personal assistant"
    - "friendly helper"
```