Instructions to use GAI-LLM/Llama-3-8B_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GAI-LLM/Llama-3-8B_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GAI-LLM/Llama-3-8B_classification")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GAI-LLM/Llama-3-8B_classification") model = AutoModelForCausalLM.from_pretrained("GAI-LLM/Llama-3-8B_classification") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GAI-LLM/Llama-3-8B_classification with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GAI-LLM/Llama-3-8B_classification" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAI-LLM/Llama-3-8B_classification", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GAI-LLM/Llama-3-8B_classification
- SGLang
How to use GAI-LLM/Llama-3-8B_classification 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 "GAI-LLM/Llama-3-8B_classification" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAI-LLM/Llama-3-8B_classification", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "GAI-LLM/Llama-3-8B_classification" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAI-LLM/Llama-3-8B_classification", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GAI-LLM/Llama-3-8B_classification with Docker Model Runner:
docker model run hf.co/GAI-LLM/Llama-3-8B_classification
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
+
language:
|
| 4 |
+
- ko
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
**The license is `cc-by-nc-4.0`.**
|
| 11 |
+
|
| 12 |
+
# **GAI-LLM/Llama-3-8B_classification**
|
| 13 |
+
|
| 14 |
+
## Model Details
|
| 15 |
+
|
| 16 |
+
**Model Developers** Donghoon Oh, Hanmin Myung, SuKyung Park (SK C&C G.AI Eng)
|
| 17 |
+
|
| 18 |
+
**Input** Models input text only.
|
| 19 |
+
|
| 20 |
+
**Output** Models generate text only.
|
| 21 |
+
|
| 22 |
+
**Model Architecture**
|
| 23 |
+
GAI-LLM/Llama-3-8B_classification is an auto-regressive language model based on the LLaMA2 transformer architecture.
|
| 24 |
+
|
| 25 |
+
**Base Model** [meta-llama/Meta-Llama-3-8B]
|
| 26 |
+
|
| 27 |
+
**Training Dataset**
|
| 28 |
+
|
| 29 |
+
- We combined Open Korean Dateset using mixed-strategy
|
| 30 |
+
- We use A100 GPU 80GB * 8, when training.
|
| 31 |
+
|
| 32 |
+
# **Model Benchmark**
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
# Implementation Code
|
| 36 |
+
```python
|
| 37 |
+
### GAI-LLM/Llama-3-8B_classification
|
| 38 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 39 |
+
import torch
|
| 40 |
+
|
| 41 |
+
repo = "GAI-LLM/Llama-3-8B_classification"
|
| 42 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 43 |
+
repo,
|
| 44 |
+
return_dict=True,
|
| 45 |
+
torch_dtype=torch.float16,
|
| 46 |
+
device_map='auto'
|
| 47 |
+
)
|
| 48 |
+
tokenizer = AutoTokenizer.from_pretrained(repo)
|
| 49 |
+
```
|