File size: 12,642 Bytes
1f56a38
 
 
6120750
1f56a38
 
 
 
37e766b
bec6dac
6120750
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f56a38
 
f3cd32c
 
b660644
f3cd32c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50ba801
f3cd32c
 
 
 
 
 
 
 
 
 
 
 
 
 
3dfa451
f3cd32c
 
 
 
 
 
 
 
 
ce6b462
f3cd32c
 
 
 
 
 
 
 
 
 
 
 
 
c4bae8c
f3cd32c
c4bae8c
f3cd32c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b660644
d81ad24
f3cd32c
d81ad24
f3cd32c
 
 
c91172e
f3cd32c
 
 
6120750
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
---
language:
- en
license: apache-2.0
library_name: transformers
tags:
- Mixtral 8x7B
- Mistral
- merge
- moe
model-index:
- name: radiantloom-mixtral-8x7b-fusion
  results:
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: AI2 Reasoning Challenge (25-Shot)
      type: ai2_arc
      config: ARC-Challenge
      split: test
      args:
        num_few_shot: 25
    metrics:
    - type: acc_norm
      value: 63.48
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=AIGeekLabs/radiantloom-mixtral-8x7b-fusion
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: HellaSwag (10-Shot)
      type: hellaswag
      split: validation
      args:
        num_few_shot: 10
    metrics:
    - type: acc_norm
      value: 83.65
      name: normalized accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=AIGeekLabs/radiantloom-mixtral-8x7b-fusion
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: MMLU (5-Shot)
      type: cais/mmlu
      config: all
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 60.03
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=AIGeekLabs/radiantloom-mixtral-8x7b-fusion
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: TruthfulQA (0-shot)
      type: truthful_qa
      config: multiple_choice
      split: validation
      args:
        num_few_shot: 0
    metrics:
    - type: mc2
      value: 54.76
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=AIGeekLabs/radiantloom-mixtral-8x7b-fusion
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: Winogrande (5-shot)
      type: winogrande
      config: winogrande_xl
      split: validation
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 76.09
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=AIGeekLabs/radiantloom-mixtral-8x7b-fusion
      name: Open LLM Leaderboard
  - task:
      type: text-generation
      name: Text Generation
    dataset:
      name: GSM8k (5-shot)
      type: gsm8k
      config: main
      split: test
      args:
        num_few_shot: 5
    metrics:
    - type: acc
      value: 53.45
      name: accuracy
    source:
      url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=AIGeekLabs/radiantloom-mixtral-8x7b-fusion
      name: Open LLM Leaderboard
---
<img src="https://huggingface.co/aigeek0x0/radiantloom-mixtral-8x7b-fusion/resolve/main/Radiantloom-Mixtral-8x7B-Fusion.png" alt="Radiantloom Mixtral 8X7B Fusion" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>

## Radiantloom Mixtral 8X7B Fusion
The Radiantloom Mixtral 8X7B Fusion, a large language model (LLM) developed by Radiantloom AI, features approximately 47 billion parameters and employs a Mixture of Experts (MoE) architecture. With a context length of 4096 tokens, this model is suitable for commercial use.

From vibes-check evaluations, the Radiantloom Mixtral 8X7B Fusion demonstrates exceptional performance in various applications like creative writing, multi-turn conversations, in-context learning through Retrieval Augmented Generation (RAG), and coding tasks. Its out-of-the-box performance already delivers impressive results, particularly in writing tasks. This model produces longer form content and provides detailed explanations of its actions. To maximize its potential, consider implementing instruction tuning and Reinforcement Learning with Human Feedback (RLHF) techniques for further refinement. Alternatively, you can utilize it in its current form.

## Intended Uses & Limitations
The Radiantloom Mixtral 8X7B Fusion is versatile and can be utilized for various text generation tasks such as summarization, chat, coding, question answering, retrieval augmented generation (RAG), role play, and content generation.

While it may not be considered a state-of-the-art generative language model, it demonstrates competitive performance in general tasks when compared to other open and closed-source large language models such as Mixtral 8x7B Instruct v0.1, and GPT 3.5 Turbo.

This model has not undergone fine-tuning for alignment and safety. As a result, it outputs everything it knows, which may include harmful, toxic, and NSFW content. The model is fully uncensored and does not require any special prompts to change its behavior; it comes with an uncensored behavior out of the box. This uncensored nature contributes to the model's compliance with user requests. However, it is strongly advised to implement your own alignment layer before exposing the model as a service. Without such precautions, the model may be highly compliant with any requests, even those that are unethical. Keep in mind that you are responsible for any content generated using this model, so use it responsibly.

## Prompt Template
In order to leverage instruction fine-tuning, your prompt should be surrounded by [INST] and [/INST] tokens. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id.

```
<s>[INST] {user_message} [/INST]
```

