Instructions to use TheBloke/WizardLM-7B-uncensored-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/WizardLM-7B-uncensored-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/WizardLM-7B-uncensored-GPTQ")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/WizardLM-7B-uncensored-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/WizardLM-7B-uncensored-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/WizardLM-7B-uncensored-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/WizardLM-7B-uncensored-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/WizardLM-7B-uncensored-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/WizardLM-7B-uncensored-GPTQ
- SGLang
How to use TheBloke/WizardLM-7B-uncensored-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/WizardLM-7B-uncensored-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/WizardLM-7B-uncensored-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/WizardLM-7B-uncensored-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/WizardLM-7B-uncensored-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/WizardLM-7B-uncensored-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/WizardLM-7B-uncensored-GPTQ
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory models\TheBloke_WizardLM-7B-uncensored-GPTQ.
When i have downloaded the model via the webui and then am about too boot it states this error:
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory models\TheBloke_WizardLM-7B-uncensored-GPTQ.
I have tried to find a solution myself but have not succeded in that endevour. I ask for help.
I'm told there's currently a bug in text-gen-ui where it seems to forget GPTQ params. You could also try updating text-gen-ui to the latest code in case this bug is fixed now.
If that doesn't work, you may just have to manually set the GPTQ params and "Reload this model" each time. Hopefully the bug will be fixed soon.