mzbac commited on
Commit
1a6b1d0
1 Parent(s): 0cf8c58

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -0
README.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The Moe model was constructed using 4 microsoft/phi-2. Then qlora was applied to all linear layers on WizardLM_evol_instruct_70k via mlx.
2
+ The model was created using a script from https://github.com/mzbac/mlx-moe
3
+
4
+ ## Evaluation
5
+
6
+ ### MMLU
7
+
8
+ **mzbac/phi-2-2x4-hf**
9
+
10
+ | Groups |Version|Filter|n-shot|Metric|Value | |Stderr|
11
+ |------------------|-------|------|-----:|------|-----:|---|-----:|
12
+ | - humanities |N/A |none | 0|acc |0.5970|± |0.0245|
13
+ | - other |N/A |none | 0|acc |0.5760|± |0.0311|
14
+ | - social_sciences|N/A |none | 0|acc |0.6610|± |0.0284|
15
+ | - stem |N/A |none | 0|acc |0.4738|± |0.0379|
16
+
17
+ **microsoft/phi-2**
18
+
19
+ | Groups |Version|Filter|n-shot|Metric|Value | |Stderr|
20
+ |------------------|-------|------|-----:|------|-----:|---|-----:|
21
+ | - humanities |N/A |none | 0|acc |0.6026|± |0.0243|
22
+ | - other |N/A |none | 0|acc |0.5827|± |0.0310|
23
+ | - social_sciences|N/A |none | 0|acc |0.6440|± |0.0289|
24
+ | - stem |N/A |none | 0|acc |0.4721|± |0.0377|
25
+
26
+ ## Example
27
+ ```
28
+ from transformers import AutoModelForCausalLM, AutoTokenizer
29
+
30
+ model_id = "mzbac/phi-2-2x4-hf"
31
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
32
+
33
+ model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
34
+
35
+ text = "Instruct: how backpropagation works.\nOutput:"
36
+ inputs = tokenizer(text, return_tensors="pt")
37
+
38
+ outputs = model.generate(**inputs, max_new_tokens=20)
39
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
40
+
41
+ ```