Text Generation
Transformers
Safetensors
qwen2
sea
multilingual
conversational
text-generation-inference
Instructions to use SeaLLMs/SeaLLMs-v3-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SeaLLMs/SeaLLMs-v3-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SeaLLMs/SeaLLMs-v3-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SeaLLMs/SeaLLMs-v3-7B") model = AutoModelForCausalLM.from_pretrained("SeaLLMs/SeaLLMs-v3-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SeaLLMs/SeaLLMs-v3-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SeaLLMs/SeaLLMs-v3-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SeaLLMs/SeaLLMs-v3-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SeaLLMs/SeaLLMs-v3-7B
- SGLang
How to use SeaLLMs/SeaLLMs-v3-7B 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 "SeaLLMs/SeaLLMs-v3-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SeaLLMs/SeaLLMs-v3-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "SeaLLMs/SeaLLMs-v3-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SeaLLMs/SeaLLMs-v3-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SeaLLMs/SeaLLMs-v3-7B with Docker Model Runner:
docker model run hf.co/SeaLLMs/SeaLLMs-v3-7B
Update README.md
Browse files
README.md
CHANGED
|
@@ -20,13 +20,13 @@ tags:
|
|
| 20 |
<p align="center">
|
| 21 |
<a href="https://damo-nlp-sg.github.io/SeaLLMs/" target="_blank" rel="noopener">Website</a>
|
| 22 |
|
| 23 |
-
<a href="https://huggingface.co/SeaLLMs/SeaLLMs-v3-
|
| 24 |
|
| 25 |
<a href="https://huggingface.co/spaces/SeaLLMs/SeaLLM-Chat" target="_blank" rel="noopener"> 🤗 DEMO</a>
|
| 26 |
|
| 27 |
<a href="https://github.com/DAMO-NLP-SG/SeaLLMs" target="_blank" rel="noopener">Github</a>
|
| 28 |
|
| 29 |
-
<a href="https://arxiv.org/pdf/2407.19672" target="_blank" rel="noopener">Technical Report</a>
|
| 30 |
</p>
|
| 31 |
|
| 32 |
|
|
@@ -42,7 +42,8 @@ We introduce **SeaLLMs-v3**, the latest series of the SeaLLMs (Large Language Mo
|
|
| 42 |
|
| 43 |
SeaLLMs is tailored for handling a wide range of languages spoken in the SEA region, including English, Chinese, Indonesian, Vietnamese, Thai, Tagalog, Malay, Burmese, Khmer, Lao, Tamil, and Javanese.
|
| 44 |
|
| 45 |
-
This page introduces the **SeaLLMs-v3-7B** model, which can be
|
|
|
|
| 46 |
|
| 47 |
## Evaluation
|
| 48 |
|
|
@@ -110,6 +111,7 @@ If you find our project useful, we hope you would kindly star our repo and cite
|
|
| 110 |
Yew Ken Chia, Xin Li, Lidong Bing},
|
| 111 |
title = {SeaLLMs 3: Open Foundation and Chat Multilingual Large Language Models for Southeast Asian Languages},
|
| 112 |
year = {2024},
|
|
|
|
| 113 |
}
|
| 114 |
```
|
| 115 |
|
|
|
|
| 20 |
<p align="center">
|
| 21 |
<a href="https://damo-nlp-sg.github.io/SeaLLMs/" target="_blank" rel="noopener">Website</a>
|
| 22 |
|
| 23 |
+
<a href="https://huggingface.co/SeaLLMs/SeaLLMs-v3-7B" target="_blank" rel="noopener">Model</a>
|
| 24 |
|
| 25 |
<a href="https://huggingface.co/spaces/SeaLLMs/SeaLLM-Chat" target="_blank" rel="noopener"> 🤗 DEMO</a>
|
| 26 |
|
| 27 |
<a href="https://github.com/DAMO-NLP-SG/SeaLLMs" target="_blank" rel="noopener">Github</a>
|
| 28 |
|
| 29 |
+
<a href="https://arxiv.org/pdf/2407.19672" target="_blank" rel="noopener">[NEW] Technical Report</a>
|
| 30 |
</p>
|
| 31 |
|
| 32 |
|
|
|
|
| 42 |
|
| 43 |
SeaLLMs is tailored for handling a wide range of languages spoken in the SEA region, including English, Chinese, Indonesian, Vietnamese, Thai, Tagalog, Malay, Burmese, Khmer, Lao, Tamil, and Javanese.
|
| 44 |
|
| 45 |
+
This page introduces the **SeaLLMs-v3-7B** model, which can be fine-tuned for your specific downstream tasks, especially in SEA languages.
|
| 46 |
+
Note that this is a base model, if you are looking for a model that can be directly applicable to your downstream applications, you may want to check the chat version model: **[SeaLLMs-v3-7B-Chat](https://huggingface.co/SeaLLMs/SeaLLMs-v3-7B-Chat)**.
|
| 47 |
|
| 48 |
## Evaluation
|
| 49 |
|
|
|
|
| 111 |
Yew Ken Chia, Xin Li, Lidong Bing},
|
| 112 |
title = {SeaLLMs 3: Open Foundation and Chat Multilingual Large Language Models for Southeast Asian Languages},
|
| 113 |
year = {2024},
|
| 114 |
+
url = {https://arxiv.org/abs/2407.19672}
|
| 115 |
}
|
| 116 |
```
|
| 117 |
|