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") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# 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") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
OPT-1.3b-Chat
This is a text generation model based on the OPT-1.3B model from Meta, trained using the Deepspeed library. The model can generate natural and engaging conversational responses given a user input.
A Demo is available here The model is best at simple Q&A style questions, not open-ended ones like ChatGPT.
Training Details
- The base model is OPT-1.3B, a decoder-only transformer with 1.3 billion parameters, pre-trained on a large text corpus using the causal language modeling objective.
- The model was trained on a single NVIDIA A100 GPU using the Deepspeed pipeline parallelism and ZeRO optimizer.
Model Details
- Number of parameters: 1.3 billion
- Number of layers: 24
- Number of attention heads: 16
- Context size: 2048
- Vocabulary size: 50,265
- Embedding size: 1280
- Feed-forward size: 5120
- Dropout rate: 0.1
Usage
You can use this model directly with the Hugging Face pipeline for text generation:
from transformers import pipeline
generator = pipeline('text-generation', model='DarwinAnim8or/OPT-1.3b-Chat')
generator("Hello, how are you?")
Suggested formatting
The training data uses the following format:
Human: <question>
Assistant: <answer>
It is recommended to follow the same format as closely as possible for the best results. We do intend on creating another model that is trained on the openassistant dataset in the future.
License
This model is licensed under the OPT-175B license, which is a non-commercial research license. Please read the full license terms before using this model.
Ethical Considerations
This model is intended for research purposes only and should not be used for any malicious or harmful applications. The model may generate offensive or inappropriate content that does not reflect the views or opinions of the authors or Microsoft. Users are responsible for ensuring that the generated content complies with ethical and legal standards.
- Downloads last month
- 1,060