gguf en id ta th vi license:llama3 endpoints_compatible region:us conversational
---
language:
- en
- id
- ta
- th
- vi
license: llama3
---
# Llama 3 8B CPT SEA-Lionv2.1 Instruct

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

Llama 3 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.
These instructions have been carefully curated and rewritten to ensure the model was trained on truly open, commercially permissive and high quality datasets.

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.

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, Indonesian, Thai, Vietnamese, Tamil
- **License:** [Llama 3 Community License](https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE)

## Description

This repo contains `GGUF` format model files for [aisingapore/llama3-8b-cpt-sea-lionv2.1-instruct](https://huggingface.co/aisingapore/llama3-8b-cpt-sea-lionv2.1-instruct).

#### Model Weights Included in this repository:
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q2_K](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q2_K.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q3_K_M](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q3_K_M.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q4_0](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q4_0.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q4_K_M](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q4_K_M.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q5_0](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q5_0.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q5_K_M](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q5_K_M.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q6_K](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q6_K.gguf)
- [llama3-8b-cpt-sea-lionv2.1-instruct-Q8_0](https://huggingface.co/aisingapore/llama3-8b-cpt-sealionv2-instruct-gguf/blob/main/llama3-8b-cpt-sea-lionv2.1-instruct-Q8_0.gguf)

### Usage
Llama 3 8B CPT SEA-Lionv2.1 Instruct GGUF files have been tested on the latest version of `llama.cpp`, from pull request [#8772](https://github.com/ggerganov/llama.cpp/pull/8772)

#### Prompt Template:
```
<|begin_of_text|><|start_header_id|>system<|end_header_id|>

{{system_prompt}}<|eot_id|>
<|start_header_id|>user<|end_header_id|>

{{prompt}}<|eot_id|>
<|start_header_id|>assistant<|end_header_id|>


```


#### Recommended `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/llama3-8b-cpt-sea-lionv2.1-instruct/llama3-8B-cpt-sea-lionv2.1-instruct-Q4_K_M.gguf -ngl -1 --temp 0 -n 128 -p "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful assistant who answers succinctly.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWhat is a sea lion?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\n"
```
```sh
# Running in conversation mode
./llama-cli -m models/llama3-8b-cpt-sea-lionv2.1-instruct/llama3-8B-cpt-sea-lionv2.1-instruct-Q4_K_M.gguf -ngl -1 --temp 0 -n 128 -p "You are a helpful assistant who answers succinctly." --color -cnv --chat-template llama3
```
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
The Llama 3 8B CPT SEA-Lionv2.1 Instruct was fine-tuned using 8x A100-40GB using parameter efficient fine tuning in the form of LoRA.

## Data
Llama 3 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 a high quality and any errors were corrected and rewritten by native speakers or else dropped from our mix.

In addition, special care was taken to ensure that the datasets used had commercially permissive licenses through verification with the original data source. 

Link to dataset: _coming soon_

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

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

## 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)
https://github.com/aisingapore/sealionlion
## 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.