Instructions to use KoboldAI/OPT-30B-Erebus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoboldAI/OPT-30B-Erebus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KoboldAI/OPT-30B-Erebus")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("KoboldAI/OPT-30B-Erebus") model = AutoModelForCausalLM.from_pretrained("KoboldAI/OPT-30B-Erebus", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KoboldAI/OPT-30B-Erebus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KoboldAI/OPT-30B-Erebus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KoboldAI/OPT-30B-Erebus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KoboldAI/OPT-30B-Erebus
- SGLang
How to use KoboldAI/OPT-30B-Erebus 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 "KoboldAI/OPT-30B-Erebus" \ --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": "KoboldAI/OPT-30B-Erebus", "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 "KoboldAI/OPT-30B-Erebus" \ --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": "KoboldAI/OPT-30B-Erebus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KoboldAI/OPT-30B-Erebus with Docker Model Runner:
docker model run hf.co/KoboldAI/OPT-30B-Erebus
Less than 0.05 Tokens/s on a 4090?
Hey there! so I am relatively new to this. I loaded the model into textgeneration webui, but no matter what I do, I can not get more than 0.05 Tokens/s out of this model for some reason and I have no idea why.
This is the first model with 30B parameters that I loaded, so I have no direct comparison. The 13B models that I have run fine so far, but this one just goes absolutely nowhere.
30b models need 64gb vram to run unless they're in 4bit
Oh wait so this isn't a 4bit quantized model then.. okay makes sense.. thank you for the clarification. I should have known. It doesn't say so anywhere. ^^;