Update README.md
Browse files
README.md
CHANGED
@@ -9,6 +9,15 @@ tags:
|
|
9 |
- BEE-spoke-data/beecoder-220M-python
|
10 |
- BEE-spoke-data/zephyr-220m-sft-full
|
11 |
- BEE-spoke-data/zephyr-220m-dpo-full
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
---
|
13 |
|
14 |
# smol_llama-4x220M-MoE
|
@@ -19,6 +28,30 @@ smol_llama-4x220M-MoE is a Mixure of Experts (MoE) made with the following model
|
|
19 |
* [BEE-spoke-data/zephyr-220m-sft-full](https://huggingface.co/BEE-spoke-data/zephyr-220m-sft-full)
|
20 |
* [BEE-spoke-data/zephyr-220m-dpo-full](https://huggingface.co/BEE-spoke-data/zephyr-220m-dpo-full)
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
## 🧩 Configuration
|
23 |
|
24 |
```yamlbase_model: BEE-spoke-data/smol_llama-220M-openhermes
|
@@ -81,28 +114,4 @@ experts:
|
|
81 |
- "learn new things"
|
82 |
- "personal assistant"
|
83 |
- "friendly helper"
|
84 |
-
```
|
85 |
-
|
86 |
-
## 💻 Usage
|
87 |
-
|
88 |
-
```python
|
89 |
-
!pip install -qU transformers bitsandbytes accelerate
|
90 |
-
|
91 |
-
from transformers import AutoTokenizer
|
92 |
-
import transformers
|
93 |
-
import torch
|
94 |
-
|
95 |
-
model = "Isotonic/smol_llama-4x220M-MoE"
|
96 |
-
|
97 |
-
tokenizer = AutoTokenizer.from_pretrained(model)
|
98 |
-
pipeline = transformers.pipeline(
|
99 |
-
"text-generation",
|
100 |
-
model=model,
|
101 |
-
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
102 |
-
)
|
103 |
-
|
104 |
-
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
105 |
-
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
106 |
-
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
107 |
-
print(outputs[0]["generated_text"])
|
108 |
```
|
|
|
9 |
- BEE-spoke-data/beecoder-220M-python
|
10 |
- BEE-spoke-data/zephyr-220m-sft-full
|
11 |
- BEE-spoke-data/zephyr-220m-dpo-full
|
12 |
+
datasets:
|
13 |
+
- JeanKaddour/minipile
|
14 |
+
- pszemraj/simple_wikipedia_LM
|
15 |
+
- mattymchen/refinedweb-3m
|
16 |
+
- HuggingFaceH4/ultrachat_200k
|
17 |
+
- teknium/openhermes
|
18 |
+
- HuggingFaceH4/ultrafeedback_binarized
|
19 |
+
- EleutherAI/proof-pile-2
|
20 |
+
- bigcode/the-stack-smol-xl
|
21 |
---
|
22 |
|
23 |
# smol_llama-4x220M-MoE
|
|
|
28 |
* [BEE-spoke-data/zephyr-220m-sft-full](https://huggingface.co/BEE-spoke-data/zephyr-220m-sft-full)
|
29 |
* [BEE-spoke-data/zephyr-220m-dpo-full](https://huggingface.co/BEE-spoke-data/zephyr-220m-dpo-full)
|
30 |
|
31 |
+
## 💻 Usage
|
32 |
+
|
33 |
+
```python
|
34 |
+
!pip install -qU transformers bitsandbytes accelerate
|
35 |
+
|
36 |
+
from transformers import AutoTokenizer
|
37 |
+
import transformers
|
38 |
+
import torch
|
39 |
+
|
40 |
+
model = "Isotonic/smol_llama-4x220M-MoE"
|
41 |
+
|
42 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
43 |
+
pipeline = transformers.pipeline(
|
44 |
+
"text-generation",
|
45 |
+
model=model,
|
46 |
+
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
47 |
+
)
|
48 |
+
|
49 |
+
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
50 |
+
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
51 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
52 |
+
print(outputs[0]["generated_text"])
|
53 |
+
```
|
54 |
+
|
55 |
## 🧩 Configuration
|
56 |
|
57 |
```yamlbase_model: BEE-spoke-data/smol_llama-220M-openhermes
|
|
|
114 |
- "learn new things"
|
115 |
- "personal assistant"
|
116 |
- "friendly helper"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
```
|