Text Generation
Transformers
Safetensors
llama
Multilingual
conversational
text-generation-inference
Instructions to use LLaMAX/LLaMAX3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLaMAX/LLaMAX3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLaMAX/LLaMAX3-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LLaMAX/LLaMAX3-8B") model = AutoModelForCausalLM.from_pretrained("LLaMAX/LLaMAX3-8B") 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
- vLLM
How to use LLaMAX/LLaMAX3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLaMAX/LLaMAX3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLaMAX/LLaMAX3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LLaMAX/LLaMAX3-8B
- SGLang
How to use LLaMAX/LLaMAX3-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 "LLaMAX/LLaMAX3-8B" \ --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": "LLaMAX/LLaMAX3-8B", "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 "LLaMAX/LLaMAX3-8B" \ --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": "LLaMAX/LLaMAX3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LLaMAX/LLaMAX3-8B with Docker Model Runner:
docker model run hf.co/LLaMAX/LLaMAX3-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -133,10 +133,24 @@ Akrikaans (af), Amharic (am), Arabic (ar), Armenian (hy), Assamese (as), Asturia
|
|
| 133 |
If our model helps your work, please cite this paper:
|
| 134 |
|
| 135 |
```
|
| 136 |
-
@
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
}
|
| 142 |
```
|
|
|
|
| 133 |
If our model helps your work, please cite this paper:
|
| 134 |
|
| 135 |
```
|
| 136 |
+
@inproceedings{lu-etal-2024-llamax,
|
| 137 |
+
title = "{LL}a{MAX}: Scaling Linguistic Horizons of {LLM} by Enhancing Translation Capabilities Beyond 100 Languages",
|
| 138 |
+
author = "Lu, Yinquan and
|
| 139 |
+
Zhu, Wenhao and
|
| 140 |
+
Li, Lei and
|
| 141 |
+
Qiao, Yu and
|
| 142 |
+
Yuan, Fei",
|
| 143 |
+
editor = "Al-Onaizan, Yaser and
|
| 144 |
+
Bansal, Mohit and
|
| 145 |
+
Chen, Yun-Nung",
|
| 146 |
+
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
|
| 147 |
+
month = nov,
|
| 148 |
+
year = "2024",
|
| 149 |
+
address = "Miami, Florida, USA",
|
| 150 |
+
publisher = "Association for Computational Linguistics",
|
| 151 |
+
url = "https://aclanthology.org/2024.findings-emnlp.631",
|
| 152 |
+
doi = "10.18653/v1/2024.findings-emnlp.631",
|
| 153 |
+
pages = "10748--10772",
|
| 154 |
+
abstract = "Large Language Models (LLMs) demonstrate remarkable translation capabilities in high-resource language tasks, yet their performance in low-resource languages is hindered by insufficient multilingual data during pre-training. To address this, we conduct extensive multilingual continual pre-training on the LLaMA series models, enabling translation support across more than 100 languages. Through a comprehensive analysis of training strategies, such as vocabulary expansion and data augmentation, we develop LLaMAX. Remarkably, without sacrificing its generalization ability, LLaMAX achieves significantly higher translation performance compared to existing open-source LLMs (by more than 10 spBLEU points) and performs on-par with specialized translation model (M2M-100-12B) on the Flores-101 benchmark. Extensive experiments indicate that LLaMAX can serve as a robust multilingual foundation model. The code and the models are publicly available.",
|
| 155 |
}
|
| 156 |
```
|