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
|
@@ -13,33 +13,24 @@ tags:
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# Model Details
|
| 16 |
-
Saltlux, AI Labs์์ ํ์ต ๋ฐ ๊ณต๊ฐํ <b>
|
| 17 |
-
์์ฒด ๋ณด์ ํ๊ณ ์๋ 1TB ์ด์์ ํ๊ตญ์ด ํ์ต ๋ฐ์ดํฐ ์ค, ์ฝ 100GB ์ ๋์ ๋ฐ์ดํฐ๋ฅผ ์ ๋ณํ์ฌ ์ฌ์ ํ์ต
|
| 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 ์ํคํ
์ณ๋ฅผ ์ฌ์ฉํฉ๋๋ค.
|
| 28 |
-
- **Model Release Date:** April 30, 2024.
|
| 29 |
-
- **Status:** ์ด ๋ชจ๋ธ์ ์คํ๋ผ์ธ ๋ฐ์ดํฐ ์ธํธ์์ ํ๋ จ๋ Staticํ ๋ชจ๋ธ์
๋๋ค. ์ปค๋ฎค๋ํฐ์ ํผ๋๋ฐฑ์ ํตํด ๋ชจ๋ธ ์์ ์ฑ์ ๊ฐ์ ํจ์ ๋ฐ๋ผ ์กฐ์ ๋ ๋ชจ๋ธ์ ํฅํ ๋ฒ์ ์ด ์ถ์๋ ์์ ์
๋๋ค.
|
| 30 |
- **License:** Llama3 License: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
|
| 31 |
|
| 32 |
### Intended Use
|
| 33 |
-
|
| 34 |
|
| 35 |
### How to Use
|
| 36 |
-
|
| 37 |
|
| 38 |
```
|
| 39 |
import transformers
|
| 40 |
import torch
|
| 41 |
|
| 42 |
-
model_id = "
|
| 43 |
|
| 44 |
pipeline = transformers.pipeline(
|
| 45 |
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
|
|
@@ -48,38 +39,11 @@ pipeline("<|begin_of_text|>์๋
ํ์ธ์. ์ํธ๋ฃฉ์ค AI Labs ์
๋๋ค.")
|
|
| 48 |
|
| 49 |
```
|
| 50 |
# Training Details
|
| 51 |
-
|
| 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 |
<table>
|
|
@@ -100,7 +64,7 @@ NVIDIA H100 80GB * 8EA์ ํ์ฉํ์ฌ ๋ชจ๋ธ ์ฌ์ ํ์ต์ ์งํํ์์ต๋
|
|
| 100 |
</td>
|
| 101 |
</tr>
|
| 102 |
<tr>
|
| 103 |
-
<td>
|
| 104 |
</td>
|
| 105 |
<td>8B
|
| 106 |
</td>
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# Model Details
|
| 16 |
+
Saltlux, AI Labs ์ธ์ด๋ชจ๋ธํ์์ ํ์ต ๋ฐ ๊ณต๊ฐํ <b>Ko-Llama3-Luxia-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 |
- **License:** Llama3 License: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
|
| 22 |
|
| 23 |
### Intended Use
|
| 24 |
+
Ko-Llama3-Luxia-8B๋ ์ฐ๊ตฌ์ฉ์ผ๋ก ์ ์๋์์ผ๋ฉฐ, ๋ค์ํ ์์ฐ์ด ์์ฑ ํ์คํฌ๋ฅผ ์ํด ์์ ๋กญ๊ฒ ํ์ต ๋ฐ ํ์ฉํ ์ ์์ต๋๋ค.
|
| 25 |
|
| 26 |
### How to Use
|
| 27 |
+
ํด๋น ๋ชจ๋ธ ์นด๋์๋ `Ko-Llama3-Luxia-8B` ๋ชจ๋ธ๊ณผ transformers ๋ผ์ด๋ธ๋ฆฌ๋ฌ ๊ธฐ๋ฐ์ ์์ ์ฝ๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
|
| 28 |
|
| 29 |
```
|
| 30 |
import transformers
|
| 31 |
import torch
|
| 32 |
|
| 33 |
+
model_id = "saltlux/Ko-Llama3-Luxia-8B"
|
| 34 |
|
| 35 |
pipeline = transformers.pipeline(
|
| 36 |
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
|
|
|
|
| 39 |
|
| 40 |
```
|
| 41 |
# Training Details
|
| 42 |
+
Ko-Llama3-Luxia-8B ๋ชจ๋ธ ํ์ต์ ์ํด ํ์ฉํ ํ์ต ๋ฐ์ดํฐ ๋ฐ ์ฅ๋น๋ Saltlux์์ ๋ณด์ ํ๊ณ ์๋ ์์ฒด ํ๊ตญ์ด ์ฝํผ์ค ๋ฐ H100 ์ธ์คํด์ค๋ฅผ ํ์ฉํ์ต๋๋ค.
|
| 43 |
+
ํ๊ตญ์ด ํนํ๋ฅผ ์ํ ์ฌ์ ํ์ต ๋ฐ์ดํฐ๋ ์์ฒด ๋ณด์ ํ๊ณ ์๋ 2023๋
์ต์ ๋ด์ค, ๋ฒ๋ฅ , ํนํ, ์๋ฃ, ์ญ์ฌ, ์ฌํ, ๋ฌธํ, ๋ํ(๋ฌธ์ด/๊ตฌ์ด) ๋ฑ์ ๋๋ฉ์ธ์ ํฌํจํ 100GB ์์ค์ ์ฝํผ์ค๋ก ์ฌ์ ํ์ต ๋์์ต๋๋ค.<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
### Use Device
|
| 46 |
+
NVIDIA H100 80GB * 8EA ์ฅ๋น๋ฅผ ํ์ฉํ์ฌ ์ฌ์ ํ์ต์ ์งํํ์์ต๋๋ค.
|
| 47 |
|
| 48 |
#### Training Hyperparameters
|
| 49 |
<table>
|
|
|
|
| 64 |
</td>
|
| 65 |
</tr>
|
| 66 |
<tr>
|
| 67 |
+
<td>Ko-Llama3-Luxia-8B
|
| 68 |
</td>
|
| 69 |
<td>8B
|
| 70 |
</td>
|