Text Generation
Transformers
PyTorch
Safetensors
English
opt
conversational
chat
assistant
text-generation-inference
Instructions to use KoalaAI/OPT-1.3b-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoalaAI/OPT-1.3b-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KoalaAI/OPT-1.3b-Chat")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KoalaAI/OPT-1.3b-Chat") model = AutoModelForCausalLM.from_pretrained("KoalaAI/OPT-1.3b-Chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KoalaAI/OPT-1.3b-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KoalaAI/OPT-1.3b-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KoalaAI/OPT-1.3b-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KoalaAI/OPT-1.3b-Chat
- SGLang
How to use KoalaAI/OPT-1.3b-Chat 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 "KoalaAI/OPT-1.3b-Chat" \ --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": "KoalaAI/OPT-1.3b-Chat", "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 "KoalaAI/OPT-1.3b-Chat" \ --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": "KoalaAI/OPT-1.3b-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KoalaAI/OPT-1.3b-Chat with Docker Model Runner:
docker model run hf.co/KoalaAI/OPT-1.3b-Chat
Commit History
-
Update README.md
Verified signature708c8bf
-
Update README.md
5dc1c6d -
Update README.md
a0acf3e
-
Update README.md
c7fc621
-
Update README.md
3ab1f76
-
Update README.md
740c5e6
-
Update README.md
2466416 -
Update README.md
823d3e5 -
Update README.md
cb265aa -
Adding `safetensors` variant of this model (#1)
- Adding `safetensors` variant of this model (a2aef2b6ff8d87f3177ea6192f8963174ca47705) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>2eec48f -
Update README.md
38da227 -
Update README.md
830160c -
Upload pytorch_model.bin
e09b645 -
Upload 4 files
82796c4 -
initial commit
fded375