Instructions to use taeminlee/kogpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use taeminlee/kogpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="taeminlee/kogpt2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("taeminlee/kogpt2") model = AutoModelForCausalLM.from_pretrained("taeminlee/kogpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use taeminlee/kogpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "taeminlee/kogpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "taeminlee/kogpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/taeminlee/kogpt2
- SGLang
How to use taeminlee/kogpt2 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 "taeminlee/kogpt2" \ --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": "taeminlee/kogpt2", "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 "taeminlee/kogpt2" \ --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": "taeminlee/kogpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use taeminlee/kogpt2 with Docker Model Runner:
docker model run hf.co/taeminlee/kogpt2
Commit History
-
Adding `safetensors` variant of this model (#1)
- Adding `safetensors` variant of this model (bfc0a802de44007a189ab7eb01b8ea4639e64448) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>7a2ab5d
-
upload flax model
629b33a -
allow flax
92af263
-
Update README.md
bdcbc63
-
Update README.md
37bab52 -
Update README.md
529fb41 -
Create README.md
de371e7 -
commit from taeminlee
e60f19e
-
Update tokenizer_config.json
2983390 -
Update special_tokens_map.json
19a1ccd -
Update config.json
7ec7f6b -
Update merges.txt
95d6cc5 -
Update pytorch_model.bin
cbb030f -
Update vocab.json
16703ec
-
Update tokenizer_config.json
91198c2 -
Update special_tokens_map.json
b838f8d -
Update config.json
70cf770 -
Update spiece.model
e4aea4b -
initial commit
ad12767