## Model Usage
You can try it out for free using this [notebook](https://www.kaggle.com/metheaigeek/radiantloom-mixtral-8x7b-fusion).

For more powerful GPU usage and faster inference, you can deploy it on a Runpod GPU instance using our [one-click Runpod template](https://www.runpod.io/console/gpu-secure-cloud?ref=80eh3891&template=ch3txp7g1c) (Our Referral Link. Please consider Supporting). This template provides you with an OpenAI-compatible API endpoint that you can integrate into your existing codebase designed for OpenAI APIs. To learn more about the deployment process and API endpoint, consult the deployment guide provided [here](https://github.com/aigeek0x0/Radiantloom-Mixtral-8X7B-Fusion/blob/main/runpod-deployment-guide.md).


## Inference Code
```python

## install dependencies
## !pip install -q -U git+https://github.com/huggingface/transformers.git
## !pip install -q -U git+https://github.com/huggingface/accelerate.git
## !pip install -q -U bitsandbytes sentencepiece

## load model
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, TextStreamer

model_name = "Radiantloom/radiantloom-mixtral-8x7b-fusion"

bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_use_double_quant=True,
    bnb_4bit_compute_dtype=torch.bfloat16
)

# load the model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    quantization_config=bnb_config,
    device_map="auto",
)

tokenizer = AutoTokenizer.from_pretrained(
    model_name, 
    trust_remote_code=True
)

tokenizer.pad_token = tokenizer.eos_token

## inference
prompt = """
<s>[INST] Take a deep breath and think step-by-step.

Write a tale about a time-traveling historian who's determined to witness the most significant events in human history. [/INST]
"""

# tokenize the input string
inputs = tokenizer(
    prompt, 
    return_tensors="pt", 
    return_attention_mask=False
)

# generate text using the model
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
outputs = model.generate(**inputs, max_length=2048, streamer=streamer)

# decode and print the output
text = tokenizer.batch_decode(outputs)[0]

```

Here are a few example use cases. if we query the model with

```
<s>[INST] Compose a poem depicting an AI engineer, burning the midnight oil with dedication, to unveil a groundbreaking model to the world. [/INST]

```

the model will return

```
In the wee hours of the night, when shadows dance and whispers speak,
An AI engineer, eyes aglow with dreams to reap,
Burns the midnight oil, fueled by passion's sweet embrace,
To unveil a model, groundbreaking, full of grace.

In the sanctum of his lab, the hallowed space,
Where code and algorithms intertwine in endless race,
He breathes life into silicon, sips caffeine to stay awake,
As the stars above him wink, and planets align for his wake.

With every line of code, a story unfolds,
A tale of connections, patterns, and hidden truths untold,
And as each line is etched, the model evolves,
A living entity, born from the depths of endless folds.

Through sleepless nights and endless days,
The engineer tames the beast, the machine that obeys,
Until the model emerges, ready to take its place,
In the world, where it will change our human race.

From the realm of dreams, to the realm of reality,
A symphony of ones and zeros, birthed from the ether's sea,
A testament to mankind's ceaseless curiosity,
A beacon of hope, a monument to destiny.

So, let the midnight oil burn bright,
Let the stars guide us through this journey's flight,
For within these walls, a revolution lies,
In the heart of a dreamer, an innovator, an AI's prize.

```

and if we query the model with

```
<s>[INST] If it is true that all men are mortal and Socrates is a man, what can be concluded? [/INST]

```

the model will return

```
If it is true that all men are mortal and Socrates is a man, then it can be concluded that Socrates is mortal. The statement "all men are mortal" is a universal statement that applies to every member of the group "men." Since Socrates is a member of that group, he is also subject to the characteristic of mortality.

```

## Evaluations
We are encouraged by the initial assessments conducted using the [LLM-as-a-Judge method](https://arxiv.org/abs/2306.05685), particularly with the utilization of GPT-4. Our ongoing efforts involve a more comprehensive evaluation of the model. We have also entered this model into the HuggingFace Open Leaderboard for assessment. As we progress, we will continue to provide updates on our findings and share the results on this platform.

## Ethical Considerations and Limitations
Radiantloom Mixtral 8X7B Fusion, a powerful AI language model, can produce factually incorrect output and content not suitable for work (NSFW). It should not be relied upon to provide factually accurate information and should be used with caution. Due to the limitations of its pre-trained model and the finetuning datasets, it may generate lewd, biased, or otherwise offensive content. Consequently, developers should conduct thorough safety testing prior to implementing any applications of this model.

## About Radiantloom AI
Radiantloom AI trains open-source large language models tailored for specific business tasks such as copilots, email assistance, customer support, and database operations.

Learn more about Radiantloom by visiting our [website](https://radiantloom.com). Follow us on Twitter at [Radiantloom](https://twitter.com/radiantloom) to gain early access to upcoming Radiantloom AI large language models.

## Want to Support Our Work?

We are passionate about contributing open-source AI models to the broader AI community to accelerate AI development and deployment. If you find our work valuable and would like to contribute to its continued success, consider buying us a few coffees!

Your support goes a long way in helping us cover training costs, fund development tools, and keep the project thriving. Every coffee you buy is a small but meaningful contribution that fuels our dedication to providing a top-notch experience for users like you.

[Buy us a coffee](https://www.buymeacoffee.com/aigeek_) and be a part of our journey towards making this project even more awesome. We appreciate your support!
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_AIGeekLabs__radiantloom-mixtral-8x7b-fusion)

|             Metric              |Value|
|---------------------------------|----:|
|Avg.                             |65.24|
|AI2 Reasoning Challenge (25-Shot)|63.48|
|HellaSwag (10-Shot)              |83.65|
|MMLU (5-Shot)                    |60.03|
|TruthfulQA (0-shot)              |54.76|
|Winogrande (5-shot)              |76.09|
|GSM8k (5-shot)                   |53.45|