Instructions to use A2/kogpt2-taf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use A2/kogpt2-taf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="A2/kogpt2-taf")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("A2/kogpt2-taf") model = AutoModelForCausalLM.from_pretrained("A2/kogpt2-taf") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use A2/kogpt2-taf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "A2/kogpt2-taf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "A2/kogpt2-taf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/A2/kogpt2-taf
- SGLang
How to use A2/kogpt2-taf 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 "A2/kogpt2-taf" \ --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": "A2/kogpt2-taf", "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 "A2/kogpt2-taf" \ --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": "A2/kogpt2-taf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use A2/kogpt2-taf with Docker Model Runner:
docker model run hf.co/A2/kogpt2-taf
Grepp KDT AI 3๊ธฐ ๊ณผ์ ํ๋ก์ ํธ. SKT-AI/KoGPT2 ๋ชจ๋ธ์ ๊ธฐ๋ฐ. ๋ชจ๋์ ๋ง๋ญ์น์ 2021 ๋ด์ค ๋ง๋ญ์น๋ฅผ ์ถ๊ฐ๋ก ์ธ์ด๋ชจ๋ธ๋ง ํ์ต ํ, 5๋ ์ผ๊ฐ์ง(์กฐ์ ์ผ๋ณด, ์ค์์ผ๋ณด, ๋์์ผ๋ณด, ํ๊ฒจ๋ , ๊ฒฝํฅ์ ๋ฌธ)๋ณ ๊ฐ ๋ง์ฌ๊ฐ์ ์ฌ์ค๋ก ๋ฏธ์ธ์กฐ์ ํ์์. ๋งค์ผ ๋ฐฑ์ฌ๊ฐ์ ์ฌ์ค๋ก ์ถ๊ฐ ๋ฏธ์ธ์กฐ์ ํ์ฌ ์ต์ ์ ์น์ ์ด์์ ๊ดํ ํ ์คํธ๋ ์ ์์ฑํจ.
- Downloads last month
- 9
docker model run hf.co/A2/kogpt2-taf