Update README.md
Browse files
README.md
CHANGED
|
@@ -3,12 +3,150 @@ base_model: FuseAI/FuseChat-Llama-3.1-8B-Instruct
|
|
| 3 |
tags:
|
| 4 |
- llama-cpp
|
| 5 |
- gguf-my-repo
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
# Triangle104/FuseChat-Llama-3.1-8B-Instruct-Q8_0-GGUF
|
| 9 |
This model was converted to GGUF format from [`FuseAI/FuseChat-Llama-3.1-8B-Instruct`](https://huggingface.co/FuseAI/FuseChat-Llama-3.1-8B-Instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 10 |
Refer to the [original model card](https://huggingface.co/FuseAI/FuseChat-Llama-3.1-8B-Instruct) for more details on the model.
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
## Use with llama.cpp
|
| 13 |
Install llama.cpp through brew (works on Mac and Linux)
|
| 14 |
|
|
@@ -47,4 +185,4 @@ Step 3: Run inference through the main binary.
|
|
| 47 |
or
|
| 48 |
```
|
| 49 |
./llama-server --hf-repo Triangle104/FuseChat-Llama-3.1-8B-Instruct-Q8_0-GGUF --hf-file fusechat-llama-3.1-8b-instruct-q8_0.gguf -c 2048
|
| 50 |
-
```
|
|
|
|
| 3 |
tags:
|
| 4 |
- llama-cpp
|
| 5 |
- gguf-my-repo
|
| 6 |
+
license: llama3.1
|
| 7 |
---
|
| 8 |
|
| 9 |
# Triangle104/FuseChat-Llama-3.1-8B-Instruct-Q8_0-GGUF
|
| 10 |
This model was converted to GGUF format from [`FuseAI/FuseChat-Llama-3.1-8B-Instruct`](https://huggingface.co/FuseAI/FuseChat-Llama-3.1-8B-Instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 11 |
Refer to the [original model card](https://huggingface.co/FuseAI/FuseChat-Llama-3.1-8B-Instruct) for more details on the model.
|
| 12 |
|
| 13 |
+
---
|
| 14 |
+
Model details:
|
| 15 |
+
-
|
| 16 |
+
We present FuseChat-3.0, a series of models crafted to enhance
|
| 17 |
+
performance by integrating the strengths of multiple source LLMs into
|
| 18 |
+
more compact target LLMs. To achieve this fusion, we utilized four
|
| 19 |
+
powerful source LLMs: Gemma-2-27B-It, Mistral-Large-Instruct-2407,
|
| 20 |
+
Qwen-2.5-72B-Instruct, and Llama-3.1-70B-Instruct. For the target LLMs,
|
| 21 |
+
we employed three widely-used smaller models—Llama-3.1-8B-Instruct,
|
| 22 |
+
Gemma-2-9B-It, and Qwen-2.5-7B-Instruct—along with two even more compact
|
| 23 |
+
models—Llama-3.2-3B-Instruct and Llama-3.2-1B-Instruct. The implicit
|
| 24 |
+
model fusion process involves a two-stage training pipeline comprising
|
| 25 |
+
Supervised Fine-Tuning (SFT) to mitigate distribution discrepancies
|
| 26 |
+
between target and source LLMs, and Direct Preference Optimization (DPO)
|
| 27 |
+
for learning preferences from multiple source LLMs. The resulting
|
| 28 |
+
FuseChat-3.0 models demonstrated substantial improvements in tasks
|
| 29 |
+
related to general conversation, instruction following, mathematics, and
|
| 30 |
+
coding. Notably, when Llama-3.1-8B-Instruct served as the target LLM,
|
| 31 |
+
our fusion approach achieved an average improvement of 6.8 points across
|
| 32 |
+
14 benchmarks. Moreover, it showed significant improvements of 37.1 and
|
| 33 |
+
30.1 points on instruction-following test sets AlpacaEval-2 and
|
| 34 |
+
Arena-Hard respectively. We have released the FuseChat-3.0 models on Huggingface, stay tuned for the forthcoming dataset and code.
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
Overview
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Combining the strengths of multiple large language models (LLMs)
|
| 48 |
+
represents a promising approach to enhance individual model
|
| 49 |
+
capabilities. Model fusion is a technique that integrates the strengths
|
| 50 |
+
of robust source LLMs into a target LLM.
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
Previous iterations of the FuseChat
|
| 54 |
+
series employed probabilistic distribution matrices generated by source
|
| 55 |
+
models to transfer knowledge to target models. We refer to this method
|
| 56 |
+
as explicit model fusion (EMF) because it involves a
|
| 57 |
+
well-defined knowledge transfer process. While applicable to models with
|
| 58 |
+
varying architectures and sizes, and without increasing memory overhead
|
| 59 |
+
during inference, this approach presents notable challenges such as
|
| 60 |
+
vocabulary alignment and the merging of distribution matrices from
|
| 61 |
+
different LLMs. These issues complicate model fusion, reduce its
|
| 62 |
+
efficiency, and may introduce noise and errors and affect the fusion
|
| 63 |
+
results.
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
FuseChat-3.0, however, takes a different approach by enhancing a
|
| 67 |
+
single LLM through implicit learning from robust open-source LLMs, a
|
| 68 |
+
process we term implicit model fusion (IMF). The
|
| 69 |
+
concept of IMF has been widely utilized to improve the performance of
|
| 70 |
+
weaker models. For instance, a weak model can be boosted through
|
| 71 |
+
fine-tuning with outputs from stronger LLMs. Moreover, a reward model
|
| 72 |
+
can be trained using outputs from various LLMs, enabling it to learn and
|
| 73 |
+
capture the differences in capabilities between the LLMs. Zephyr
|
| 74 |
+
further collects responses from multiple LLMs and ranks them with GPT-4
|
| 75 |
+
to obtain preference data for training the policy. Inspired by recent
|
| 76 |
+
alignment techniques, we propose an IMF method to transfer the
|
| 77 |
+
capabilities of source LLMs to a target LLM through preference
|
| 78 |
+
optimization.
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
Our IMF method follows a three-stage process aimed at effectively
|
| 82 |
+
transferring capabilities from source LLMs to a target LLM. First,
|
| 83 |
+
during dataset construction, we sample N responses from
|
| 84 |
+
each of the source LLMs and annotate these responses using an external
|
| 85 |
+
reward model. Second, in the supervised fine-tuning (SFT)
|
| 86 |
+
stage, we fine-tune the target model using the best responses, which
|
| 87 |
+
not only enhances the target model's capabilities but also helps
|
| 88 |
+
mitigate the distributional gap between the source and target models.
|
| 89 |
+
Finally, in the direct preference optimization (DPO)
|
| 90 |
+
stage, we optimize the target model by using the best and worst
|
| 91 |
+
responses from the source models as preference pairs, further enhancing
|
| 92 |
+
the target model's performance. The complete pipeline will be detailed
|
| 93 |
+
in the following paragraph.
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
Dataset
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
Prompt Selection
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
Our datasets were designed to enhance model's instruction following,
|
| 117 |
+
general conversation, mathematics, coding, and Chinese-language
|
| 118 |
+
capabilities. We selected data from open-source community datasets,
|
| 119 |
+
applying targeted filtering and preprocessing. Key datasets and
|
| 120 |
+
filtering criteria included:
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
Instruction Following & General Conversation: Sourced from UltraFeedback, Magpie-Pro-DPO-100K-v0.1, and HelpSteer2, excluding code and math data.
|
| 124 |
+
Mathematics: Selected from OpenMathInstruct-2, with nearly 60,000 unique samples.
|
| 125 |
+
Coding: Curated from leetcode and self-oss-instruct-sc2-exec-filter-50k, retaining prompts with test cases.
|
| 126 |
+
Chinese Language: Integrated alpaca_gpt4_zh and Magpie-Qwen2-Pro-200K-Chinese, filtering out code and math prompts to retain approximately 10,000 high-quality samples.
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
Response Sampling
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
For each dataset's prompts, we synthesized responses mainly from four different series of source models, specifically Gemma-2-27b-It, Mistral-Large-Instruct-2407, Qwen-2.5-72B-Instruct, and Llama-3.1-70B-Instruct.
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
Instruction Following & General Conversation: We sampled each prompt five times from all the source models.
|
| 143 |
+
Mathematics: We retained the responses generated by
|
| 144 |
+
Llama-3.1-405B-Instruct from the original dataset (OpenMathInstruct-2)
|
| 145 |
+
and additionally sampled responses using Qwen-2.5-Math-72B-Instruct.
|
| 146 |
+
Coding: We sampled each prompt eight times for all source models.
|
| 147 |
+
Chinese Language: We included single response sampled exclusively from Qwen-2.5-72B-Instruct.
|
| 148 |
+
|
| 149 |
+
---
|
| 150 |
## Use with llama.cpp
|
| 151 |
Install llama.cpp through brew (works on Mac and Linux)
|
| 152 |
|
|
|
|
| 185 |
or
|
| 186 |
```
|
| 187 |
./llama-server --hf-repo Triangle104/FuseChat-Llama-3.1-8B-Instruct-Q8_0-GGUF --hf-file fusechat-llama-3.1-8b-instruct-q8_0.gguf -c 2048
|
| 188 |
+
```
|