LoneStriker commited on
Commit
d6e61d3
1 Parent(s): f2ca433

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Medorca-2x7b-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Medorca-2x7b-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Medorca-2x7b-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Medorca-2x7b-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Medorca-2x7b-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Medorca-2x7b-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Medorca-2x7b-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Medorca-2x7b-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Medorca-2x7b-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Medorca-2x7b-Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5adc47244d850ff743298ed809993e90ff870f9cf4aa2e54dcb31e68d5049605
3
+ size 5829553280
Medorca-2x7b-Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d751c74a73b27bf305dc8f66ff087e3ff57dadc7ed453b60f51cd5cd78045ca
3
+ size 5361364096
Medorca-2x7b-Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c1a914d7e1f420fe2a1686e365b5403cf09904742eab4d76bdb45fbb5653e7c
3
+ size 4808764544
Medorca-2x7b-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e71e2a3fcb1b7e78cdab94e19ed185f07a01c8a15e3504a89d781efc3697ea8f
3
+ size 6702338784
Medorca-2x7b-Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:694c6ebd3ffc158703cc63047cdeeade03b6cef8a1e120a5ebff81b0592d66c8
3
+ size 6314627808
Medorca-2x7b-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb7d6d67c4de9b5795f437017ea65ecdfc86870a79ee3322307d7cebda40d039
3
+ size 7855380704
Medorca-2x7b-Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2af7f642471e460dcd68b04a0baba0a3b693856b23eb60e957c67d8b8461aec
3
+ size 7628101856
Medorca-2x7b-Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:893c13d7289e29840c670111f116d02ef228615fafcb81d2df5c4ed4589ec0ed
3
+ size 9080487744
Medorca-2x7b-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5772b4c3970f3c07e4707ad5a8889fe40d970e0e011516b26793ad87fbdbd4b4
3
+ size 11760703104
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - moe
5
+ - merge
6
+ - epfl-llm/meditron-7b
7
+ - microsoft/Orca-2-7b
8
+ ---
9
+
10
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63486df1f8f01fcc4b23e97d/MVYcLAR1Inm5dY-XHiAhe.png)
11
+
12
+ # Medorca-2x7b
13
+
14
+ Medorca-2x7b is a Mixure of Experts (MoE) made with the following models:
15
+ * [epfl-llm/meditron-7b](https://huggingface.co/epfl-llm/meditron-7b)
16
+ * [microsoft/Orca-2-7b](https://huggingface.co/microsoft/Orca-2-7b)
17
+
18
+ ## Evaluations
19
+
20
+ | Benchmark | Medorca-2x7b | Orca-2-7b | llama-2-7b | meditron-7b | meditron-70b |
21
+ | --- | --- | --- | --- | --- | --- |
22
+ | MedMCQA | | | | | |
23
+ | ClosedPubMedQA | | | | | |
24
+ | PubMedQA | | | | | |
25
+ | MedQA | | | | | |
26
+ | MedQA4 | | | | | |
27
+ | MedicationQA | | | | | |
28
+ | MMLU Medical | | | | | |
29
+ | MMLU | 53.3 | **56.37** | | | |
30
+ | TruthfulQA | 48.04 | **52.45** | | | |
31
+ | GSM8K | **20.64** | 14.71 | | | |
32
+ | ARC | 54.1 | 54.1 | | | |
33
+ | HellaSwag | 76.04 | **76.19** | | | |
34
+ | Winogrande | **74.51** | 73.48 | | | |
35
+
36
+ More details on the Open LLM Leaderboard evaluation results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_Technoculture__Medorca-2x7b.)
37
+
38
+ ## 🧩 Configuration
39
+
40
+ ```yaml
41
+ base_model: microsoft/Orca-2-7b
42
+ gate_mode: hidden
43
+ dtype: bfloat16
44
+ experts:
45
+ - source_model: epfl-llm/meditron-7b
46
+ positive_prompts:
47
+ - "How does sleep affect cardiovascular health?"
48
+ - "Could a plant-based diet improve arthritis symptoms?"
49
+ - "A patient comes in with symptoms of dizziness and nausea..."
50
+ - "When discussing diabetes management, the key factors to consider are..."
51
+ - "The differential diagnosis for a headache with visual aura could include..."
52
+ negative_prompts:
53
+ - "Recommend a good recipe for a vegetarian lasagna."
54
+ - "Give an overview of the French Revolution."
55
+ - "Explain how a digital camera captures an image."
56
+ - "What are the environmental impacts of deforestation?"
57
+ - "The recent advancements in artificial intelligence have led to developments in..."
58
+ - "The fundamental concepts in economics include ideas like supply and demand, which explain..."
59
+ - source_model: microsoft/Orca-2-7b
60
+ positive_prompts:
61
+ - "Here is a funny joke for you -"
62
+ - "When considering the ethical implications of artificial intelligence, one must take into account..."
63
+ - "In strategic planning, a company must analyze its strengths and weaknesses, which involves..."
64
+ - "Understanding consumer behavior in marketing requires considering factors like..."
65
+ - "The debate on climate change solutions hinges on arguments that..."
66
+ negative_prompts:
67
+ - "In discussing dietary adjustments for managing hypertension, it's crucial to emphasize..."
68
+ - "For early detection of melanoma, dermatologists recommend that patients regularly check their skin for..."
69
+ - "Explaining the importance of vaccination, a healthcare professional should highlight..."
70
+ ```
71
+
72
+ ## 💻 Usage
73
+
74
+ ```python
75
+ !pip install -qU transformers bitsandbytes accelerate
76
+
77
+ from transformers import AutoTokenizer
78
+ import transformers
79
+ import torch
80
+
81
+ model = "Technoculture/Medorca-2x7b"
82
+
83
+ tokenizer = AutoTokenizer.from_pretrained(model)
84
+ pipeline = transformers.pipeline(
85
+ "text-generation",
86
+ model=model,
87
+ model_kwargs={"torch_dtype": torch.float16},
88
+ )
89
+
90
+ messages = [{"role": "user", "content": "Why am i feeling so tired this month?"}]
91
+ prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
92
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
93
+ print(outputs[0]["generated_text"])
94
+ ```
huggingface-metadata.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ url: https://huggingface.co/Technoculture/Medorca-2x7b
2
+ branch: main
3
+ download date: 2024-01-22 10:17:21
4
+ sha256sum:
5
+ b7312033024738baff24be5c914396422b027380cc3cbc44cb6c0eb62b74cf94 model-00001-of-00002.safetensors
6
+ f1c840e1ed0c60c73ab21953cf450dee5362a2412db3411fdae858d649d08261 model-00001-of-00003.safetensors
7
+ 89ae0a8853bb7c1d3029f8a3bb295d8ba70835180159f5edd840fd28d24d947a model-00002-of-00002.safetensors
8
+ ae2432a8a64091cc18c79124794cdebdef9b2d0dfe6a6d466398f53e4d77e57e model-00002-of-00003.safetensors
9
+ 24f8c33dd495ac7f6bb3210049edf02737817427591f78ce81257a78abad30bc model-00003-of-00003.safetensors
10
+ 9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347 tokenizer.model
mergekit_config.yml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ slices:
3
+ - sources:
4
+ - model: epfl-llm/meditron-7b
5
+ layer_range: [0, 32]
6
+ - model: microsoft/Orca-2-7b
7
+ layer_range: [0, 32]
8
+ merge_method: slerp
9
+ base_model: epfl-llm/meditron-7b
10
+ parameters:
11
+ t:
12
+ - filter: self_attn
13
+ value: [0, 0.5, 0.3, 0.7, 1]
14
+ - filter: mlp
15
+ value: [1, 0.5, 0.7, 0.3, 0]
16
+ - value: 0.5 # fallback for rest of tensors
17
+ dtype: float16
mergekit_moe_config.yml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ base_model: microsoft/Orca-2-7b
3
+ gate_mode: hidden
4
+ dtype: bfloat16
5
+ experts:
6
+ - source_model: epfl-llm/meditron-7b
7
+ positive_prompts:
8
+ - "How does sleep affect cardiovascular health?"
9
+ - "Could a plant-based diet improve arthritis symptoms?"
10
+ - "A patient comes in with symptoms of dizziness and nausea..."
11
+ - "When discussing diabetes management, the key factors to consider are..."
12
+ - "The differential diagnosis for a headache with visual aura could include..."
13
+ negative_prompts:
14
+ - "Recommend a good recipe for a vegetarian lasagna."
15
+ - "Give an overview of the French Revolution."
16
+ - "Explain how a digital camera captures an image."
17
+ - "What are the environmental impacts of deforestation?"
18
+ - "The recent advancements in artificial intelligence have led to developments in..."
19
+ - "The fundamental concepts in economics include ideas like supply and demand, which explain..."
20
+ - source_model: microsoft/Orca-2-7b
21
+ positive_prompts:
22
+ - "Here is a funny joke for you -"
23
+ - "When considering the ethical implications of artificial intelligence, one must take into account..."
24
+ - "In strategic planning, a company must analyze its strengths and weaknesses, which involves..."
25
+ - "Understanding consumer behavior in marketing requires considering factors like..."
26
+ - "The debate on climate change solutions hinges on arguments that..."
27
+ negative_prompts:
28
+ - "In discussing dietary adjustments for managing hypertension, it's crucial to emphasize..."
29
+ - "For early detection of melanoma, dermatologists recommend that patients regularly check their skin for..."
30
+ - "Explaining the importance of vaccination, a healthcare professional should highlight..."