Instructions to use TheBloke/gpt4-alpaca-lora-30B-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/gpt4-alpaca-lora-30B-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/gpt4-alpaca-lora-30B-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/gpt4-alpaca-lora-30B-GPTQ") model = AutoModelForMultimodalLM.from_pretrained("TheBloke/gpt4-alpaca-lora-30B-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/gpt4-alpaca-lora-30B-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/gpt4-alpaca-lora-30B-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/gpt4-alpaca-lora-30B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/gpt4-alpaca-lora-30B-GPTQ
- SGLang
How to use TheBloke/gpt4-alpaca-lora-30B-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/gpt4-alpaca-lora-30B-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/gpt4-alpaca-lora-30B-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/gpt4-alpaca-lora-30B-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/gpt4-alpaca-lora-30B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/gpt4-alpaca-lora-30B-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/gpt4-alpaca-lora-30B-GPTQ
Possibility of 13b weights?
Hi, first of all, thank you for the many models you have generated and shared!
Are there any plans to perform the same quantizing for the 13b lora released by chansung? I mean this one of these two:
https://huggingface.co/chansung/gpt4-alpaca-lora-13b
https://huggingface.co/chansung/gpt4-alpaca-lora-13b-decapoda-1024
I'm asking because this model (TheBloke/gpt4-alpaca-lora-30B-GPTQ-4bit-128g) is the best one I have used so far, and I've used many :D But unfortunately it only fits on an A5000 instance I am renting, while a 13b version should fit on my 3080 12GB.
Normally I hate when internet strangers make a request like "please do this thing for me for free!" but you seem to have the resources, so just figured I'd ask if this is something you're planning.
Hi there. You're welcome, glad they've been helpful.
I'd be glad to do GPTQs of those. To be honest I hadn't noticed they'd been put up at the same time.
It will be interesting to see how they compare to the current leaders in the 13B field, Vicuna 1.1 and Koala.
I'll try to get them up by later today.
Thanks, it's much appreciated :)