Instructions to use TheBloke/guanaco-33B-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/guanaco-33B-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/guanaco-33B-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/guanaco-33B-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/guanaco-33B-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/guanaco-33B-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/guanaco-33B-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/guanaco-33B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/guanaco-33B-GPTQ
- SGLang
How to use TheBloke/guanaco-33B-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/guanaco-33B-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/guanaco-33B-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/guanaco-33B-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/guanaco-33B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/guanaco-33B-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/guanaco-33B-GPTQ
Error no file named pytorch_model.bin
4090 so I don't get the memory issue.. what am I missing here?
INFO:Loading guanaco-33B-GPTQ...
WARNING:Auto-assiging --gpu-memory 23 for your GPU to try to prevent out-of-memory errors. You can manually set other values.
Traceback (most recent call last):
File "C:\Projects\AI\text-generation-webui\server.py", line 1087, in
shared.model, shared.tokenizer = load_model(shared.model_name)
File "C:\Projects\AI\text-generation-webui\modules\models.py", line 95, in load_model
output = load_func(model_name)
File "C:\Projects\AI\text-generation-webui\modules\models.py", line 223, in huggingface_loader
model = LoaderClass.from_pretrained(checkpoint, **params)
File "C:\Projects\AI\installer_files\env\lib\site-packages\transformers\models\auto\auto_factory.py", line 471, in from_pretrained
return model_class.from_pretrained(
File "C:\Projects\AI\installer_files\env\lib\site-packages\transformers\modeling_utils.py", line 2405, in from_pretrained
raise EnvironmentError(
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory models\guanaco-33B-GPTQ.
You need to set the GPTQ parameters - please see the instructions in the README
I tried that.. it doesn't like it the error below ...the other model 'Guanaco-33B-4bit' works fine so will use that.. not sure on the performance difference?
Traceback (most recent call last): File “C:\Projects\AI\text-generation-webui\server.py”, line 71, in load_model_wrapper shared.model, shared.tokenizer = load_model(shared.model_name) File “C:\Projects\AI\text-generation-webui\modules\models.py”, line 95, in load_model output = load_func(model_name) File “C:\Projects\AI\text-generation-webui\modules\models.py”, line 289, in GPTQ_loader model = modules.GPTQ_loader.load_quantized(model_name) File “C:\Projects\AI\text-generation-webui\modules\GPTQ_loader.py”, line 177, in load_quantized model = load_quant(str(path_to_model), str(pt_path), shared.args.wbits, shared.args.groupsize, kernel_switch_threshold=threshold) File “C:\Projects\AI\text-generation-webui\modules\GPTQ_loader.py”, line 84, in _load_quant model.load_state_dict(safe_load(checkpoint), strict=False) File “C:\Projects\AI\installer_files\env\lib\site-packages\safetensors\torch.py”, line 261, in load_file result[k] = f.get_tensor(k) RuntimeError: [enforce fail at C:\cb\pytorch_1000000000000\work\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 425984000 bytes.
never mind.. spoke to soon.. restarted it and it loaded fine