Text Generation
Transformers
Safetensors
PyTorch
English
Korean
llama
saltlux
luxia
meta
llama-3
conversational
text-generation-inference
Instructions to use saltlux/Ko-Llama3-Luxia-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saltlux/Ko-Llama3-Luxia-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saltlux/Ko-Llama3-Luxia-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("saltlux/Ko-Llama3-Luxia-8B") model = AutoModelForCausalLM.from_pretrained("saltlux/Ko-Llama3-Luxia-8B", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use saltlux/Ko-Llama3-Luxia-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saltlux/Ko-Llama3-Luxia-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": "saltlux/Ko-Llama3-Luxia-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/saltlux/Ko-Llama3-Luxia-8B
- SGLang
How to use saltlux/Ko-Llama3-Luxia-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 "saltlux/Ko-Llama3-Luxia-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": "saltlux/Ko-Llama3-Luxia-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 "saltlux/Ko-Llama3-Luxia-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": "saltlux/Ko-Llama3-Luxia-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use saltlux/Ko-Llama3-Luxia-8B with Docker Model Runner:
docker model run hf.co/saltlux/Ko-Llama3-Luxia-8B
| license: llama3 | |
| language: | |
| - en | |
| - ko | |
| pipeline_tag: text-generation | |
| tags: | |
| - saltlux | |
| - luxia | |
| - meta | |
| - llama-3 | |
| - pytorch | |
| # Model Details | |
| Saltlux, AI Labs ์ธ์ด๋ชจ๋ธํ์์ ํ์ต ๋ฐ ๊ณต๊ฐํ <b>Ko-Llama3-Luxia-8B</b> ๋ชจ๋ธ์ Meta์์ ์ถ์ํ Llama-3-8B ๋ชจ๋ธ์ <b>ํ๊ตญ์ด์ ํนํ</b>ํ ๋ชจ๋ธ์ ๋๋ค.<br><br> | |
| ์์ฒด ๋ณด์ ํ๊ณ ์๋ 1TB ์ด์์ ํ๊ตญ์ด ํ์ต ๋ฐ์ดํฐ ์ค, ์ฝ 100GB ์ ๋์ ๋ฐ์ดํฐ๋ฅผ ์ ๋ณํ์ฌ ์ฌ์ ํ์ต์ ํ์ฉํ์์ต๋๋ค.<br><br> | |
| ๋ํ ๊ณต๊ฐ๋ Llama-3 Tokenizer๋ฅผ ํ๊ตญ์ด๋ก ํ์ฅํ๊ณ ์ฌ์ ํ์ต์ ํ์ฉํ์ต๋๋ค. | |
| - **Meta Llama-3:** Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks. Further, in developing these models, we took great care to optimize helpfulness and safety. | |
| - **License:** Llama3 License: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license) | |
| ### Intended Use | |
| Ko-Llama3-Luxia-8B๋ ์ฐ๊ตฌ์ฉ์ผ๋ก ์ ์๋์์ผ๋ฉฐ, ๋ค์ํ ์์ฐ์ด ์์ฑ ํ์คํฌ๋ฅผ ์ํด ์์ ๋กญ๊ฒ ํ์ต ๋ฐ ํ์ฉํ ์ ์์ต๋๋ค. | |
| ### How to Use | |
| ํด๋น ๋ชจ๋ธ ์นด๋์๋ `Ko-Llama3-Luxia-8B` ๋ชจ๋ธ๊ณผ transformers ๋ผ์ด๋ธ๋ฆฌ๋ฌ ๊ธฐ๋ฐ์ ์์ ์ฝ๋๋ฅผ ์ ๊ณตํฉ๋๋ค. | |
| ``` | |
| import transformers | |
| import torch | |
| model_id = "saltlux/Ko-Llama3-Luxia-8B" | |
| pipeline = transformers.pipeline( | |
| "text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto" | |
| ) | |
| pipeline("<|begin_of_text|>์๋ ํ์ธ์. ์ํธ๋ฃฉ์ค AI Labs ์ ๋๋ค.") | |
| ``` | |
| # Training Details | |
| Ko-Llama3-Luxia-8B ๋ชจ๋ธ ํ์ต์ ์ํด ํ์ฉํ ํ์ต ๋ฐ์ดํฐ ๋ฐ ์ฅ๋น๋ Saltlux์์ ๋ณด์ ํ๊ณ ์๋ ์์ฒด ํ๊ตญ์ด ์ฝํผ์ค ๋ฐ H100 ์ธ์คํด์ค๋ฅผ ํ์ฉํ์ต๋๋ค. | |
| ํ๊ตญ์ด ํนํ๋ฅผ ์ํ ์ฌ์ ํ์ต ๋ฐ์ดํฐ๋ ์์ฒด ๋ณด์ ํ๊ณ ์๋ 2023๋ ์ต์ ๋ด์ค, ๋ฒ๋ฅ , ํนํ, ์๋ฃ, ์ญ์ฌ, ์ฌํ, ๋ฌธํ, ๋ํ(๋ฌธ์ด/๊ตฌ์ด) ๋ฑ์ ๋๋ฉ์ธ์ ํฌํจํ 100GB ์์ค์ ์ฝํผ์ค๋ก ์ฌ์ ํ์ต ๋์์ต๋๋ค.<br> | |
| ### Use Device | |
| NVIDIA H100 80GB * 8EA ์ฅ๋น๋ฅผ ํ์ฉํ์ฌ ์ฌ์ ํ์ต์ ์งํํ์์ต๋๋ค. | |
| #### Training Hyperparameters | |
| <table> | |
| <tr> | |
| <td><strong>Model</strong> | |
| </td> | |
| <td><strong>Params</strong> | |
| </td> | |
| <td><strong>Context length</strong> | |
| </td> | |
| <td><strong>GQA</strong> | |
| </td> | |
| <td><strong>Learning rate</strong> | |
| </td> | |
| <td><strong>Batch</strong> | |
| </td> | |
| <td><strong>Precision</strong> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Ko-Llama3-Luxia-8B | |
| </td> | |
| <td>8B | |
| </td> | |
| <td>8k | |
| </td> | |
| <td>yes | |
| </td> | |
| <td>1e-5 | |
| </td> | |
| <td>128 | |
| </td> | |
| <td>bf16 | |
| </td> | |
| </tr> | |
| </table> | |
| ### Tokenizer | |
| Llama-3-Tokenizer๋ฅผ ํ๊ตญ์ด ํนํํ๊ธฐ ์ํด ํ๊ตญ์ด ํ ํฐ 17,536๊ฐ๋ฅผ ์ถ๊ฐํ๊ณ ํ์ฉํ์์ต๋๋ค. | |
| <table> | |
| <tr> | |
| <td><strong>Model</strong> | |
| </td> | |
| <td><strong>Vocab Size</strong> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Llama-3 | |
| </td> | |
| <td>128,256 | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Llama-3-Luxia-Ko | |
| </td> | |
| <td>145,792 | |
| </td> | |
| </tr> | |
| </table> | |
| #### Tokenizer Result | |
| + Ko | |
| <table> | |
| <tr> | |
| <td><strong>์ ๋ ฅ</strong> | |
| </td> | |
| <td><strong>Llama-3</strong> | |
| </td> | |
| <td><strong>Llama-3-Luxia-Ko</strong> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>์์ฆ ๋ ์จ๊ฐ ๋๋ฌด ์ค๋ฝ๊ฐ๋ฝํด์ ์์ง๋ ๊ฒจ์ธ์ท์ ๋ชป์น์ ์ด์.. | |
| </td> | |
| <td>['์', '์ฆ', ' ๋ ', '์จ', '๊ฐ', ' ๋๋ฌด', ' ์ค', '๋ฝ', '๊ฐ', '๋ฝ', 'ํด์', ' ์์ง', '๋', ' ๊ฒจ', '์ธ', '๏ฟฝ', '๏ฟฝ', '์', ' ๋ชป', '์น', '์ ', '์ด์', '..'] | |
| </td> | |
| <td>['์์ฆ', ' ๋ ์จ', '๊ฐ', ' ๋๋ฌด', ' ์ค๋ฝ', '๊ฐ๋ฝ', 'ํด์', ' ์์ง', '๋', ' ๊ฒจ์ธ', '์ท', '์', ' ๋ชป', '์น', '์ ', '์ด์', '..'] | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>๋ง์๋ ๋ฐฅ์ ๋์ จ์ต๋๊น? ๋ง์ด ๊ถ๊ธํ๋ค์. | |
| </td> | |
| <td>['๋ง', '์๋', ' ๏ฟฝ', '๏ฟฝ', '์', ' ๋', '์ จ', '์ต', '๋๊น', '?', ' ๋ง', '์ด', ' ๊ถ๊ธ', 'ํ', '๋ค์', '.'] | |
| </td> | |
| <td>['๋ง', '์๋', ' ๋ฐฅ', '์', ' ๋์ จ', '์ต', '๋๊น', '?', ' ๋ง', '์ด', ' ๊ถ๊ธ', 'ํ', '๋ค์', '.'] | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>๋๋ฒ์๋ถํฐ ํ๊ธ์ฌ ํ๋ก๊น์ง ์ํ๋ ํ๋ก๋ฅผ ์ฐพ๋ ๊ฐ์ฅ ๋น ๋ฅธ ๋ฐฉ๋ฒ - ์๋ฉด ๊ฒ์, ์์ฒญ ํ๋ก, ์ ์ฌ ํ๋ก, AI ์ถ์ฒ, ํ๋ก ๋ฐ ๋ฒ๋ น ๊ฒ์. | |
| </td> | |
| <td>['๋', '๋ฒ', '์', '๋ถํฐ', ' ํ', '๊ธ', '์ฌ', ' ํ', '๋ก', '๊น์ง', ' ์', 'ํ๋', ' ํ', '๋ก', '๋ฅผ', ' ์ฐพ', '๋', ' ๊ฐ์ฅ', ' ๋น ', '๋ฅธ', ' ๋ฐฉ๋ฒ', ' -', ' ์', '๋ฉด', ' ๊ฒ์', ',', ' ์์ฒญ', ' ํ', '๋ก', ',', ' ์ ', '์ฌ', ' ํ', '๋ก', ',', ' AI', ' ์ถ์ฒ', ',', ' ํ', '๋ก', ' ๋ฐ', ' ๋ฒ', '๋ น', ' ๊ฒ์', '.'] | |
| </td> | |
| <td>['๋', '๋ฒ', '์', '๋ถํฐ', ' ํ', '๊ธ', '์ฌ', ' ํ๋ก', '๊น์ง', ' ์', 'ํ๋', ' ํ๋ก', '๋ฅผ', ' ์ฐพ', '๋', ' ๊ฐ์ฅ', ' ๋น ๋ฅธ', ' ๋ฐฉ๋ฒ', ' -', ' ์๋ฉด', ' ๊ฒ์', ',', ' ์์ฒญ', ' ํ๋ก', ',', ' ์ ์ฌ', ' ํ๋ก', ',', ' AI', ' ์ถ์ฒ', ',', ' ํ๋ก', ' ๋ฐ', ' ๋ฒ๋ น', ' ๊ฒ์', '.'] | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>๋ณธ ๋ฐ๋ช ์ ๊ธ์ํ์ ๋ค์ ๋ถ๋ถ์ ์์นญ์์ผ ํน์ ๋ฌด๋ฌ๋ชจ์์ ํ์ฑํ๋ ๊ฑด์ถ์ฉ ๊ธ์์ฌ ์ฅ์ํ์ผ๋ก ์ด๋ฃจ์ด์ง ๊ฒ์ ํน์ง์ด ์๋ค. | |
| </td> | |
| <td>['๋ณธ', ' ๋ฐ', '๋ช ', '์', ' ๊ธ', '์', 'ํ', '์', ' ๋ค', '์', ' ๋ถ๋ถ', '์', ' ์', '์นญ', '์', '์ผ', ' ํน', '์ ', ' ๋ฌด', '๏ฟฝ', '๏ฟฝ', '๋ชจ', '์', '์', ' ํ', '์ฑ', 'ํ๋', ' ๊ฑด', '์ถ', '์ฉ', ' ๊ธ', '์', '์ฌ', ' ์ฅ', '์', 'ํ', '์ผ๋ก', ' ์ด๋ฃจ', '์ด์ง', ' ๊ฒ', '์', ' ํน', '์ง', '์ด', ' ์๋ค', '.'] | |
| </td> | |
| <td>['๋ณธ', ' ๋ฐ๋ช ', '์', ' ๊ธ์', 'ํ', '์', ' ๋ค์', ' ๋ถ๋ถ', '์', ' ์์นญ', '์', '์ผ', ' ํน์ ', ' ๋ฌด๋ฌ', '๋ชจ', '์', '์', ' ํ์ฑ', 'ํ๋', ' ๊ฑด์ถ', '์ฉ', ' ๊ธ์', '์ฌ', ' ์ฅ์', 'ํ', '์ผ๋ก', ' ์ด๋ฃจ์ด์ง', ' ๊ฒ', '์', ' ํน์ง', '์ด', ' ์๋ค', '.'] | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>๊ณจ๋ค๊ณต์ฆ์ ์ ์๊ธฐ๋๊ฑฐ์์? ๊ทธ๋ฆฌ๊ณ ์น๋ฃํ๋ ค๋ฉด ์ด๋ป๊ฒํด์ผํ์ฃ ? | |
| </td> | |
| <td>['๊ณจ', '๋ค', '๊ณต', '์ฆ', '์', ' ์', ' ์', '๊ธฐ๋', '๊ฑฐ', '์', '์', '?', ' ๊ทธ๋ฆฌ๊ณ ', ' ์น', '๋ฃ', 'ํ๋ ค', '๋ฉด', ' ์ด๋ป๊ฒ', 'ํด์ผ', 'ํ', '์ฃ ', '?'] | |
| </td> | |
| <td>['๊ณจ', '๋ค', '๊ณต์ฆ', '์', ' ์', ' ์', '๊ธฐ๋', '๊ฑฐ', '์', '์', '?', ' ๊ทธ๋ฆฌ๊ณ ', ' ์น๋ฃ', 'ํ๋ ค', '๋ฉด', ' ์ด๋ป๊ฒ', 'ํด์ผ', 'ํ', '์ฃ ', '?'] | |
| </td> | |
| </tr> | |
| </table> | |
| + En | |
| <table> | |
| <tr> | |
| <td><strong>์ ๋ ฅ</strong> | |
| </td> | |
| <td><strong>Llama-3</strong> | |
| </td> | |
| <td><strong>Llama-3-Luxia-Ko</strong> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Korean cuisine, hanguk yori, or hansik, has evolved through centuries of social and political change. | |
| </td> | |
| <td>['K', 'orean', ' cuisine', ',', ' h', 'angu', 'k', ' y', 'ori', ',', ' or', ' hans', 'ik', ',', ' has', ' evolved', ' through', ' centuries', ' of', ' social', ' and', ' political', ' change', '.'] | |
| </td> | |
| <td>['K', 'orean', ' cuisine', ',', ' h', 'angu', 'k', ' y', 'ori', ',', ' or', ' hans', 'ik', ',', ' has', ' evolved', ' through', ' centuries', ' of', ' social', ' and', ' political', ' change', '.'] | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Son Heung-min is a South Korean professional footballer who plays as a forward for and captains both Premier League club Tottenham Hotspur and the South Korea national team. | |
| </td> | |
| <td>['Son', ' He', 'ung', '-min', ' is', ' a', ' South', ' Korean', ' professional', ' football', 'er', ' who', ' plays', ' as', ' a', ' forward', ' for', ' and', ' captains', ' both', ' Premier', ' League', ' club', ' Tottenham', ' Hot', 'sp', 'ur', ' and', ' the', ' South', ' Korea', ' national', ' team', '.'] | |
| </td> | |
| <td>['Son', ' He', 'ung', '-min', ' is', ' a', ' South', ' Korean', ' professional', ' football', 'er', ' who', ' plays', ' as', ' a', ' forward', ' for', ' and', ' captains', ' both', ' Premier', ' League', ' club', ' Tottenham', ' Hot', 'sp', 'ur', ' and', ' the', ' South', ' Korea', ' national', ' team', '.'] | |
| </td> | |
| </tr> | |
| </table> | |
| ### Citation instructions | |
| **Llama-3-Luxia-Ko** | |
| ``` | |
| @article{llama3luxiakomodelcard, | |
| title={Llama 3 Luxua Ko Model Card}, | |
| author={AILabs@Saltux}, | |
| year={2024}, | |
| url={์์ ์์ } | |
| } | |
| ``` | |
| **Original Llama-3** | |
| ``` | |
| @article{llama3modelcard, | |
| title={Llama 3 Model Card}, | |
| author={AI@Meta}, | |
| year={2024}, | |
| url={https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md} | |
| } | |
| ``` |