Instructions to use QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b") model = AutoModelForCausalLM.from_pretrained("QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b
- SGLang
How to use QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b 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 "QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b" \ --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": "QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b", "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 "QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b" \ --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": "QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b with Docker Model Runner:
docker model run hf.co/QuixiAI/WizardLM-1.0-Uncensored-CodeLlama-34b
config.json paramaters
On this model, it reads :
"max_position_embeddings": 2048,
"torch_dtype": "float16",
Shouldn't it be like on the original CodeLlama model and Airoboros c34b 2.1?
"max_position_embeddings": 16384,
"torch_dtype": "bfloat16",
Also, wouldn't "rope_theta": 1000000, be useful, as per the original CodeLlama model?
Thanks for publishing this, as well as for Samantha C34 1.11 (who is a real challenge for context obedient prompt and model schizophrenia between the Assistant and the Character Samantha), Eric!
I didn't set any of those values. I used CodeLlama as the base model
From where? Did you use a non-official source perhaps? The correct values are here: https://huggingface.co/codellama/CodeLlama-34b-hf/blob/main/config.json
It should have 16K and rope_theta 1M yeah. I'll change it for my quants and I put in a PR
Thank you Tom