Update README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ base_model:
|
|
| 16 |
|
| 17 |
# test_tiny_mixtral_only_router
|
| 18 |
|
| 19 |
-
test_tiny_mixtral_only_router is a Mixure of Experts (MoE) made with the following models using
|
| 20 |
* [openaccess-ai-collective/tiny-mistral](https://huggingface.co/openaccess-ai-collective/tiny-mistral)
|
| 21 |
* [openaccess-ai-collective/tiny-mistral](https://huggingface.co/openaccess-ai-collective/tiny-mistral)
|
| 22 |
* [openaccess-ai-collective/tiny-mistral](https://huggingface.co/openaccess-ai-collective/tiny-mistral)
|
|
@@ -45,27 +45,4 @@ experts:
|
|
| 45 |
positive_prompts:
|
| 46 |
- "general"
|
| 47 |
```
|
| 48 |
-
|
| 49 |
-
## 💻 Usage
|
| 50 |
-
|
| 51 |
-
```python
|
| 52 |
-
!pip install -qU transformers bitsandbytes accelerate
|
| 53 |
-
|
| 54 |
-
from transformers import AutoTokenizer
|
| 55 |
-
import transformers
|
| 56 |
-
import torch
|
| 57 |
-
|
| 58 |
-
model = "JSpergel/test_tiny_mixtral_only_router"
|
| 59 |
-
|
| 60 |
-
tokenizer = AutoTokenizer.from_pretrained(model)
|
| 61 |
-
pipeline = transformers.pipeline(
|
| 62 |
-
"text-generation",
|
| 63 |
-
model=model,
|
| 64 |
-
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
| 65 |
-
)
|
| 66 |
-
|
| 67 |
-
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
| 68 |
-
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 69 |
-
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
| 70 |
-
print(outputs[0]["generated_text"])
|
| 71 |
-
```
|
|
|
|
| 16 |
|
| 17 |
# test_tiny_mixtral_only_router
|
| 18 |
|
| 19 |
+
test_tiny_mixtral_only_router is a Mixure of Experts (MoE) made with the following models using a modified version of mergekit.
|
| 20 |
* [openaccess-ai-collective/tiny-mistral](https://huggingface.co/openaccess-ai-collective/tiny-mistral)
|
| 21 |
* [openaccess-ai-collective/tiny-mistral](https://huggingface.co/openaccess-ai-collective/tiny-mistral)
|
| 22 |
* [openaccess-ai-collective/tiny-mistral](https://huggingface.co/openaccess-ai-collective/tiny-mistral)
|
|
|
|
| 45 |
positive_prompts:
|
| 46 |
- "general"
|
| 47 |
```
|
| 48 |
+
This is a test version of arcee-ai's hidden state model. It is a router for a frankenMoE instead of the entire MoE itself
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|