Instructions to use TheBloke/CodeLlama-13B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-13B-Instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-13B-Instruct-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-13B-Instruct-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TheBloke/CodeLlama-13B-Instruct-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use TheBloke/CodeLlama-13B-Instruct-GGUF 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-GGUF" # 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-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- SGLang
How to use TheBloke/CodeLlama-13B-Instruct-GGUF 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-GGUF" \ --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-GGUF", "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-GGUF" \ --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-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use TheBloke/CodeLlama-13B-Instruct-GGUF with Ollama:
ollama run hf.co/TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use TheBloke/CodeLlama-13B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- Lemonade
How to use TheBloke/CodeLlama-13B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheBloke/CodeLlama-13B-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.CodeLlama-13B-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Commit History
-
Update base_model formatting
82f1dd9
-
Upload README.md
61ba268
-
Upload README.md
fdfeb98
-
Upload README.md
34d9824 -
Upload README.md
7a6a09b -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
317deae -
Add Llama 2 license files
d4b2385 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
e94db8d -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
b52bcee -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
295f6e2 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
c67fe9f -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
449e1b8 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
aa77850 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
3f3de95 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
1b4ad9c -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
15a3e70 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
52408ce -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
749b436 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
5a44264
-
Initial GGUF model commit
a738f7e -
Initial GGUF model commit
421a736 -
Add Llama 2 license files
4d41d05 -
Add Llama 2 license files
f365ce1 -
Add Llama 2 license files
83f9dc7 -
Initial GGUF model commit
06636dc -
Initial GGUF model commit
b38e0bd -
Add Llama 2 license files
53518f1 -
Add Llama 2 license files
b99b85c -
Add Llama 2 license files
f51f2f7 -
Initial GGUF model commit
9381883 -
Initial GGUF model commit
49658a9 -
Add Llama 2 license files
8bf20bc -
Add Llama 2 license files
83aa9d0 -
Add Llama 2 license files
40a69c1
-
Initial GGUF model commit
7c41abe -
Initial GGUF model commit
3071a20 -
Add Llama 2 license files
474929e -
Add Llama 2 license files
f14ad5f -
Add Llama 2 license files
efe807d -
Initial GGUF model commit
84a6ced -
Initial GGUF model commit
df23a3b -
Add Llama 2 license files
86059cd -
Add Llama 2 license files
3ad0d03 -
Add Llama 2 license files
d6f9215 -
Update README.md
0f16170
-
Initial GGUF model commit
00e3a4e -
Initial GGUF model commit
c74af85 -
Add Llama 2 license files
4edbe3c -
Add Llama 2 license files
1788fe6 -
Add Llama 2 license files
750501c