| | --- |
| | library_name: transformers |
| | tags: [] |
| | --- |
| | |
| | # HumanF-MarkrAI/Gukbap-Mistral-7B๐ |
| |
|
| | ## Model Details๐ |
| |
|
| | ### Model Description |
| | - **Developed by:** HumanF-MarkrAI |
| | - **Model type:** Ko-Mistral-7B |
| | - **Language(s):** Korean |
| | - **Context Length:** 8192 |
| | - **License:** cc-by-nc-4.0 |
| | - **Finetuned from model:** [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2). |
| | |
| |
|
| | ### Model Sources |
| | When training, we used `A100 40GB GPU`x4. |
| | |
| |
|
| | ### Implications๐ |
| | **Achieving Top-Level Korean Language Performance Surpassing GPT-4 Using Only Open-Source LLMs๐ฅ** |
| |
|
| | Recently, numerous state-of-the-art (SOTA) models **have leveraged data generated by private models (e.g., ChatGPT, GPT-4) for LLM training,** as seen in projects like `OpenOrca`, `Ultrafeedback`, and `OpenHermes`. |
| | However, this approach **may violate these private models' terms of service (ToS).** |
| | For instance, OpenAI's license explicitly states: **"โ ๏ธUse Limitation: Creating services that compete with OpenAI.โ ๏ธ"** |
| | This implies that using data generated by private models to create unrestricted, open LLMs is challenging. |
| |
|
| | In this context, our model is significant in that **it has been trained solely on a proprietary dataset generated through open-source models.**** Furthermore, it achieved an impressive score of **๐ฅ6.06๐ฅ** in the korean logickor evaluation, **the highest among mistral-based Korean models and the SOTA for models under 7B parameters.** |
| |
|
| | The **Gukbap-Series LLM๐** was developed using the data processing and supervised fine-tuning (SFT) methods proposed by **LIMA** and **WizardLM.** This demonstrates **โญthe potential to create unrestricted, general-purpose LLMs using datasets generated solely with open-source LLMs.โญ** |
| | <details> |
| |
|
| | <summary> ํ๊ตญ์ด๋ฒ์ </summary> |
| | |
| | **์คํ์์ค LLM๋ง์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์์ฑํ์ฌ GPT-4๋ฅผ ๋์ด ํ๊ตญ์ด ์ต๊ณ ๋ ๋ฒจ์ ๋ฌ์ฑ๐ฅ** |
| |
|
| | ์ค๋๋ ์๋ง์ ์ฌ๋ฌ SOTA ๋ชจ๋ธ๋ค์ **private model (ChatGPT, GPT4 ๋ฑ)์ ํ์ฉํ์ฌ ์์ฑํ ๋ฐ์ดํฐ๋ฅผ ํตํด LLM ํ๋ จ**์ ์งํํ๊ณ ์์ต๋๋ค. (OpenOrca, Ultrafeedback, OpenHermes ๋ฑ) |
| | ํ์ง๋ง, ์ด๋ **private model์ ์ด์ฉ ์ฝ๊ด์ ์๋ฐฐ**๋ ์๋ ์์ต๋๋ค. ๋ํ์ ์ผ๋ก OpenAI์ license์๋ ๋ค์๊ณผ ๊ฐ์ ๋ง์ด ๋ช
์๋์ด ์์ต๋๋ค: **"โ ๏ธ์ฌ์ฉ ์ ํ: OpenAI์ ๊ฒฝ์ํ๊ธฐ ์ํ ์๋น์ค๋ฅผ ๋ง๋๋ ๊ฒ.โ ๏ธ"** ์ฆ, private model์ ํตํด ๋ง๋ ๋ฐ์ดํฐ๋ก๋ ์ ์ฝ์ด ์๋ ์์ ๋ก์ด LLM์ ๋ง๋ค๊ธฐ๋ ํ๋ญ๋๋ค. |
| | |
| | ์ด๋ฌํ ๊ด์ ์์ ์ฐ๋ฆฌ ๋ชจ๋ธ์ **์ค์ง ์คํ์์ค์ ํตํด ์์ฑํ ์์ฒด ๋ฐ์ดํฐ์
๋ก ํ์ตํ๋ค๋ ๊ฒ**์ ํฐ ์์๊ฐ ์์ต๋๋ค. ๋ํ ํ๊ตญ์ด logickor ์์ฒด ํ๊ฐ์์ **๐ฅ6.06์ ๐ฅ**์ด๋ผ๋ ๊ณ ๋์ ์ ๋ฌ์ฑํ์๊ณ , ์ด๋ **mistral ๊ธฐ๋ฐ ํ๊ตญ์ด ๋ชจ๋ธ ์ค ๊ฐ์ฅ ๋์ ์ฑ๋ฅ์ด์ <7B ๋ชจ๋ธ ์ค SOTA**์
๋๋ค. |
| | |
| | **Gukbap-Series LLM๐**์ **LIMA**์ **WizardLM**์์ ์ ์ํ ๋ฐ์ดํฐ ๊ฐ๊ณต ๋ฐ SFT ํ๋ จ ๋ฐฉ๋ฒ์ ํตํด ์ ์๋์์ผ๋ฉฐ, **โญ์คํ์์ค LLM๋ง์ผ๋ก ๋ฐ์ดํฐ์
์ ๋ง๋ค์ด์ ์ ์ฝ์ด ์๋ ์์ฒด general LLM์ ๋ง๋ค ์ ์๋ค๋ ๊ฐ๋ฅ์ฑโญ**์ ๋ณด์ฌ์ค๋๋ค. |
| | </details> |
| | |
| |
|
| | ### Training Method (SFT) |
| | The following papers contain the foundational methodologies for the dataset and training methods we are currently proceeding. |
| |
|
| | - [LIMA](https://arxiv.org/abs/2305.11206). |
| | - [WizardLM](https://arxiv.org/abs/2304.12244). |
| | - [Near Dedup](https://arxiv.org/abs/2304.12244). |
| |
|
| |
|
| | ### SFT Datasets (Private) |
| | When we made the `Open-Source based dataset`, we use `microsoft/WizardLM-2-8x22B` through [DeepInfra](https://deepinfra.com/). |
| | Our datasets are made by `Evolving system`, which is propsed by [WizardLM](https://wizardlm.github.io/WizardLM2/). |
| | In training, we used 1849 training dataset, and 200 validation dataset. |
| | |
| | - **Wizard-Korea-Datasets:** [MarkrAI/Markr_WizardLM_train_ver4](https://huggingface.co/datasets/MarkrAI/Markr_WizardLM_train_ver4). |
| | - **Wizard-Korea-Valid:** [WizardLM_Evol_valid](https://huggingface.co/datasets/MarkrAI/WizardLM_Evol_valid). |
| | > Validation loss (epoch 2; Learning rate: 4e-6): 0.5831 |
| | |
| |
|
| | ### Benchmark Score (Zero-shot) |
| |
|
| | We internally evaluated [LogicKor](https://github.com/instructkr/LogicKor). |
| | We utilized [**gpt-4-1106-preview**](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4) in internal evaluation. |
| | It is same manner as `Logickor-v2 eval model`. |
| | > (GPT-4o occasionally makes errors when grading. For example, it sometimes assigns a score of 0 for English responses to questions that were supposed to be answered in English.) |
| |
|
| | | Model | ์ถ๋ก | ์ํ | ๊ธ์ฐ๊ธฐ | ์ฝ๋ฉ | ์ดํด | ๋ฌธ๋ฒ | **์ฑ๊ธํด** | **๋ฉํฐํด** | **Overall** | |
| | |:---------:|:-----:|:------:|:-----:|:-----:|:----:|:-----:|:-----:|:-----:|:----:| |
| | | [OpenAI/gpt-4o-2024-05-13](https://lk.instruct.kr/832k1b3wb3x00e4?file=default_xwfHncVI2v.jsonl) | 9.50 | 8.71 | 9.42 | 9.21 | 9.71 | 9.42 | 9.42 | 9.23 | 9.33 | |
| | | [Anthropic/clauide-3-5-sonnet-20240620](https://lk.instruct.kr/rf8n4j9h6vg1bq7?file=1_shot_R6talIb9Cq.jsonl) | 8.64 | 8.42 | 9.85 | 9.78 | 9.92 | 9.21 | 9.26 | 9.35 | 9.30 | |
| | | [google/gemini-1.5-pro-001](https://lk.instruct.kr/d54q3zaydbamaos?file=default_zE0CfbdTR3.jsonl) | 9.07 | 8.57 | 9.57 | 9.78 | 9.57 | 9.21 | 9.40 | 9.19 | 9.23 | |
| | |----|----|----|----|----|----|----|----|----|----| |
| | | **Gukbap-Mistral-7B๐** | 4.43 | 3.00 | **9.36** | **7.43** | **8.21** | 3.93 | **6.40** | **5.71** | **6.06** | |
| | | [NousResearch/Nous-Hermes-2-Mistral-7B-DPO](https://lk.instruct.kr/jov5b9lvkqiewb7?file=default_JapDjfQn3c.jsonl) | **6.00** | **3.28** | 6.92 | 7.00 | 5.42 | **4.42** | 5.45 | 5.57 | 5.51 | |
| | | [maywell/Synatra-7B-v0.3-dpo](https://lk.instruct.kr/085mpj2mf2vf2ng?file=default_91pg27Bn5n.jsonl) | 5.57 | 2.50 | 5.00 | 6.50 | 6.35 | 4.28 | 5.78 | 4.28 | 5.03 | |
| | | [mistralai/Mistral-7B-Instruct-v0.3](https://lk.instruct.kr/chnkf0bdr0bvzbh?file=default_Dk71SCbrkM.jsonl) | 4.42 | 3.00 | 5.50 | 6.21 | 4.57 | 3.50 | 4.76 | 4.30 | 4.53 | |
| | | [mistralai/Mistral-7B-Instruct-v0.2](https://lk.instruct.kr/mb4tez8gj01ud5t?file=default_DOb5bJDEjw.jsonl) | 5.14 | 1.35 | 5.28 | 4.92 | 5.71 | 1.07 | 3.71 | 4.11 | 3.91 | |
| | |
| | If you want to check model's output, please see our [โญanswerโญ](https://huggingface.co/HumanF-MarkrAI/Gukbap-Mistral-7B/blob/main/Gukbap-Mistral-7B_0.jsonl) file!! |
| | |
| |
|
| | ### Benchmark Comparison about 3 Prompt Strategy |
| |
|
| | | Model (type) | ์ถ๋ก | ์ํ | ๊ธ์ฐ๊ธฐ | ์ฝ๋ฉ | ์ดํด | ๋ฌธ๋ฒ | **์ฑ๊ธํด** | **๋ฉํฐํด** | **Overall** | |
| | |:---------:|:-----:|:------:|:-----:|:-----:|:----:|:-----:|:-----:|:-----:|:----:| |
| | | Gukbap-Mistral-7B๐ (cot-1-shot) | 5.50 | 2.57 | **8.57** | **8.57** | 7.79 | 3.57 | 6.69 | 5.50 | 6.10 | |
| | | **Gukbap-Mistral-7B๐ (1-shot)** | **5.50** | **4.50** | 8.50 | 8.29 | **8.29** | **4.50** | **7.31** | **5.88** | **6.60** | |
| | | Gukbap-Mistral-7B๐ (0-shot) | 4.43 | 3.00 | 9.36 | 7.43 | 8.21 | 3.93 | 6.40 | 5.71 | 6.06 | |
| | |
| | You can find the prompt strategy through logickor [templates](https://github.com/instructkr/LogicKor/blob/main/templates.py#L1). |
| |
|
| |
|
| | ### Benchmark Code |
| | Our code based on maywell's [Logickor code](https://github.com/instructkr/LogicKor). |
| | We followed maywell's evaluation method such as `judge_template`, `prompt`, etc. |
| |
|
| |
|
| | ### Chat Prompt |
| | ```yaml |
| | [INST] Hello! My favorite food is Gukbap๐! [/INST](model answer) |
| | ``` |
| |
|
| | ### Gukbap-Series models๐๐ |
| | - [Gukbap-Qwen-7B๐](https://huggingface.co/HumanF-MarkrAI/Gukbap-Qwen2-7B) |
| | - [Gukbap-Gemma-9B๐](https://huggingface.co/HumanF-MarkrAI/Gukbap-Gemma2-9B) |
| |
|
| |
|
| | ### BibTeX |
| | ``` |
| | @article{HumanF-MarkrAI, |
| | title={Gukbap-Mistral-7B}, |
| | author={MarkrAI}, |
| | year={2024}, |
| | url={https://huggingface.co/HumanF-MarkrAI} |
| | } |
| | ``` |