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
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,18 +11,17 @@ tags:
|
|
| 11 |
- llama-3
|
| 12 |
- pytorch
|
| 13 |
---
|
| 14 |
-
# Llama-3-Luxia-Ko-8B
|
| 15 |
-
**Built with Meta Llama 3**<br>
|
| 16 |
-
Meta์์ ์ถ์ํ Llama-3 ๋ชจ๋ธ vocab 128,256๊ฐ์ ํ๊ตญ์ด vocab 17,536๊ฐ๋ฅผ ์ถ๊ฐํ์ฌ ์ด 145,792๊ฐ์ vocab์ ํ๋ณดํ์์ต๋๋ค.<br>
|
| 17 |
-
์ดํ ๋ค์ํ ๋๋ฉ์ธ์ ํ๊ตญ์ด ์ฝํผ์ค ์ฝ 95GB๋ฅผ ์ถ๊ฐํ์ฌ ํ์ต๋ ํ๊ตญ์ด ํนํ ์ฌ์ ํ์ต ์ธ์ด๋ชจ๋ธ์
๋๋ค.
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
- **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.
|
| 22 |
|
| 23 |
### Model Description
|
| 24 |
-
- **
|
| 25 |
-
- **
|
| 26 |
- **Input:** ํ
์คํธ๋ง ์
๋ ฅํฉ๋๋ค.
|
| 27 |
- **Output:** ํ
์คํธ์ ์ฝ๋๋ฅผ ์์ฑํฉ๋๋ค.
|
| 28 |
- **Model Architecture:** Llama-3-Luxia-Ko ๋ชจ๋ธ์ Meta์์ ์ถ์ํ Llama-3์ ๊ฐ์ auto-regressive ์ธ์ด๋ชจ๋ธ๋ก ์ต์ ํ๋ transformer ์ํคํ
์ณ๋ฅผ ์ฌ์ฉํฉ๋๋ค.
|
|
@@ -30,9 +29,9 @@ Meta์์ ์ถ์ํ Llama-3 ๋ชจ๋ธ vocab 128,256๊ฐ์ ํ๊ตญ์ด vocab 17,536
|
|
| 30 |
- **Status:** ์ด ๋ชจ๋ธ์ ์คํ๋ผ์ธ ๋ฐ์ดํฐ ์ธํธ์์ ํ๋ จ๋ Staticํ ๋ชจ๋ธ์
๋๋ค. ์ปค๋ฎค๋ํฐ์ ํผ๋๋ฐฑ์ ํตํด ๋ชจ๋ธ ์์ ์ฑ์ ๊ฐ์ ํจ์ ๋ฐ๋ผ ์กฐ์ ๋ ๋ชจ๋ธ์ ํฅํ ๋ฒ์ ์ด ์ถ์๋ ์์ ์
๋๋ค.
|
| 31 |
- **License:** Llama3 License: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
|
| 32 |
|
| 33 |
-
## Intended Use
|
| 34 |
-
|
| 35 |
-
|
| 36 |
### How to Use
|
| 37 |
์ด ์ ์ฅ์์๋ transformers์ ํจ๊ป ์ฌ์ฉํ ์ ์๋ ์ฝ๋๋ฒ ์ด์ค์ `Llama-3-Luxia-Ko-8B`๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
|
| 38 |
|
|
@@ -45,58 +44,54 @@ model_id = "Saltlux/Llama-3-Luxia-Ko-8B"
|
|
| 45 |
pipeline = transformers.pipeline(
|
| 46 |
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
|
| 47 |
)
|
| 48 |
-
pipeline("<|begin_of_text|>์๋
ํ์ธ์
|
| 49 |
|
| 50 |
```
|
| 51 |
-
|
| 52 |
-
|
| 53 |
|
| 54 |
### Training Data
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
###
|
| 59 |
-
ํ๊ตญ์ด
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
- ์งง์ ํ
์คํธ (120 ์์ ๋ฏธ๋ง) ํํฐ๋ง
|
| 63 |
-
- ๊ธด ํ
์คํธ (100,000 ์์ ์ด์) ํํฐ๋ง
|
| 64 |
-
- ํ๊ตญ์ด ๋น์จ์ด 25% ๋ฏธ๋ง์ธ ๊ฒฝ์ฐ ํํฐ๋ง
|
| 65 |
-
- ๊ธ๋จธ๋ฆฌ ๊ธฐํธ๊ฐ 90% ์ด์์ธ ๊ฒฝ์ฐ ํํฐ๋ง
|
| 66 |
-
- ์์ค์ด ์๋ ๊ฒฝ์ฐ ํํฐ๋ง
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
- ์ด๋ชจ์
๋ฌธ์ ์ ๊ทํ (์ต๋ 2๊ฐ๊น์ง ํ์ฉ)
|
| 70 |
-
- ๊ฐํ ๋ฌธ์ ์ ๊ทํ (์ต๋ 2๊ฐ๊น์ง ํ์ฉ)
|
| 71 |
-
- HTML ํ๊ทธ ์ ๊ฑฐ
|
| 72 |
-
- ๋ถํ์ํ ๋ฌธ์ ์ ๊ฑฐ
|
| 73 |
-
- ๋น์๋ณํ ์งํ (ํด๋ํฐ ๋ฒํธ, ๊ณ์ข๋ฒํธ ๋ฑ์ ๊ฐ์ธ์ ๋ณด)
|
| 74 |
-
- ์ค๋ณต ๋ฌธ์์ด ์ ๊ฑฐ
|
| 75 |
-
|
| 76 |
-
###
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
### Hardware and Hyperparameters
|
| 85 |
-
- **Overview:** Saltlux-Ko-Llama-3 ํ์ต์ ํ์ฉํ ์ฅ๋น์ ํ์ต ํ๋ผ๋ฏธํฐ์
๋๋ค.
|
| 86 |
-
|
| 87 |
-
#### Use Device
|
| 88 |
-
NVIDIA H100 80GB * 8GA์ ํ์ฉํ์ฌ ๋ชจ๋ธ ์ฌ์ ํ์ต์ ์งํํ์์ต๋๋ค.
|
| 89 |
|
| 90 |
#### Training Hyperparameters
|
| 91 |
-
|Model|Params|Context length|GQA|Learning rate|Batch|Precision|
|
| 92 |
-
|---
|
| 93 |
-
|
|
| 94 |
|
| 95 |
### Tokenizer
|
| 96 |
-
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
|
|
|
| 100 |
|
| 101 |
#### Tokenizer Result
|
| 102 |
<table>
|
|
@@ -150,17 +145,11 @@ NVIDIA H100 80GB * 8GA์ ํ์ฉํ์ฌ ๋ชจ๋ธ ์ฌ์ ํ์ต์ ์งํํ์์ต๋
|
|
| 150 |
</tr>
|
| 151 |
</table>
|
| 152 |
|
| 153 |
-
##
|
| 154 |
-
Saltlux AILabs ์ธ์ด๋ชจ๋ธํ
|
| 155 |
-
|
| 156 |
-
## Model Card Contact
|
| 157 |
-
Saltlux AILabs ์ธ์ด๋ชจ๋ธํ
|
| 158 |
-
|
| 159 |
-
## Citation instructions
|
| 160 |
**Llama-3-Luxia-Ko**
|
| 161 |
```
|
| 162 |
@article{llama3luxiakomodelcard,
|
| 163 |
-
title={
|
| 164 |
author={AILabs@Saltux},
|
| 165 |
year={2024},
|
| 166 |
url={์์ ์์ }
|
|
|
|
| 11 |
- llama-3
|
| 12 |
- pytorch
|
| 13 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
# Model Details
|
| 16 |
+
Saltlux, AI Labs์์ ํ์ต ๋ฐ ๊ณต๊ฐํ <b>Llama-3-Luxia-Ko-8B</b> ๋ชจ๋ธ์ Meta์์ ์ถ์ํ Llama-3-8B ๋ชจ๋ธ์ <b>ํ๊ตญ์ด์ ํนํ</b>ํ ๋ชจ๋ธ์
๋๋ค.<br><br>
|
| 17 |
+
์์ฒด ๋ณด์ ํ๊ณ ์๋ 1TB ์ด์์ ํ๊ตญ์ด ํ์ต ๋ฐ์ดํฐ ์ค, ์ฝ 100GB ์ ๋์ ๋ฐ์ดํฐ๋ฅผ ์ ๋ณํ์ฌ ์ฌ์ ํ์ต์ ์ํํ์ต๋๋ค.<br><br>
|
| 18 |
+
๋ํ ๊ณต๊ฐ๋ Llama-3 Tokenizer๋ฅผ ํ๊ตญ์ด๋ก ํ์ฅํ๊ณ ์ฌ์ ํ์ต์ ํ์ฉํ์ต๋๋ค.
|
| 19 |
+
|
| 20 |
- **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.
|
| 21 |
|
| 22 |
### Model Description
|
| 23 |
+
- **Model developers:** Saltlux, AI Labs ์ธ์ด๋ชจ๋ธํ
|
| 24 |
+
- **Variation:** Llama-3-Luxia-Ko 8B ํ๋ผ๋ฏธํฐ ์์ค์ ์ฌ์ ํ์ต ๋ชจ๋ธ
|
| 25 |
- **Input:** ํ
์คํธ๋ง ์
๋ ฅํฉ๋๋ค.
|
| 26 |
- **Output:** ํ
์คํธ์ ์ฝ๋๋ฅผ ์์ฑํฉ๋๋ค.
|
| 27 |
- **Model Architecture:** Llama-3-Luxia-Ko ๋ชจ๋ธ์ Meta์์ ์ถ์ํ Llama-3์ ๊ฐ์ auto-regressive ์ธ์ด๋ชจ๋ธ๋ก ์ต์ ํ๋ transformer ์ํคํ
์ณ๋ฅผ ์ฌ์ฉํฉ๋๋ค.
|
|
|
|
| 29 |
- **Status:** ์ด ๋ชจ๋ธ์ ์คํ๋ผ์ธ ๋ฐ์ดํฐ ์ธํธ์์ ํ๋ จ๋ Staticํ ๋ชจ๋ธ์
๋๋ค. ์ปค๋ฎค๋ํฐ์ ํผ๋๋ฐฑ์ ํตํด ๋ชจ๋ธ ์์ ์ฑ์ ๊ฐ์ ํจ์ ๋ฐ๋ผ ์กฐ์ ๋ ๋ชจ๋ธ์ ํฅํ ๋ฒ์ ์ด ์ถ์๋ ์์ ์
๋๋ค.
|
| 30 |
- **License:** Llama3 License: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
|
| 31 |
|
| 32 |
+
### Intended Use
|
| 33 |
+
Llama-3-Luxia-Ko๋ ํ๊ตญ์ด ํนํ ์ธ์ด๋ชจ๋ธ๋ก ์ฐ๊ตฌ์ฉ์ผ๋ก ์ ์๋์์ผ๋ฉฐ, ๋ค์ํ ์์ฐ์ด ์์ฑ ์์
์ ๋ง๊ฒ ์ฌํ์ฉ ๋ฐ ๋ณํ๋ ์ ์์ต๋๋ค.
|
| 34 |
+
|
| 35 |
### How to Use
|
| 36 |
์ด ์ ์ฅ์์๋ transformers์ ํจ๊ป ์ฌ์ฉํ ์ ์๋ ์ฝ๋๋ฒ ์ด์ค์ `Llama-3-Luxia-Ko-8B`๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
|
| 37 |
|
|
|
|
| 44 |
pipeline = transformers.pipeline(
|
| 45 |
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
|
| 46 |
)
|
| 47 |
+
pipeline("<|begin_of_text|>์๋
ํ์ธ์. ์ํธ๋ฃฉ์ค AI Labs ์
๋๋ค.")
|
| 48 |
|
| 49 |
```
|
| 50 |
+
# Training Details
|
| 51 |
+
Llama-3-Luxia-Ko ๋ชจ๋ธ ํ์ต์ ์ํด ํ์ฉํ ํ์ต ๋ฐ์ดํฐ ๋ฐ ์ฅ๋น๋ Saltlux์์ ๋ณด์ ํ๊ณ ์๋ ์์ฒด ํ๊ตญ์ด ์ฝํผ์ค ๋ฐ H100 ์ธ์คํด์ค๋ฅผ ํ์ฉํ์ต๋๋ค.
|
| 52 |
|
| 53 |
### Training Data
|
| 54 |
+
Llama-3-Luxia-Ko๋ ๊ณต๊ฐ์ ์ผ๋ก ์ฌ์ฉ ๊ฐ๋ฅํ ์ฝํผ์ค์ ํจ๊ป ์์ฒด์ ์ผ๋ก ์์งํ 2023๋
์ต์ ๋ด์ค๋ฐ์ดํฐ๋ฅผ ํฌํจํ์ฌ ์ฝ 100GB ์ฝํผ์ค๋ก ์ฌ์ ํ์ต ๋์์ต๋๋ค.<br>
|
| 55 |
+
์ฌ์ ํ์ต ๋ฐ์ดํฐ๋ ์ผ๋ฐ ๋ถ์ผ ์ด์ธ์๋ ๋ฒ๋ฅ , ํนํ, ์๋ฃ, ์ญ์ฌ, ์ฌํ, ๋ฌธํ, ๋ํ(๋ฌธ์ด/๊ตฌ์ด) ๋ฑ ๋ค์ํ ๋๋ฉ์ธ์ด ํฌํจ๋์ด์์ต๋๋ค.
|
| 56 |
+
|
| 57 |
+
### Data Preprocessing
|
| 58 |
+
๋ณด์ ํ๊ณ ์๋ ํ๊ตญ์ด ๋ฐ์ดํฐ์ ํ์ง ํฅ์์ ์ํด ๋ฌธ์ ์ญ์ (Document Delete), ๋ฌธ์ ์์ (Document Modify) ์์ค์ ์ ์ฒ๋ฆฌ ๋ฐฉ์์ ์๋ฆฝํ๊ณ ์ ์ฉํฉ๋๋ค.
|
| 59 |
+
|
| 60 |
+
+ **Document Delete**
|
| 61 |
+
- ์งง์ ํ
์คํธ (120 ์์ ๋ฏธ๋ง) ํํฐ๋ง
|
| 62 |
+
- ๊ธด ํ
์คํธ (100,000 ์์ ์ด์) ํํฐ๋ง
|
| 63 |
+
- ํ๊ตญ์ด ๋น์จ์ด 25% ๋ฏธ๋ง์ธ ๊ฒฝ์ฐ ํํฐ๋ง
|
| 64 |
+
- ๊ธ๋จธ๋ฆฌ ๊ธฐํธ๊ฐ 90% ์ด์์ธ ๊ฒฝ์ฐ ํํฐ๋ง
|
| 65 |
+
- ์์ค์ด ์๋ ๊ฒฝ์ฐ ํํฐ๋ง
|
| 66 |
+
|
| 67 |
+
+ **Document Modify**
|
| 68 |
+
- ์ด๋ชจ์
๋ฌธ์ ์ ๊ทํ (์ต๋ 2๊ฐ๊น์ง ํ์ฉ)
|
| 69 |
+
- ๊ฐํ ๋ฌธ์ ์ ๊ทํ (์ต๋ 2๊ฐ๊น์ง ํ์ฉ)
|
| 70 |
+
- HTML ํ๊ทธ ์ ๊ฑฐ
|
| 71 |
+
- ๋ถํ์ํ ๋ฌธ์ ์ ๊ฑฐ
|
| 72 |
+
- ๋น์๋ณํ ์งํ (ํด๋ํฐ ๋ฒํธ, ๊ณ์ข๋ฒํธ ๋ฑ์ ๊ฐ์ธ์ ๋ณด)
|
| 73 |
+
- ์ค๋ณต ๋ฌธ์์ด ์ ๊ฑฐ
|
| 74 |
+
|
| 75 |
+
### Data Sampling
|
| 76 |
+
Llama-3-Luxia-Ko-8B ๋ชจ๋ธ ํ์ต์ ์ํด 1TB ์์ค์ ํ๊ตญ์ด ์ฝํผ์ค์ 10๋ถ์ 1์ธ 100GB ๋ฐ์ดํฐ๋ฅผ ์ํ๋งํฉ๋๋ค.<br><br>๋ฐ์ดํฐ ์ํ๋ง์ ๋ค์ํ ๋๋ฉ์ธ๊ณผ ๋ด์ฉ์ด ํฌํจ๋ ์ ์๋๋ก ๊ณ ๋ คํ์ฌ ์ํ๋งํ๋ฉฐ ๋ฐฉ๋ฒ์ ์๋์ ๊ฐ์ต๋๋ค.<br>
|
| 77 |
+
+ ์ํ๋ง ๋์์ 10GB ์ด์์ ํฌ๊ธฐ๋ฅผ ๊ฐ์ง๋ ๋๋ฉ์ธ ์ฝํผ์ค
|
| 78 |
+
+ ๋๋ฉ์ธ ์ฝํผ์ค ๋ด ๋ช
์ฌ, ๋ณตํฉ๋ช
์ฌ ๊ธฐ๋ฐ ํค์๋ ์ฌ์ ๊ตฌ์ถ
|
| 79 |
+
+ ๋ฑ์ฅํ๋ ํค์๋์ DF(Document Frequency)๊ฐ ์๊ณ๊ฐ ์ด์์ผ ๊ฒฝ์ฐ ํด๋น ํค์๋๊ฐ ํฌํจ๋ ๋ฌธ์๋ ์ํ๋ง์ ์ค๋จ
|
| 80 |
+
|
| 81 |
+
### Use Device
|
| 82 |
+
NVIDIA H100 80GB * 8EA์ ํ์ฉํ์ฌ ๋ชจ๋ธ ์ฌ์ ํ์ต์ ์งํํ์์ต๋๋ค.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
#### Training Hyperparameters
|
| 85 |
+
|Model|Params|Context length|GQA|Learning rate|Batch|Precision|
|
| 86 |
+
|---|---|---|---|---|---|---|
|
| 87 |
+
|Llama-3-Luxia-Ko|8B|8k|Yes|1e-5|128|bf16|
|
| 88 |
|
| 89 |
### Tokenizer
|
| 90 |
+
Llama-3-Tokenizer๋ฅผ ํ๊ตญ์ด ํนํํ๊ธฐ ์ํด ํ๊ตญ์ด ํ ํฐ 17,536๊ฐ๋ฅผ ์ถ๊ฐํ๊ณ ํ์ฉํ์์ต๋๋ค.
|
| 91 |
+
|Model|Vocab Size|
|
| 92 |
+
|---|---|
|
| 93 |
+
|Llama-3|128,256|
|
| 94 |
+
|Llama-3-Luxia-Ko|145,792|
|
| 95 |
|
| 96 |
#### Tokenizer Result
|
| 97 |
<table>
|
|
|
|
| 145 |
</tr>
|
| 146 |
</table>
|
| 147 |
|
| 148 |
+
### Citation instructions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
**Llama-3-Luxia-Ko**
|
| 150 |
```
|
| 151 |
@article{llama3luxiakomodelcard,
|
| 152 |
+
title={Llama 3 Luxua Ko Model Card},
|
| 153 |
author={AILabs@Saltux},
|
| 154 |
year={2024},
|
| 155 |
url={์์ ์์ }
|