Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,109 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
# Lite-Oute-1-300M-Instruct
|
5 |
+
|
6 |
+
Lite-Oute-1-300M-Instruct is a Lite series model based on the Mistral architecture, comprising approximately 300 million parameters. <br>
|
7 |
+
This model aims to improve upon our previous 150M version by increasing size and training on a more refined dataset. The primary goal of this 300 million parameter model is to offer enhanced performance while still maintaining efficiency for deployment on a variety of devices. <br>
|
8 |
+
With its larger size, it should provide improved context retention and coherence, however users should note that as a compact model, it still have limitations compared to larger language models. <br>
|
9 |
+
The model was trained on 30 billion tokens with a context length of 4096.
|
10 |
+
|
11 |
+
## Chat format
|
12 |
+
> [!IMPORTANT]
|
13 |
+
> This model uses **ChatML** template. Ensure you use the correct template:
|
14 |
+
|
15 |
+
```
|
16 |
+
<|im_start|>system
|
17 |
+
[System message]<|im_end|>
|
18 |
+
<|im_start|>user
|
19 |
+
[Your question or message]<|im_end|>
|
20 |
+
<|im_start|>assistant
|
21 |
+
[The model's response]<|im_end|>
|
22 |
+
```
|
23 |
+
|
24 |
+
## Benchmarks:
|
25 |
+
<table style="text-align: left;">
|
26 |
+
<tr>
|
27 |
+
<th>Benchmark</th>
|
28 |
+
<th>5-shot (acc)</th>
|
29 |
+
<th>0-shot (acc)</th>
|
30 |
+
</tr>
|
31 |
+
<tr>
|
32 |
+
<td>ARC Challenge</td>
|
33 |
+
<td>26.37</td>
|
34 |
+
<td>26.02</td>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td>ARC Easy</td>
|
38 |
+
<td>51.43</td>
|
39 |
+
<td>49.79</td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td>CommonsenseQA</td>
|
43 |
+
<td>20.72</td>
|
44 |
+
<td>20.31</td>
|
45 |
+
</tr>
|
46 |
+
<tr>
|
47 |
+
<td>HellaSWAG</td>
|
48 |
+
<td>34.93</td>
|
49 |
+
<td>34.50</td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td>MMLU</td>
|
53 |
+
<td>25.87</td>
|
54 |
+
<td>24.00</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td>OpenBookQA</td>
|
58 |
+
<td>31.40</td>
|
59 |
+
<td>32.20</td>
|
60 |
+
</tr>
|
61 |
+
<tr>
|
62 |
+
<td>PIQA</td>
|
63 |
+
<td>65.07</td>
|
64 |
+
<td>65.40</td>
|
65 |
+
</tr>
|
66 |
+
<tr>
|
67 |
+
<td>Winogrande</td>
|
68 |
+
<td>52.01</td>
|
69 |
+
<td>53.75</td>
|
70 |
+
</tr>
|
71 |
+
</table>
|
72 |
+
|
73 |
+
|
74 |
+
## Usage with HuggingFace transformers
|
75 |
+
The model can be used with HuggingFace's `transformers` library:
|
76 |
+
```python
|
77 |
+
import torch
|
78 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
79 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
80 |
+
model = AutoModelForCausalLM.from_pretrained("OuteAI/Lite-Oute-1-300M-Instruct").to(device)
|
81 |
+
tokenizer = AutoTokenizer.from_pretrained("OuteAI/Lite-Oute-1-300M-Instruct")
|
82 |
+
def generate_response(message: str, temperature: float = 0.4, repetition_penalty: float = 1.12) -> str:
|
83 |
+
# Apply the chat template and convert to PyTorch tensors
|
84 |
+
messages = [
|
85 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
86 |
+
{"role": "user", "content": message}
|
87 |
+
]
|
88 |
+
input_ids = tokenizer.apply_chat_template(
|
89 |
+
messages, add_generation_prompt=True, return_tensors="pt"
|
90 |
+
).to(device)
|
91 |
+
# Generate the response
|
92 |
+
output = model.generate(
|
93 |
+
input_ids,
|
94 |
+
max_length=512,
|
95 |
+
temperature=temperature,
|
96 |
+
repetition_penalty=repetition_penalty,
|
97 |
+
do_sample=True
|
98 |
+
)
|
99 |
+
# Decode the generated output
|
100 |
+
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
101 |
+
return generated_text
|
102 |
+
message = "I'd like to learn about language models. Can you break down the concept for me?"
|
103 |
+
response = generate_response(message)
|
104 |
+
print(response)
|
105 |
+
```
|
106 |
+
|
107 |
+
## Risk Disclaimer
|
108 |
+
|
109 |
+
By using this model, you acknowledge that you understand and assume the risks associated with its use. You are solely responsible for ensuring compliance with all applicable laws and regulations. We disclaim any liability for problems arising from the use of this open-source model, including but not limited to direct, indirect, incidental, consequential, or punitive damages. We make no warranties, express or implied, regarding the model's performance, accuracy, or fitness for a particular purpose. Your use of this model is at your own risk, and you agree to hold harmless and indemnify us, our affiliates, and our contributors from any claims, damages, or expenses arising from your use of the model.
|