Update README.md
Browse files
README.md
CHANGED
@@ -13,65 +13,3 @@ base_model:
|
|
13 |
- ai4bharat/Airavata
|
14 |
library_name: transformers
|
15 |
---
|
16 |
-
|
17 |
-
# Hixtral-test
|
18 |
-
|
19 |
-
Hixtral-test is a Mixure of Experts (MoE) made with the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
|
20 |
-
* [damerajee/Gaja-v1.00](https://huggingface.co/damerajee/Gaja-v1.00)
|
21 |
-
* [ai4bharat/Airavata](https://huggingface.co/ai4bharat/Airavata)
|
22 |
-
|
23 |
-
## 🧩 Configuration
|
24 |
-
|
25 |
-
```yaml
|
26 |
-
base_model: damerajee/Gaja-v1.00
|
27 |
-
gate_mode: random
|
28 |
-
dtype: float16
|
29 |
-
experts_per_token: 2
|
30 |
-
experts:
|
31 |
-
- source_model: damerajee/Gaja-v1.00
|
32 |
-
positive_prompts:
|
33 |
-
- "What are some fun activities to do in Bangalore?,Answer in hindi "
|
34 |
-
- "What is deep learning,Answer in english"
|
35 |
-
- "Talk to me about deep learning?"
|
36 |
-
- "what are the Best thing to do when travelling in India?"
|
37 |
-
negative_prompts:
|
38 |
-
- "Write a Python script to scrape data from a website."
|
39 |
-
- "Explain the key differences between Bayesian and frequentist statistics."
|
40 |
-
- "भारत में लोग अपने बड़ों के पैरों को छूते हैं जब हम उन्हें नमस्कार करते हैं, ऐसा क्यों होता है?"
|
41 |
-
- "मशीन लर्निंग कैसे आपके व्यवसाय या परियोजना को बेहतर बना सकता है?"
|
42 |
-
- source_model: ai4bharat/Airavata
|
43 |
-
positive_prompts:
|
44 |
-
- "भारत में लोग अपने बड़ों के पैरों को छूते हैं जब हम उन्हें नमस्कार करते हैं, ऐसा क्यों होता है?"
|
45 |
-
- "मशीन लर्निंग कैसे आपके व्यवसाय या परियोजना को बेहतर बना सकता है?"
|
46 |
-
- "एक आयत के लंबाई, चौड़ाई और ऊंचाई 8, 5 और 3 इकाई हैं। इस आयत का क्षेत्रफल क्या होगा?"
|
47 |
-
- "एक व्यक्ति एक साल में अपनी परिमिति का 3/5 हिस्सा चलता है। अगर वह प्रतिदिन 12 किलोमीटर चलता है, तो उसकी परिमिति क्या होगी?"
|
48 |
-
negative_prompts:
|
49 |
-
- "Write a heartfelt poem about the beauty of nature."
|
50 |
-
- "What year did World War II end?"
|
51 |
-
- "What are some fun activities to do in Seattle?,Answer in hindi "
|
52 |
-
- "What is deep learning,Answer in english"
|
53 |
-
```
|
54 |
-
|
55 |
-
## 💻 Usage
|
56 |
-
|
57 |
-
```python
|
58 |
-
!pip install -qU transformers bitsandbytes accelerate
|
59 |
-
|
60 |
-
from transformers import AutoTokenizer
|
61 |
-
import transformers
|
62 |
-
import torch
|
63 |
-
|
64 |
-
model = "damerajee/Hixtral-test"
|
65 |
-
|
66 |
-
tokenizer = AutoTokenizer.from_pretrained(model)
|
67 |
-
pipeline = transformers.pipeline(
|
68 |
-
"text-generation",
|
69 |
-
model=model,
|
70 |
-
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
|
71 |
-
)
|
72 |
-
|
73 |
-
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
|
74 |
-
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
75 |
-
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
76 |
-
print(outputs[0]["generated_text"])
|
77 |
-
```
|
|
|
13 |
- ai4bharat/Airavata
|
14 |
library_name: transformers
|
15 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|