File size: 7,901 Bytes
899f3a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c37d158
899f3a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- en
- zh
- vi
- id
- th
- fil
- ta
- ms
- km
- lo
- my
- jv
- su
license: gemma
base_model:
- aisingapore/gemma2-9b-cpt-sea-lionv3-instruct
---
# Gemma2 9B CPT SEA-LIONv3 Instruct

SEA-LION is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.

Gemma2 9B CPT SEA-LIONv3 Instruct is a multilingual model which has been fine-tuned with around **500,000 English instruction-completion pairs** alongside a larger pool of around **1,000,000 instruction-completion pairs** from other ASEAN languages, such as Indonesian, Thai and Vietnamese.

SEA-LION stands for _Southeast Asian Languages In One Network_.

- **Developed by:** Products Pillar, AI Singapore
- **Funded by:** Singapore NRF
- **Model type:** Decoder
- **Languages:** English, Chinese, Vietnamese, Indonesian, Thai, Filipino, Tamil, Malay, Khmer, Lao, Burmese, Javanese, Sundanese
- **License:** [Gemma Community License](https://ai.google.dev/gemma/terms)

## Description

This repo contains `GGUF` format model files for [aisingapore/gemma2-9b-cpt-sea-lionv3-instruct](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct).

#### Model Weights Included in this repository:
- [gemma2-9b-cpt-sea-lionv3-instruct-F16](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-F16.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q2_K](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q2_K.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q3_K_M](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q3_K_M.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q4_0](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q4_0.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q4_K_M](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q4_K_M.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q5_0](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q5_0.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q5_K_M](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q5_K_M.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q6_K](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q6_K.gguf)
- [gemma2-9b-cpt-sea-lionv3-instruct-Q8_0](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-instruct-gguf/blob/main/gemma2-9b-cpt-sea-lionv3-instruct-Q8_0.gguf)

### Usage
Gemma2 9B CPT SEA-LIONv3 Instruct GGUF files have been tested on `llama.cpp`, from pull request [#8772](https://github.com/ggerganov/llama.cpp/pull/8772)

#### Chat Template:
```
<bos><start_of_turn>user
{{prompt}}<end_of_turn>
<start_of_turn>model

```

#### Sample`llama.cpp` command:
To execute the following commands, ensure you are in the `llama.cpp` root directory and that your models are located in the `models` folder:
```sh
# Running one-time input prompt
./llama-cli -m models/gemma2-9b-cpt-sea-lionv3-instruct/gemma2-9b-cpt-sea-lionv3-instruct-F16.gguf -ngl -1 -p "<bos><start_of_turn>user\nApa sentimen dari kalimat berikut ini?\nKalimat: Buku ini sangat membosankan.\nJawaban: <end_of_turn>\n<start_of_turn>model\n"
```
```sh
# Running in conversation mode
./llama-cli -m models/gemma2-9b-cpt-sea-lionv3-instruct/gemma2-9b-cpt-sea-lionv3-instruct-F16.gguf -ngl -1 --color -cnv
```
Please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md) for adjusting the parameters.

#### To convert & quantize your own SEA-LION model:
Given that you are in the `llama.cpp` root directory:
```sh
python convert-hf-to-gguf.py {{model path}}
./quantize ggml-model-f16.gguf {{Quant Type}}
```

For more detailed instructions on conversion and quantization, please refer to [llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/quantize/README.md).

### Caveats
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.

## Limitations
### Safety

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.

## Technical Specifications
### Fine-Tuning Details
Gemma2 9B CPT SEA-LIONv3 Instruct was built using a combination of a full parameter fine-tune, on-policy alignment, and model merges of the best performing checkpoints. The training process for fine-tuning was approximately 15 hours, with alignment taking 2 hours, both on 8x H100-80GB GPUs.

## Data
Gemma2 9B CPT SEA-LIONv3 Instruct was trained on a wide range of synthetic instructions, alongside publicly available instructions hand-curated by the team with the assistance of native speakers. In addition, special care was taken to ensure that the datasets used had commercially permissive licenses through verification with the original data source. 

## Call for Contributions
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.

## The Team

Chan Adwin, Choa Esther, Cheng Nicholas, Huang Yuli, Lau Wayne, Lee Chwan Ren, Leong Wai Yi, Leong Wei Qi, Limkonchotiwat Peerat, Liu Bing Jie Darius, Montalan Jann Railey, Ng Boon Cheong Raymond, Ngui Jian Gang, Nguyen Thanh Ngan, Ong Brandon, Ong Tat-Wee David, Ong Zhi Hao, Rengarajan Hamsawardhini, Siow Bryan, Susanto Yosephine, Tai Ngee Chia, Tan Choon Meng, Teo Eng Sipp Leslie, Teo Wei Yi, Tjhi William, Teng Walter, Yeo Yeow Tong, Yong Xianbin

## Acknowledgements

[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. 

## Contact

For more info, please contact us using this [SEA-LION Inquiry Form](https://forms.gle/sLCUVb95wmGf43hi6)

[Link to SEA-LION's GitHub repository](https://github.com/aisingapore/sealion)

## Disclaimer

This is the repository for the commercial instruction-tuned model.
The model has _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 claims, damages, or other liabilities arising from the use of the released weights and codes.