Upload folder using huggingface_hub (#1)
Browse files- 8e0a11b2a9def2c4e65a65939799d321285fa8f1348b5cf2b3729d65b4191919 (c11e9deffb004a0c7f21dfdfda8bccae83908f48)
- 806e2563c918196ef2c9e5902ff120a62771e3f45f839b690bb9216ab7fa00e9 (467e4e2d2301f48777ac3ea78f3d3acc9bd3d0fb)
- 603dea7f00d6775ab5723e7eeea087b12d42664c67264cb87f7195c921830cda (0b54838a40f40a3d17354a6d2342e9bd2101d8f1)
- 68dc3d011b1f96aebbcb794058d7dbdce09d0883cb03447b5ced2d946cf7a01f (02684d1ac53dd7789609b3a967d2ecb413a6e164)
- fe39214fb22a48d23bcf5b65a0bf18dbf57766d26e61289d87c2b898e357fb23 (7752e9ecc5100b4f0a507b04462e51beae2ee4b0)
- 87aa02d6b9fa3fbd02c277018f32c5de1bc02cc1e3a965c2107de5e3341199bd (bc1a9b107bedfd66172781d1470754de19db56ce)
- .gitattributes +5 -0
- README.md +104 -0
- merlinite-7b_Q3_K_M.gguf +3 -0
- merlinite-7b_Q4_K_M.gguf +3 -0
- merlinite-7b_Q5_K_M.gguf +3 -0
- merlinite-7b_Q6_K.gguf +3 -0
- merlinite-7b_Q8_0.gguf +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,8 @@ 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 |
+
merlinite-7b_Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
37 |
+
merlinite-7b_Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
38 |
+
merlinite-7b_Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
39 |
+
merlinite-7b_Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
40 |
+
merlinite-7b_Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
pipeline_tag: text-generation
|
4 |
+
tags:
|
5 |
+
- merlinite
|
6 |
+
- mistral
|
7 |
+
- ibm
|
8 |
+
- lab
|
9 |
+
- labrador
|
10 |
+
- labradorite
|
11 |
+
license: apache-2.0
|
12 |
+
language:
|
13 |
+
- en
|
14 |
+
base_model: mistralai/Mistral-7B-v0.1
|
15 |
+
---
|
16 |
+
|
17 |
+
🔥 Paper coming soon...
|
18 |
+
|
19 |
+
# Model Card for Merlinite 7b
|
20 |
+
|
21 |
+
### Overview
|
22 |
+
|
23 |
+
![Screenshot 2024-02-22 at 11.26.13 AM.png](Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a/Screenshot_2024-02-22_at_11.26.13_AM.png)
|
24 |
+
|
25 |
+
### Performance
|
26 |
+
|
27 |
+
| Model | Alignment | Base | Teacher | MTBench (Avg) * | MMLU(5-shot) | ARC-C(25-shot) | HellaSwag(10-shot) | Winogrande(5-shot) | GSM8K(5-shot- strict) |
|
28 |
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
29 |
+
| [Llama-2-13b-chat-hf](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) | RLHF | Llama-2-13b | Human Annotators | 6.65 | 54.58 | 59.81 | 82.52 | 75.93 | 34.80 |
|
30 |
+
| [Orca-2-13b](https://huggingface.co/microsoft/Orca-2-13b) | Progressive Training | Llama-2-13b | GPT-4 | 6.15 | 60.37 * | 59.73 | 79.86 | 78.22 | 48.22 |
|
31 |
+
| [WizardLM-13B-V1.2](https://huggingface.co/WizardLM/WizardLM-13B-V1.2) | Evol-Instruct | Llama-2-13b | GPT-4 | 7.20 | 54.83 | 60.24 | 82.62 | 76.40 | 43.75 |
|
32 |
+
| [Labradorite-13b](https://huggingface.co/ibm/labradorite-13b) | Large-scale Alignment for chatBots (LAB) | Llama-2-13b | Mixtral-8x7B-Instruct | 7.23 | 58.89 | 61.69 | 83.15 | 79.56 | 40.11 |
|
33 |
+
| [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) | SFT | Mistral-7B-v0.1 | - | 6.84 | 60.37 | 63.65 | 84.76 | 76.80 | 41.85 |
|
34 |
+
| [zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) | SFT/DPO | Mistral-7B-v0.1 | GPT-4 | 7.34 | 61.07 | 63.74 | 84.19 | 78.06 | 34.04 |
|
35 |
+
| Merlinite-7b | Large-scale Alignment for chatBots (LAB) | Mistral-7B-v0.1 | Mixtral-8x7B-Instruct | 7.66 | 64.88 | 63.99 | 84.37 | 78.24 | 44.58 |
|
36 |
+
|
37 |
+
[*] Numbers for models other than Merlinite-7b and [Labradorite-13b](https://huggingface.co/ibm/labradorite-13b) (ours) are taken from [lmsys/chatbot-arena-leaderboard](https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard)
|
38 |
+
|
39 |
+
### Method
|
40 |
+
|
41 |
+
LAB: **L**arge-scale **A**lignment for chat**B**ots is a novel synthetic data-based alignment tuning method for LLMs from IBM Research. Merlinite-7b is a Mistral-7b-derivative model trained with the LAB methodology, using Mixtral-8x7b-Instruct as a teacher model.
|
42 |
+
|
43 |
+
LAB consists of three key components:
|
44 |
+
|
45 |
+
1. Taxonomy-driven data curation process
|
46 |
+
2. Large-scale synthetic data generator
|
47 |
+
3. Two-phased-training with replay buffers
|
48 |
+
|
49 |
+
![Untitled](Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a/Untitled.png)
|
50 |
+
|
51 |
+
LAB approach allows for adding new knowledge and skills, in an incremental fashion, to an already pre-trained model without suffering from catastrophic forgetting.
|
52 |
+
|
53 |
+
Taxonomy is a tree of seed examples that are used to prompt a teacher model to generate synthetic data. Taxonomy allows the data curator or the model designer to easily specify a diverse set of the knowledge-domains and skills that they would like to include in their LLM. At a high level, these can be categorized into three high-level bins - knowledge, foundational skills, and compositional skills. The leaf nodes of the taxonomy are tasks associated with one or more seed examples.
|
54 |
+
|
55 |
+
![Untitled](Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a/Untitled%201.png)
|
56 |
+
|
57 |
+
During the synthetic data generation, **unlike previous approaches where seed examples are uniformly drawn from the entire pool (i.e. self-instruct), we use the taxonomy to drive the sampling process**: For each knowledge/skill, we only use the local examples within the leaf node as seeds to prompt the teacher model.
|
58 |
+
This makes the teacher model better exploit the task distributions defined by the local examples of each node and the diversity in the taxonomy itself ensures the entire generation covers a wide range of tasks, as illustrated below. In turns, this allows for using Mixtral 8x7B as the teacher model for generation while performing very competitively with models such as ORCA-2, WizardLM, and Zephyr Beta that rely on synthetic data generated by much larger and capable models like GPT-4.
|
59 |
+
|
60 |
+
![intuition.png](Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a/intuition.png)
|
61 |
+
|
62 |
+
For adding new domain-specific knowledge, we provide an external knowledge source (document) and prompt the model to generate questions and answers based on the document.
|
63 |
+
Foundational skills such as reasoning and compositional skills such as creative writing are generated through in-context learning using the seed examples from the taxonomy.
|
64 |
+
|
65 |
+
Additionally, to ensure the data is high-quality and safe, we employ steps to check the questions and answers to ensure that they are grounded and safe. This is done using the same teacher model that generated the data.
|
66 |
+
|
67 |
+
Our training consists of two major phases: knowledge tuning and skills tuning.
|
68 |
+
There are two steps in knowledge tuning where the first step learns simple knowledge (short samples) and the second step learns complicated knowledge (longer samples).
|
69 |
+
The second step uses replay a replay buffer with data from the first step.
|
70 |
+
Both foundational skills and compositional skills are learned during the skills tuning phases, where a replay buffer of data from the knowledge phase is used.
|
71 |
+
Importantly, we use a set of hyper-parameters for training that are very different from standard small-scale supervised fine-training: larger batch size and carefully optimized learning rate and scheduler.
|
72 |
+
|
73 |
+
![Untitled](Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a/Untitled%202.png)
|
74 |
+
|
75 |
+
## Model description
|
76 |
+
|
77 |
+
- **Language(s):** Primarily English
|
78 |
+
- **License:** Apache 2.0
|
79 |
+
- **Base model:** [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
|
80 |
+
- **Teacher Model:** [mistralai/Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1)
|
81 |
+
|
82 |
+
## Prompt Template
|
83 |
+
|
84 |
+
```python
|
85 |
+
sys_prompt = "You are an AI language model developed by IBM Research. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."
|
86 |
+
|
87 |
+
prompt = f'<|system|>\n{sys_prompt}\n<|user|>\n{inputs}\n<|assistant|>\n'
|
88 |
+
stop_token = '<|endoftext|>'
|
89 |
+
```
|
90 |
+
|
91 |
+
We advise utilizing the system prompt employed during the model's training for optimal inference performance, as there could be performance variations based on the provided instructions.
|
92 |
+
|
93 |
+
## Bias, Risks, and Limitations
|
94 |
+
|
95 |
+
Merlinite-7b has not been aligned to human preferences, so the model might produce problematic outputs. The model might also maintain the limitations and constraints that arise from the base model.
|
96 |
+
|
97 |
+
The model undergoes training on synthetic data, leading to the potential inheritance of both advantages and limitations from the underlying teacher models and data generation methods. The incorporation of safety measures during Merlinite-7b's training process is considered beneficial. However, a nuanced understanding of the associated risks requires detailed studies for more accurate quantification.
|
98 |
+
|
99 |
+
In the absence of adequate safeguards and RLHF, there exists a risk of malicious utilization of these models for generating disinformation or harmful content. Caution is urged against complete reliance on a specific language model for crucial decisions or impactful information, as preventing these models from fabricating content is not straightforward. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in ungrounded generation scenarios due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain.
|
100 |
+
|
101 |
+
***
|
102 |
+
|
103 |
+
Quantization of Model [ibm/merlinite-7b](https://huggingface.co/ibm/merlinite-7b).
|
104 |
+
Created using [llm-quantizer](https://github.com/Nold360/llm-quantizer) Pipeline
|
merlinite-7b_Q3_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:80a4323fe6bbf5a0dede706901709842cc1de1987eb84c9f742621134b844a98
|
3 |
+
size 3519027168
|
merlinite-7b_Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:37706858f5afb6eba4d13b88251064c075bd04d1ee0fd5e501a33face1091454
|
3 |
+
size 4368484576
|
merlinite-7b_Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f82c1f7d704fdc172e81996905ed6ddd671b054cba44e84efb233382fb89665c
|
3 |
+
size 5131458784
|
merlinite-7b_Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ce3df1fff5d567c328024f018fd601e5c148c194e5ae63747c569e7e891af805
|
3 |
+
size 5942118880
|
merlinite-7b_Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39de41b602afdbee25f43b5411c98548d4e4f4203c6a9ec79f805b11298c5d57
|
3 |
+
size 7695927264
|