Isotonic commited on
Commit
19a1256
1 Parent(s): be37f92

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -149
README.md CHANGED
@@ -7,171 +7,138 @@ tags:
7
  - lazymergekit
8
  - Felladrin/Minueza-32M-Base
9
  - Felladrin/Minueza-32M-UltraChat
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  # Mixnueza-6x32M-MoE
13
 
14
  Mixnueza-6x32M-MoE is a Mixure of Experts (MoE) made with the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
15
- * [Felladrin/Minueza-32M-Base](https://huggingface.co/Felladrin/Minueza-32M-Base)
16
- * [Felladrin/Minueza-32M-UltraChat](https://huggingface.co/Felladrin/Minueza-32M-UltraChat)
17
- * [Felladrin/Minueza-32M-Base](https://huggingface.co/Felladrin/Minueza-32M-Base)
18
- * [Felladrin/Minueza-32M-UltraChat](https://huggingface.co/Felladrin/Minueza-32M-UltraChat)
19
- * [Felladrin/Minueza-32M-Base](https://huggingface.co/Felladrin/Minueza-32M-Base)
20
- * [Felladrin/Minueza-32M-UltraChat](https://huggingface.co/Felladrin/Minueza-32M-UltraChat)
21
 
22
- ## 🧩 Configuration
23
 
24
- ```yamlbase_model: Felladrin/Minueza-32M-UltraChat
25
- experts:
26
- - source_model: Felladrin/Minueza-32M-Base
27
- positive_prompts:
28
- - "reasoning"
29
- - "logic"
30
- - "problem-solving"
31
- - "critical thinking"
32
- - "analysis"
33
- - "synthesis"
34
- - "evaluation"
35
- - "decision-making"
36
- - "judgment"
37
- - "insight"
38
- negative_prompts:
39
- - "programming"
40
- - "storytelling"
41
- - "legal"
42
- - "finance"
43
-
44
- - source_model: Felladrin/Minueza-32M-UltraChat
45
- positive_prompts:
46
- - "program"
47
- - "software"
48
- - "develop"
49
- - "build"
50
- - "create"
51
- - "design"
52
- - "implement"
53
- - "debug"
54
- - "test"
55
- - "code"
56
- - "python"
57
- - "programming"
58
- - "function"
59
- negative_prompts:
60
- - "reasoning"
61
- - "storytelling"
62
- - "legal"
63
- - "finance"
64
-
65
- - source_model: Felladrin/Minueza-32M-Base
66
- positive_prompts:
67
- - "storytelling"
68
- - "narrative"
69
- - "fiction"
70
- - "creative writing"
71
- - "plot"
72
- - "characters"
73
- - "dialogue"
74
- - "setting"
75
- - "emotion"
76
- - "imagination"
77
- - "scene"
78
- - "story"
79
- - "character"
80
- negative_prompts:
81
- - "reasoning"
82
- - "programming"
83
- - "legal"
84
- - "finance"
85
-
86
- - source_model: Felladrin/Minueza-32M-UltraChat
87
- positive_prompts:
88
- - "chat"
89
- - "conversation"
90
- - "dialogue"
91
- - "discuss"
92
- - "share thoughts"
93
- - "explore ideas"
94
- - "personal assistant"
95
- - "friendly helper"
96
- negative_prompts:
97
- - "reasoning"
98
- - "programming"
99
- - "storytelling"
100
- - "legal"
101
- - "finance"
102
 
103
- - source_model: Felladrin/Minueza-32M-Base
104
- positive_prompts:
105
- - "law"
106
- - "legal"
107
- - "attorney"
108
- - "lawyer"
109
- - "court"
110
- - "contract"
111
- - "criminal"
112
- - "evidence"
113
- - "procedure"
114
- - "contracts"
115
- - "mergers & acquisitions"
116
- - "corporate governance"
117
- - "intellectual property"
118
- - "employment law"
119
- - "international trade"
120
- - "competition law"
121
- - "antitrust"
122
- - "litigation"
123
- - "arbitration"
124
- - "mediation"
125
- negative_prompts:
126
- - "reasoning"
127
- - "programming"
128
- - "storytelling"
129
- - "finance"
130
 
131
- - source_model: Felladrin/Minueza-32M-UltraChat
132
- positive_prompts:
133
- - "personal finance"
134
- - "budgeting"
135
- - "investing"
136
- - "retirement planning"
137
- - "debt management"
138
- - "financial education"
139
- - "financial"
140
- - "money"
141
- - "investment"
142
- - "banking"
143
- - "stock"
144
- - "bond"
145
- - "portfolio"
146
- - "risk"
147
- - "return"
148
- negative_prompts:
149
- - "reasoning"
150
- - "programming"
151
- - "storytelling"
152
- - "legal"
153
  ```
154
 
155
- ## 💻 Usage
156
 
157
  ```python
158
- !pip install -qU transformers bitsandbytes accelerate
 
 
159
 
160
- from transformers import AutoTokenizer
161
- import transformers
162
- import torch
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
 
164
- model = "Isotonic/Mixnueza-6x32M-MoE"
165
 
166
- tokenizer = AutoTokenizer.from_pretrained(model)
167
- pipeline = transformers.pipeline(
168
- "text-generation",
169
- model=model,
170
- model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
 
 
 
171
  )
172
 
173
- messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
174
- prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
175
- outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
176
- print(outputs[0]["generated_text"])
177
  ```
 
7
  - lazymergekit
8
  - Felladrin/Minueza-32M-Base
9
  - Felladrin/Minueza-32M-UltraChat
10
+ datasets:
11
+ - Skylion007/openwebtext
12
+ - c4
13
+ - wikimedia/wikipedia
14
+ - tiiuae/falcon-refinedweb
15
+ - izumi-lab/open-text-books
16
+ - togethercomputer/RedPajama-Data-V2
17
+ - databricks/databricks-dolly-15k
18
+ - euclaise/reddit-instruct-curated
19
+ - CohereForAI/aya_dataset
20
+ - HuggingFaceH4/ultrachat_200k
21
+ - Felladrin/ChatML-ultrachat_200k
22
+ pipeline_tag: text-generation
23
+ widget:
24
+ - messages:
25
+ - role: user
26
+ content: Specs of a game about trolls and warriors in a fantasy world.
27
+ - messages:
28
+ - role: user
29
+ content: Reducing waste generation is essential to...
30
+ - messages:
31
+ - role: user
32
+ content: Water, planet, resource, future
33
+ - messages:
34
+ - role: user
35
+ content: Background story of an RPG game about wizards and dragons in a sci-fi
36
+ world. The story takes place in a...
37
+ - messages:
38
+ - role: system
39
+ content: You are a career counselor. The user will provide you with an individual
40
+ looking for guidance in their professional life, and your task is to assist
41
+ them in determining what careers they are most suited for based on their skills,
42
+ interests, and experience. You should also conduct research into the various
43
+ options available, explain the job market trends in different industries, and
44
+ advice on which qualifications would be beneficial for pursuing particular fields.
45
+ - role: user
46
+ content: Heya!
47
+ - role: assistant
48
+ content: Hi! How may I help you?
49
+ - role: user
50
+ content: I am interested in developing a career in software engineering. What
51
+ would you recommend me to do?
52
+ - messages:
53
+ - role: user
54
+ content: Morning!
55
+ - role: assistant
56
+ content: Good morning! How can I help you today?
57
+ - role: user
58
+ content: Could you give me some tips for becoming a healthier person?
59
+ - messages:
60
+ - role: user
61
+ content: Write the specs of a game about mages in a fantasy world.
62
+ - messages:
63
+ - role: user
64
+ content: Tell me about the pros and cons of social media.
65
+ - messages:
66
+ - role: system
67
+ content: You are a highly knowledgeable and friendly assistant. Your goal is to
68
+ understand and respond to user inquiries with clarity. Your interactions are
69
+ always respectful, helpful, and focused on delivering the most accurate information
70
+ to the user.
71
+ - role: user
72
+ content: Hey! Got a question for you!
73
+ - role: assistant
74
+ content: Sure! What's it?
75
+ - role: user
76
+ content: What are some potential applications for quantum computing?
77
  ---
78
 
79
  # Mixnueza-6x32M-MoE
80
 
81
  Mixnueza-6x32M-MoE is a Mixure of Experts (MoE) made with the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
82
+ * 3 X [Felladrin/Minueza-32M-Base](https://huggingface.co/Felladrin/Minueza-32M-Base)
83
+ * 3 X [Felladrin/Minueza-32M-UltraChat](https://huggingface.co/Felladrin/Minueza-32M-UltraChat)
 
 
 
 
84
 
85
+ ## Recommended Prompt Format
86
 
87
+ ```
88
+ <|im_start|>system
89
+ {system_message}<|im_end|>
90
+ <|im_start|>user
91
+ {user_message}<|im_end|>
92
+ <|im_start|>assistant
93
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
+ ## Recommended Inference Parameters
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
+ ```yml
98
+ do_sample: true
99
+ temperature: 0.65
100
+ top_p: 0.55
101
+ top_k: 35
102
+ repetition_penalty: 1.176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  ```
104
 
105
+ ## Usage Example
106
 
107
  ```python
108
+ from transformers import pipeline
109
+
110
+ generate = pipeline("text-generation", "Felladrin/Minueza-32M-UltraChat")
111
 
112
+ messages = [
113
+ {
114
+ "role": "system",
115
+ "content": "You are a highly knowledgeable and friendly assistant. Your goal is to understand and respond to user inquiries with clarity. Your interactions are always respectful, helpful, and focused on delivering the most accurate information to the user.",
116
+ },
117
+ {
118
+ "role": "user",
119
+ "content": "Hey! Got a question for you!",
120
+ },
121
+ {
122
+ "role": "assistant",
123
+ "content": "Sure! What's it?",
124
+ },
125
+ {
126
+ "role": "user",
127
+ "content": "What are some potential applications for quantum computing?",
128
+ },
129
+ ]
130
 
131
+ prompt = generate.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
132
 
133
+ output = generate(
134
+ prompt,
135
+ max_new_tokens=256,
136
+ do_sample=True,
137
+ temperature=0.65,
138
+ top_k=35,
139
+ top_p=0.55,
140
+ repetition_penalty=1.176,
141
  )
142
 
143
+ print(output[0]["generated_text"])
 
 
 
144
  ```