Instructions to use splo2t/deft-korean-alpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use splo2t/deft-korean-alpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="splo2t/deft-korean-alpaca")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("splo2t/deft-korean-alpaca") model = AutoModelForCausalLM.from_pretrained("splo2t/deft-korean-alpaca", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use splo2t/deft-korean-alpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "splo2t/deft-korean-alpaca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "splo2t/deft-korean-alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/splo2t/deft-korean-alpaca
- SGLang
How to use splo2t/deft-korean-alpaca 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 "splo2t/deft-korean-alpaca" \ --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": "splo2t/deft-korean-alpaca", "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 "splo2t/deft-korean-alpaca" \ --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": "splo2t/deft-korean-alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use splo2t/deft-korean-alpaca with Docker Model Runner:
docker model run hf.co/splo2t/deft-korean-alpaca
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
DEFT: Korean Alpaca Model (Kogpt-Version)
์นด์นด์ค๋ธ๋ ์ธ์์ ๊ณต๊ฐํ ํ๊ตญ์ด GPT์ธ Kogpt ๋ชจ๋ธ์ ๊ธฐ๋ฐ์ผ๋ก Stanford Alpaca์ ํ์ต ๋ฐฉ๋ฒ + LoRA ๊ธฐ๋ฒ๊ณผ KoAlpaca์ ๋ฐ์ดํฐ์ ์ผ๋ก ํ์ตํ ํ๊ตญ์ด Alpaca๋ชจ๋ธ DEFT์ ๋๋ค.
hugginface์ peft๋ฅผ ์ฌ์ฉํด ํ์ตํ๊ณ ์ ํ์ผ๋, ์์ง Embedding Layer๋จ์ LoRA ๊ธฐ๋ฒ ์ ์ฉ์ด ๋ถ๊ฐ๋ฅํ์ฌ ๋ถ๋์ดํ๊ฒ ๋ฐ๋ก ๊ตฌํํ ๋ฐฉ์์ ์ฌ์ฉํ์์ต๋๋ค.
๋ฐ๋ผ์ ๋ชจ๋ธ์ Huggingface์์ ๋ค์ด ๋ฐ์ผ์ ํ ๋ณธ ๋ชจ๋ธ github(https://github.com/Data-Intelligence-Lab/DEFT-korean-alpaca)์ test-deft-chat.ipynb๋ฅผ ์ฐธ๊ณ ํ์ฌ ์ฌ์ฉํ์๊ธฐ ๋ฐ๋๋๋ค.
ํ์ฌ ๋ชจ๋ธ์ ํ๊ตญ์ด ์ ์ฉ์ด๋ฉฐ Multi-Turn์ด ๋ถ๊ฐ๋ฅํ๊ณ , ๊ณต๊ฒฉ์ , ์ฐจ๋ณ์ ์ธ ์ธ์ด์ ๊ฐ์ ์ฌํ์ ์ผ๋ก ํต๋ ๋์ง ์์ ํํ์ ๋ํ ์ฒ๋ฆฌ๊ฐ ๋์ด์์ง ์์ต๋๋ค.
- Downloads last month
- 28