Instructions to use aisingapore/Llama-SEA-LION-v3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aisingapore/Llama-SEA-LION-v3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aisingapore/Llama-SEA-LION-v3-8B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aisingapore/Llama-SEA-LION-v3-8B") model = AutoModelForCausalLM.from_pretrained("aisingapore/Llama-SEA-LION-v3-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aisingapore/Llama-SEA-LION-v3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aisingapore/Llama-SEA-LION-v3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aisingapore/Llama-SEA-LION-v3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aisingapore/Llama-SEA-LION-v3-8B
- SGLang
How to use aisingapore/Llama-SEA-LION-v3-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "aisingapore/Llama-SEA-LION-v3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aisingapore/Llama-SEA-LION-v3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "aisingapore/Llama-SEA-LION-v3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aisingapore/Llama-SEA-LION-v3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aisingapore/Llama-SEA-LION-v3-8B with Docker Model Runner:
docker model run hf.co/aisingapore/Llama-SEA-LION-v3-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,8 +11,7 @@ language:
|
|
| 11 |
- km
|
| 12 |
- lo
|
| 13 |
- my
|
| 14 |
-
|
| 15 |
-
- su
|
| 16 |
license: llama3.1
|
| 17 |
library_name: transformers
|
| 18 |
pipeline_tag: text-generation
|
|
@@ -21,19 +20,19 @@ base_model: meta-llama/Llama-3.1-8B-Instruct
|
|
| 21 |
# Llama3.1 8B CPT SEA-LIONv3
|
| 22 |
SEA-LION is a collection of Large Language Models (LLMs) which has been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
|
| 23 |
|
| 24 |
-
Llama3.1 8B CPT SEA-LIONv3 Base is a multilingual model which has undergone continued pre-training on approximately **200B** tokens across
|
| 25 |
|
| 26 |
SEA-LION stands for <i>Southeast Asian Languages In One Network</i>.
|
| 27 |
|
| 28 |
- **Developed by:** Products Pillar, AI Singapore
|
| 29 |
- **Funded by:** Singapore NRF
|
| 30 |
- **Model type:** Decoder
|
| 31 |
-
- **Languages:** English, Chinese, Vietnamese, Indonesian, Thai, Filipino, Tamil, Malay, Khmer, Lao, Burmese
|
| 32 |
- **License:** [Llama 3.1 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
|
| 33 |
|
| 34 |
## Model Details
|
| 35 |
### Model Description
|
| 36 |
-
We performed continued pre-training in English and
|
| 37 |
|
| 38 |
For tokenisation, the model employs the default tokenizer used in Llama 3.1 8B Instruct.
|
| 39 |
|
|
@@ -41,14 +40,14 @@ For tokenisation, the model employs the default tokenizer used in Llama 3.1 8B I
|
|
| 41 |
We evaluated Llama3.1 8B CPT SEA-LIONv3 base model on general language capabilities.
|
| 42 |
|
| 43 |
#### General Language Capabilities
|
| 44 |
-
For the evaluation of general language capabilities, we employed the [SEA
|
| 45 |
-
These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive
|
| 46 |
|
| 47 |
-
Note: SEA
|
| 48 |
|
| 49 |
The evaluation was done **five-shot** with native prompts on a sample of 100-1000 instances for each dataset.
|
| 50 |
|
| 51 |
-
For more details on Llama3.1 8B CPT SEA-LIONv3 base benchmark performance, please refer to the SEA
|
| 52 |
|
| 53 |
## Technical Specifications
|
| 54 |
### Infrastructure
|
|
|
|
| 11 |
- km
|
| 12 |
- lo
|
| 13 |
- my
|
| 14 |
+
|
|
|
|
| 15 |
license: llama3.1
|
| 16 |
library_name: transformers
|
| 17 |
pipeline_tag: text-generation
|
|
|
|
| 20 |
# Llama3.1 8B CPT SEA-LIONv3
|
| 21 |
SEA-LION is a collection of Large Language Models (LLMs) which has been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
|
| 22 |
|
| 23 |
+
Llama3.1 8B CPT SEA-LIONv3 Base is a multilingual model which has undergone continued pre-training on approximately **200B** tokens across 11 SEA languages: English, Chinese, Vietnamese, Indonesian, Thai, Tamil, Filipino, Malay, Khmer, Lao, Burmese.
|
| 24 |
|
| 25 |
SEA-LION stands for <i>Southeast Asian Languages In One Network</i>.
|
| 26 |
|
| 27 |
- **Developed by:** Products Pillar, AI Singapore
|
| 28 |
- **Funded by:** Singapore NRF
|
| 29 |
- **Model type:** Decoder
|
| 30 |
+
- **Languages supported:** English, Chinese, Vietnamese, Indonesian, Thai, Filipino, Tamil, Malay, Khmer, Lao, Burmese
|
| 31 |
- **License:** [Llama 3.1 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
|
| 32 |
|
| 33 |
## Model Details
|
| 34 |
### Model Description
|
| 35 |
+
We performed continued pre-training in English and SEA languages on [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct), a decoder model using the Llama 3.1 architecture, to create Llama3.1 8B CPT SEA-LIONv3 Base.
|
| 36 |
|
| 37 |
For tokenisation, the model employs the default tokenizer used in Llama 3.1 8B Instruct.
|
| 38 |
|
|
|
|
| 40 |
We evaluated Llama3.1 8B CPT SEA-LIONv3 base model on general language capabilities.
|
| 41 |
|
| 42 |
#### General Language Capabilities
|
| 43 |
+
For the evaluation of general language capabilities, we employed the [SEA-HELM (also known as BHASA) evaluation benchmark](https://arxiv.org/abs/2309.06085v2) across a variety of tasks.
|
| 44 |
+
These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive Summarisation (Abssum), Causal Reasoning (Causal) and Natural Language Inference (NLI).
|
| 45 |
|
| 46 |
+
Note: SEA-HELM is implemented using prompts to elicit answers in a strict format. For all tasks, the model is expected to provide an answer tag from which the answer is automatically extracted. For tasks where options are provided, the answer should comprise one of the pre-defined options. The scores for each task is normalised to account for baseline performance due to random chance.
|
| 47 |
|
| 48 |
The evaluation was done **five-shot** with native prompts on a sample of 100-1000 instances for each dataset.
|
| 49 |
|
| 50 |
+
For more details on Llama3.1 8B CPT SEA-LIONv3 base benchmark performance, please refer to the SEA-HELM leaderboard, https://leaderboard.sea-lion.ai/
|
| 51 |
|
| 52 |
## Technical Specifications
|
| 53 |
### Infrastructure
|