Instructions to use TheBloke/starchat-beta-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/starchat-beta-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/starchat-beta-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/starchat-beta-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/starchat-beta-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/starchat-beta-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/starchat-beta-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/starchat-beta-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/starchat-beta-GPTQ
- SGLang
How to use TheBloke/starchat-beta-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/starchat-beta-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/starchat-beta-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/starchat-beta-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/starchat-beta-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/starchat-beta-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/starchat-beta-GPTQ
Working in text-geration-webui, with a little surprise...
For the model to load in text-generation-webui, I had to remove these 2 lines from quantize_config.json:
"model_name_or_path": null,
"model_file_base_name": null
I probably need to update auto-gptq.
In a first test I asked the model:
Write a vba function count_vowels(text) that counts the vowels in a string. It should recognize and count both uppercase and lowercase vowels.
The response was a VBA macro which upon first sight seems to do the requested count, but I would have needed to rewrite it as a function.
As a surprise, I got back an additional text with a return question:
My question would be how can I use this code?
Isn't this cheeky? :-)
After coming up with the following prompt, the response was completely as expected.
I want to write a VBA FUNCTION count_vowels(text) that counts the vowels in a string and returns the number of vowels as an integer value. It should recognize and count both uppercase and lowercase vowels. The function would look like this:
We discussed this in the other thread - yes you need to update AutoGPTQ. And yes this model works fine in text-generation-webui, as long as the AutoGPTQ loader is used.
Sounds good re the prompting!