Instructions to use TheBloke/koala-13B-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/koala-13B-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/koala-13B-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/koala-13B-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/koala-13B-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/koala-13B-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/koala-13B-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/koala-13B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/koala-13B-GPTQ
- SGLang
How to use TheBloke/koala-13B-GPTQ 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 "TheBloke/koala-13B-GPTQ" \ --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": "TheBloke/koala-13B-GPTQ", "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 "TheBloke/koala-13B-GPTQ" \ --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": "TheBloke/koala-13B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/koala-13B-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/koala-13B-GPTQ
This gives gibberish nonsense in text-generation-server
I have not been able to get the quantized version to make any sense. The HF version works great, just a bit slow.
Please read the README.md. You either need to update text-generation-webui's GPTQ-for-LLaMa to the latest version, or else use file koala-13B-4bit-128g.no-act-order.ooba.pt
I am up to date with the latest files for text-generation-webui and GPTQ-for-LLaMa and I can confirm I get gibberish as well on the 7B and 13B quantized versions
When you say you're up-to-date, are you sure you're using the right GPTQ-for-LLaMa version? It needs to be the qwopqwop repo, not the oobabooga fork.
If the update to GPTQ-for-LLaMa is not working for you, just use koala-13B-4bit-128g.no-act-order.ooba.pt. Remove any other pt/safetensors files from your model directory, such that you just have koala-13B-4bit-128g.no-act-order.ooba.pt and that will work with any version of GPTQ-for-LLaMa
This fixes my problem. Thank you!!!