jsfs11 commited on
Commit
ffdd47c
1 Parent(s): f73778c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - moe
5
+ - frankenmoe
6
+ - merge
7
+ - mergekit
8
+ - lazymergekit
9
+ - Gille/StrangeMerges_32-7B-slerp
10
+ - mlabonne/AlphaMonarch-7B
11
+ base_model:
12
+ - Gille/StrangeMerges_32-7B-slerp
13
+ - mlabonne/AlphaMonarch-7B
14
+ ---
15
+
16
+ # MixtureofMerges-MoE-2x7b-v7
17
+
18
+ MixtureofMerges-MoE-2x7b-v7 is a Mixture of Experts (MoE) made with the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
19
+ * [Gille/StrangeMerges_32-7B-slerp](https://huggingface.co/Gille/StrangeMerges_32-7B-slerp)
20
+ * [mlabonne/AlphaMonarch-7B](https://huggingface.co/mlabonne/AlphaMonarch-7B)
21
+
22
+ ## 🧩 Configuration
23
+
24
+ ```yaml
25
+ base_model: Gille/StrangeMerges_32-7B-slerp
26
+ gate_mode: hidden
27
+ dtype: bfloat16
28
+ experts:
29
+ - source_model: Gille/StrangeMerges_32-7B-slerp
30
+ positive_prompts:
31
+ - "Answer this question from the ARC (Argument Reasoning Comprehension)."
32
+ - "Use common sense and logical reasoning skills."
33
+ - "What assumptions does this argument rely on?"
34
+ - "Are these assumptions valid? Explain."
35
+ - "Analyze the logical structure of this argument. Identify the premises, conclusion, and any assumptions made"
36
+ - "Identify any potential counterarguments to this position. How might someone challenge the reasoning presented?"
37
+ - "Could this be explained in a different way? Provide an alternative explanation."
38
+ - "Identify any weaknesses in this argument."
39
+ - "Does this argument contain any logical fallacies? If so, which ones?"
40
+ - "Generate a few possible continuations to this scenario."
41
+ - "Demonstrate understanding of everyday commonsense in your response."
42
+ - "Use contextual clues to determine the most likely outcome."
43
+ - "Continue this scenario, but make the writing style sound archaic and overly formal."
44
+ - "This narrative is predictable. Can you introduce an unexpected yet plausible twist?"
45
+ - "The character is angry. Continue this scenario showcasing a furious outburst."
46
+ negative_prompts:
47
+ - "misses key evidence"
48
+ - "overly general"
49
+ - "commits the fallacy of hasty generalization"
50
+ - "focuses on irrelevant details"
51
+ - "assumes information not provided"
52
+ - "relies on stereotypes"
53
+ - "repetitive phrases"
54
+ - "engages in circular reasoning"
55
+ - "overuse of the same words"
56
+ - "contradicts earlier statements - breaks the internal logic of the scenario"
57
+ - "out of character dialogue"
58
+ - "awkward phrasing - sounds unnatural"
59
+ - "doesn't match the given genre"
60
+ - source_model: mlabonne/AlphaMonarch-7B
61
+ positive_prompts:
62
+ - "Answer this question, demonstrating commonsense understanding and using any relevant general knowledge you may have."
63
+ - "Provide a concise summary of this passage, then explain why the highlighted section is essential to the main idea."
64
+ - "Read these two brief articles presenting different viewpoints on the same topic. List their key arguments and highlight where they disagree."
65
+ - "Paraphrase this statement, changing the emotional tone but keeping the core meaning intact. Example: Rephrase a worried statement in a humorous way"
66
+ - "Create a short analogy that helps illustrate the main concept of this article."
67
+ - "Explain the concept of physics to a high school student. Use analogies and examples to clarify the main ideas."
68
+ - "Calculate the answer to this math problem"
69
+ - "My mathematical capabilities are strong, allowing me to handle complex mathematical queries"
70
+ - "solve for"
71
+ - "Analyze the given data and identify any patterns or trends. What conclusions can be drawn from this information?"
72
+ - "A store sells apples at $0.50 each. If Emily buys 12 apples, how much does she need to pay?"
73
+ - "Isolate x in the following equation: 2x + 5 = 17"
74
+ - "Solve this equation and show your working."
75
+ - "Explain why you used this formula to solve the problem."
76
+ - "Attempt to divide this number by zero. Explain why this cannot be done."
77
+ negative_prompts:
78
+ - "sounds too basic"
79
+ - "understated"
80
+ - "dismisses important details"
81
+ - "avoids the question's nuance"
82
+ - "skips essential steps in the solution"
83
+ - "takes this statement too literally"
84
+ - "incorrect"
85
+ - "inaccurate"
86
+ - "assumed without proof"
87
+ - "uses jargon without explanation"
88
+ - "rushed calculation"
89
+ - "confuses mathematical concepts"
90
+ - "draws illogical conclusions"
91
+ - "circular reasoning"
92
+ ```
93
+
94
+ ## 💻 Usage
95
+
96
+ ```python
97
+ !pip install -qU transformers bitsandbytes accelerate
98
+
99
+ from transformers import AutoTokenizer
100
+ import transformers
101
+ import torch
102
+
103
+ model = "jsfs11/MixtureofMerges-MoE-2x7b-v7"
104
+
105
+ tokenizer = AutoTokenizer.from_pretrained(model)
106
+ pipeline = transformers.pipeline(
107
+ "text-generation",
108
+ model=model,
109
+ model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
110
+ )
111
+
112
+ messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
113
+ prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
114
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
115
+ print(outputs[0]["generated_text"])
116
+ ```