Text Generation
Transformers
Safetensors
code
llama
llama-2
custom_code
text-generation-inference
4-bit precision
gptq
Instructions to use TheBloke/CodeLlama-13B-Instruct-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-13B-Instruct-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-13B-Instruct-GPTQ", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/CodeLlama-13B-Instruct-GPTQ", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("TheBloke/CodeLlama-13B-Instruct-GPTQ", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/CodeLlama-13B-Instruct-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/CodeLlama-13B-Instruct-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/CodeLlama-13B-Instruct-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GPTQ
- SGLang
How to use TheBloke/CodeLlama-13B-Instruct-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/CodeLlama-13B-Instruct-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/CodeLlama-13B-Instruct-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/CodeLlama-13B-Instruct-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/CodeLlama-13B-Instruct-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/CodeLlama-13B-Instruct-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GPTQ
Commit History
-
Update base_model formatting
63f1dd3
-
Upload README.md
1abf5eb -
Upload README.md
5b49fec
-
Upload README.md
634e12d -
Upload README.md
4a9e572
-
Initial GPTQ model commit
415a8b4 -
Initial GPTQ model commit
499f7c4 -
Initial GPTQ model commit
b402547 -
Initial GPTQ model commit
c3012b3 -
Initial GPTQ model commit
41e9451 -
Initial GPTQ model commit
7570476 -
Initial GPTQ model commit
9314855 -
Initial GPTQ model commit
5364ec9 -
Initial GPTQ model commit
3ed7542 -
Initial GPTQ model commit
1a3a93b -
Initial GPTQ model commit
96e4103 -
Initial GPTQ model commit
351caf9 -
Initial GPTQ model commit
aa0aa9c -
Initial GPTQ model commit
64057fd -
Initial GPTQ model commit
75e494b -
Initial GPTQ model commit
588f577
-
Add pad_token_id to config.json
9f3fc1e -
Fix generation_config.json
39abd6f -
Initial GPTQ model commit
5f5f43e -
Initial GPTQ model commit
2dd6712 -
Initial GPTQ model commit
237867d -
Initial GPTQ model commit
e0121ec -
Initial GPTQ model commit
3d1a2be -
Initial GPTQ model commit
3f4f8a5 -
Initial GPTQ model commit
003c215 -
Initial GPTQ model commit
39bb884 -
Initial GPTQ model commit
0fe3c2f -
Initial GPTQ model commit
c7b0fb1 -
Initial GPTQ model commit
963f085 -
Initial GPTQ model commit
cd0dd85 -
Initial GPTQ model commit
78af146 -
Initial GPTQ model commit
3902d7c -
Initial GPTQ model commit
b563181 -
Initial GPTQ model commit
f54898e -
initial commit
61b42ec