Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,113 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
# Lite-Oute-1-65M-Instruct
|
5 |
+
|
6 |
+
Lite-Oute-1-65M-Instruct is an experimental ultra-compact model in the Lite series, based on the LLaMA architecture and comprising approximately 65 million parameters. <br>
|
7 |
+
The primary goal of this model was to explore the lower limits of model size while still maintaining basic language understanding capabilities. <br>
|
8 |
+
Due to its extremely small size, this model demonstrates basic text generation abilities but may struggle with instructions or maintaining topic coherence. <br>
|
9 |
+
Users should be aware of its significant limitations compared to larger models and expect inconsistent or potentially inaccurate responses.
|
10 |
+
|
11 |
+
## Available versions:
|
12 |
+
<a href="https://huggingface.co/OuteAI/Lite-Oute-1-65M-Instruct">Lite-Oute-1-65M-Instruct</a> <br>
|
13 |
+
<a href="https://huggingface.co/OuteAI/Lite-Oute-1-65M-Instruct-GGUF">Lite-Oute-1-65M-Instruct-GGUF</a> <br>
|
14 |
+
<a href="https://huggingface.co/OuteAI/Lite-Oute-1-65M-Instruct">Lite-Oute-1-65M</a> <br>
|
15 |
+
<a href="https://huggingface.co/OuteAI/Lite-Oute-1-65M-Instruct-GGUF">Lite-Oute-1-65M-GGUF</a> <br>
|
16 |
+
|
17 |
+
## Chat format
|
18 |
+
> [!IMPORTANT]
|
19 |
+
> This model uses **ChatML** template. Ensure you use the correct template:
|
20 |
+
|
21 |
+
```
|
22 |
+
<|im_start|>system
|
23 |
+
[System message]<|im_end|>
|
24 |
+
<|im_start|>user
|
25 |
+
[Your question or message]<|im_end|>
|
26 |
+
<|im_start|>assistant
|
27 |
+
[The model's response]<|im_end|>
|
28 |
+
```
|
29 |
+
|
30 |
+
<table style="text-align: left;">
|
31 |
+
<tr>
|
32 |
+
<th>Benchmark</th>
|
33 |
+
<th>5-shot (acc)</th>
|
34 |
+
<th>0-shot (acc)</th>
|
35 |
+
</tr>
|
36 |
+
<tr>
|
37 |
+
<td>ARC Challenge</td>
|
38 |
+
<td>22.61</td>
|
39 |
+
<td>23.63</td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td>ARC Easy</td>
|
43 |
+
<td>37.16</td>
|
44 |
+
<td>40.49</td>
|
45 |
+
</tr>
|
46 |
+
<tr>
|
47 |
+
<td>CommonsenseQA</td>
|
48 |
+
<td>19.41</td>
|
49 |
+
<td>20.64</td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td>HellaSWAG</td>
|
53 |
+
<td>28.74</td>
|
54 |
+
<td>28.41</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td>MMLU</td>
|
58 |
+
<td>25.20</td>
|
59 |
+
<td>23.45</td>
|
60 |
+
</tr>
|
61 |
+
<tr>
|
62 |
+
<td>OpenBookQA</td>
|
63 |
+
<td>27.40</td>
|
64 |
+
<td>28.60</td>
|
65 |
+
</tr>
|
66 |
+
<tr>
|
67 |
+
<td>PIQA</td>
|
68 |
+
<td>60.88</td>
|
69 |
+
<td>60.77</td>
|
70 |
+
</tr>
|
71 |
+
<tr>
|
72 |
+
<td>Winogrande</td>
|
73 |
+
<td>50.59</td>
|
74 |
+
<td>50.04</td>
|
75 |
+
</tr>
|
76 |
+
</table>
|
77 |
+
|
78 |
+
## Usage with HuggingFace transformers
|
79 |
+
The model can be used with HuggingFace's `transformers` library:
|
80 |
+
```python
|
81 |
+
import torch
|
82 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
83 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
84 |
+
model = AutoModelForCausalLM.from_pretrained("OuteAI/Lite-Oute-1-65M-Instruct").to(device)
|
85 |
+
tokenizer = AutoTokenizer.from_pretrained("OuteAI/Lite-Oute-1-65M-Instruct")
|
86 |
+
def generate_response(message: str, temperature: float = 0.4, repetition_penalty: float = 1.12) -> str:
|
87 |
+
# Apply the chat template and convert to PyTorch tensors
|
88 |
+
messages = [
|
89 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
90 |
+
{"role": "user", "content": message}
|
91 |
+
]
|
92 |
+
input_ids = tokenizer.apply_chat_template(
|
93 |
+
messages, add_generation_prompt=True, return_tensors="pt"
|
94 |
+
).to(device)
|
95 |
+
# Generate the response
|
96 |
+
output = model.generate(
|
97 |
+
input_ids,
|
98 |
+
max_length=512,
|
99 |
+
temperature=temperature,
|
100 |
+
repetition_penalty=repetition_penalty,
|
101 |
+
do_sample=True
|
102 |
+
)
|
103 |
+
# Decode the generated output
|
104 |
+
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
105 |
+
return generated_text
|
106 |
+
message = "I'd like to learn about language models. Can you break down the concept for me?"
|
107 |
+
response = generate_response(message)
|
108 |
+
print(response)
|
109 |
+
```
|
110 |
+
|
111 |
+
## Risk Disclaimer
|
112 |
+
|
113 |
+
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.
|