GGUF
Inference Endpoints
conversational
mav23 commited on
Commit
43df4f2
1 Parent(s): 23c71e2

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ llama3-8b-cpt-sea-lionv2.1-instruct.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - id
5
+ - ta
6
+ - th
7
+ - vi
8
+ license: llama3
9
+ ---
10
+ # Llama3 8B CPT SEA-Lionv2.1 Instruct
11
+
12
+ SEA-LION is a collection of Large Language Models (LLMs) which has been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
13
+
14
+ Llama3 8B CPT SEA-Lionv2.1 Instruct is a multilingual model which has been fine-tuned with around **100,000 English instruction-completion pairs** alongside a smaller pool of around **50,000 instruction-completion pairs** from other ASEAN languages, such as Indonesian, Thai and Vietnamese.
15
+ These instructions have been carefully curated and rewritten to ensure the model was trained on truly open, commercially permissive and high quality datasets.
16
+
17
+ Llama3 8B CPT SEA-Lionv2.1 Instruct has undergone additional supervised fine-tuning and alignment compared to the now deprecated Llama3 8B CPT SEA-Lionv2 Instruct. These improvements have increased the model's capabilities in chat interactions and its ability to follow instructions accurately.
18
+
19
+ SEA-LION stands for _Southeast Asian Languages In One Network_.
20
+
21
+ - **Developed by:** Products Pillar, AI Singapore
22
+ - **Funded by:** Singapore NRF
23
+ - **Model type:** Decoder
24
+ - **Languages:** English, Indonesian, Thai, Vietnamese, Tamil
25
+ - **License:** [Llama3 Community License](https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE)
26
+
27
+ ## Model Details
28
+
29
+ ### Model Description
30
+ We performed instruction tuning in English and also in ASEAN languages such as Indonesian, Thai and Vietnamese on our [continued pre-trained Llama3 CPT 8B SEA-Lionv2](https://huggingface.co/aisingapore/llama3-8b-cpt-SEA-Lionv2-base), a decoder model using the Llama3 architecture, to create Llama3 8B SEA-Lionv2.1 Instruct.
31
+
32
+ The model has a context length of 8192.
33
+
34
+ ### Benchmark Performance
35
+ We evaluated Llama3 8B SEA-Lionv2.1 Instruct on both general language capabilities and instruction-following capabilities.
36
+
37
+ #### General Language Capabilities
38
+ For the evaluation of general language capabilities, we employed the [BHASA evaluation benchmark](https://arxiv.org/abs/2309.06085v2) across a variety of tasks.
39
+ These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive Summarization (Summ), Causal Reasoning (Causal) and Natural Language Inference (NLI).
40
+
41
+ Note: BHASA is implemented following a strict answer format, and only spaces and punctuations are cleaned. For tasks where options are provided, the answer should only include one of the pre-defined options, nothing else. If the model continues to generate more tokens (e.g. to explain its answer), it will be considered to be a wrong response. For the F1 score metric (as used in Sentiment Analysis and Toxicity Detection), all answers that do not fall under the pre-defined labels will be treated as a separate label (to mark it as a wrong answer) and included in the calculations so that the model is penalized for not generating one of the pre-defined labels.
42
+
43
+ The evaluation was done zero-shot with native prompts and only a sample of 100-1000 instances for each dataset was used as per the setting described in the paper.
44
+
45
+
46
+ #### Instruction-following Capabilities
47
+ Since LLama3 8B SEA-Lionv2.1 is an instruction-following model, we also evaluated it on instruction-following capabilities with two datasets, [IFEval](https://arxiv.org/abs/2311.07911) and [MT-Bench](https://arxiv.org/abs/2306.05685).
48
+
49
+ As these two datasets were originally in English, the linguists and native speakers in the team worked together to filter, localize and translate the datasets into the respective target languages to ensure that the examples remained reasonable, meaningful and natural.
50
+
51
+ **IFEval**
52
+
53
+ IFEval evaluates a model's ability to adhere to constraints provided in the prompt, for example beginning a response with a specific word/phrase or answering with a certain number of sections. The metric used is accuracy normalized by language (if the model performs the task correctly but responds in the wrong language, it is judged to have failed the task).
54
+
55
+
56
+ **MT-Bench**
57
+
58
+ MT-Bench evaluates a model's ability to engage in multi-turn (2 turns) conversations and respond in ways that align with human needs. We use `gpt-4-1106-preview` as the judge model and compare against `gpt-3.5-turbo-0125` as the baseline model. The metric used is the weighted win rate against the baseline model (i.e. average win rate across each category (Math, Reasoning, STEM, Humanities, Roleplay, Writing, Extraction)). A tie is given a score of 0.5.
59
+
60
+
61
+ For more details on Llama3 8B CPT SEA-Lionv2.1 Instruct benchmark performance, please refer to the SEA HELM leaderboard, https://leaderboard.sea-lion.ai/
62
+
63
+
64
+ ### Usage
65
+ SEA-LION can be run using the 🤗 Transformers library
66
+ ```python
67
+ # Please use transformers==4.43.2
68
+
69
+ import transformers
70
+ import torch
71
+
72
+ model_id = "aisingapore/llama3-8b-cpt-SEA-Lionv2.1-instruct"
73
+
74
+ pipeline = transformers.pipeline(
75
+ "text-generation",
76
+ model=model_id,
77
+ model_kwargs={"torch_dtype": torch.bfloat16},
78
+ device_map="auto",
79
+ )
80
+ messages = [
81
+ {"role": "user", "content": "Apa sentimen dari kalimat berikut ini?\nKalimat: Buku ini sangat membosankan.\nJawaban: "},
82
+ ]
83
+
84
+ outputs = pipeline(
85
+ messages,
86
+ max_new_tokens=256,
87
+ )
88
+ print(outputs[0]["generated_text"][-1])
89
+ ```
90
+
91
+ ### Accessing Older Revisions
92
+ Huggingface provides support for the revision parameter, allowing users to access specific versions of models. This can be used to retrieve the original llama3-8b-cpt-SEA-Lionv2-instruct model with the tag "v2.0.0".
93
+ ```python
94
+ # Please use transformers==4.43.2
95
+
96
+ import transformers
97
+ import torch
98
+
99
+ model_id = "aisingapore/llama3-8b-cpt-SEA-Lionv2.1-instruct"
100
+
101
+ pipeline = transformers.pipeline(
102
+ "text-generation",
103
+ model=model_id,
104
+ model_kwargs={"torch_dtype": torch.bfloat16},
105
+ revision="v2.0.0", # Specify the revision here. Initial release is at "v2.0.0".
106
+ device_map="auto",
107
+ )
108
+ messages = [
109
+ {"role": "user", "content": "Apa sentimen dari kalimat berikut ini?\nKalimat: Buku ini sangat membosankan.\nJawaban: "},
110
+ ]
111
+
112
+ outputs = pipeline(
113
+ messages,
114
+ max_new_tokens=256,
115
+ )
116
+ print(outputs[0]["generated_text"][-1])
117
+ ```
118
+
119
+ ### Caveats
120
+ It is important for users to be aware that our model exhibits certain limitations that warrant consideration. Like many LLMs, the model can hallucinate and occasionally generates irrelevant content, introducing fictional elements that are not grounded in the provided context. Users should also exercise caution in interpreting and validating the model's responses due to the potential inconsistencies in its reasoning.
121
+
122
+ ## Limitations
123
+ ### Safety
124
+
125
+ Current SEA-LION models, including this commercially permissive release, have not been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights and codes.
126
+
127
+ ## Technical Specifications
128
+ ### Fine-Tuning Details
129
+ The Llama3 8B CPT SEA-Lionv2.1 Instruct was fine-tuned using 8x A100-40GB using parameter efficient fine tuning in the form of LoRA.
130
+
131
+ ## Data
132
+ Llama3 8B CPT SEA-Lionv2.1 Instruct was trained on a wide range of instructions that were manually and stringently verified by our team. A large portion of the effort was dedicated to ensuring that each instruction-completion pair that the model sees is of high quality and any errors were corrected and rewritten by native speakers or else dropped from our mix.
133
+
134
+ In addition, special care was taken to ensure that the datasets used had commercially permissive licenses through verification with the original data source.
135
+
136
+ Link to dataset: _coming soon_
137
+
138
+ ## Call for Contributions
139
+ We encourage researchers, developers, and language enthusiasts to actively contribute to the enhancement and expansion of SEA-LION. Contributions can involve identifying and reporting bugs, sharing pre-training, instruction, and preference data, improving documentation usability, proposing and implementing new model evaluation tasks and metrics, or training versions of the model in additional Southeast Asian languages. Join us in shaping the future of SEA-LION by sharing your expertise and insights to make these models more accessible, accurate, and versatile. Please check out our GitHub for further information on the call for contributions.
140
+
141
+ ## The Team
142
+
143
+ Choa Esther<br>
144
+ Cheng Nicholas<br>
145
+ Huang Yuli<br>
146
+ Lau Wayne<br>
147
+ Lee Chwan Ren<br>
148
+ Leong Wai Yi<br>
149
+ Leong Wei Qi<br>
150
+ Li Yier<br>
151
+ Liu Bing Jie Darius<br>
152
+ Lovenia Holy<br>
153
+ Montalan Jann Railey<br>
154
+ Ng Boon Cheong Raymond<br>
155
+ Ngui Jian Gang<br>
156
+ Nguyen Thanh Ngan<br>
157
+ Ong Brandon<br>
158
+ Ong Tat-Wee David<br>
159
+ Ong Zhi Hao<br>
160
+ Rengarajan Hamsawardhini<br>
161
+ Siow Bryan<br>
162
+ Susanto Yosephine<br>
163
+ Tai Ngee Chia<br>
164
+ Tan Choon Meng<br>
165
+ Teo Eng Sipp Leslie<br>
166
+ Teo Wei Yi<br>
167
+ Tjhi William<br>
168
+ Teng Walter<br>
169
+ Yeo Yeow Tong<br>
170
+ Yong Xianbin<br>
171
+
172
+ ## Acknowledgements
173
+
174
+ [AI Singapore](​​https://aisingapore.org/) is a national programme supported by the National Research Foundation, Singapore and hosted by the National University of Singapore. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of the National Research Foundation or the National University of Singapore.
175
+
176
+ ## Contact
177
+
178
+ For more info, please contact us using this [SEA-LION Inquiry Form](https://forms.gle/sLCUVb95wmGf43hi6)
179
+
180
+ [Link to SEA-LION's GitHub repository](https://github.com/aisingapore/sealion)
181
+
182
+ ## Disclaimer
183
+
184
+ This is the repository for the commercial instruction-tuned model.
185
+ The model has _not_ been aligned for safety.
186
+ Developers and users should perform their own safety fine-tuning and related security measures.
187
+ In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
llama3-8b-cpt-sea-lionv2.1-instruct.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ea5f1873fa379e13cca4e709a9c5520827b6aae217e456d1c3ff64b344bead4
3
+ size 4661211776