Instructions to use TheBloke/CodeLlama-34B-Python-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-34B-Python-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-34B-Python-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-34B-Python-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TheBloke/CodeLlama-34B-Python-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-34B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-34B-Python-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-34B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-34B-Python-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-34B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheBloke/CodeLlama-34B-Python-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-34B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheBloke/CodeLlama-34B-Python-GGUF:Q4_K_M
Use Docker
docker model run hf.co/TheBloke/CodeLlama-34B-Python-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use TheBloke/CodeLlama-34B-Python-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/CodeLlama-34B-Python-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-34B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-34B-Python-GGUF:Q4_K_M
- SGLang
How to use TheBloke/CodeLlama-34B-Python-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-34B-Python-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-34B-Python-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-34B-Python-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-34B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use TheBloke/CodeLlama-34B-Python-GGUF with Ollama:
ollama run hf.co/TheBloke/CodeLlama-34B-Python-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use TheBloke/CodeLlama-34B-Python-GGUF with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-34B-Python-GGUF:Q4_K_M
- Lemonade
How to use TheBloke/CodeLlama-34B-Python-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheBloke/CodeLlama-34B-Python-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.CodeLlama-34B-Python-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Commit History
-
Update base_model formatting
3f2c2ff
-
Upload README.md
a4103e4
-
Upload README.md
1c2b591
-
Upload README.md
1dafb0a -
Upload README.md
eccfa9d -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
dbdeaaf -
Add Llama 2 license files
a7d5b81 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
065bd00 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
35077b7 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
3491683 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
3c2462e -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
8c9e563 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
17834bd -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
9ffd8b4 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
34ffc25 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
a35d5af -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
896cfff -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
4debd48 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
f2616a0 -
Upload README.md
d79f382 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
0f600bd -
Add Llama 2 license files
ce9f56d -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
877190e -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
b1e53f8 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
7fdfa47 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
a59d733 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
e86f95c -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
d956cd4 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
25b3b55 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
7e6e3f4 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
531133a -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
cca1526 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
c4a2f60 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
842e41f
-
Initial GGUF model commit
1bd20e4 -
Initial GGUF model commit
0d3378e -
Add Llama 2 license files
1ccb186 -
Add Llama 2 license files
09b763d -
Add Llama 2 license files
fbf52d6 -
Initial GGUF model commit
25973b8 -
Initial GGUF model commit
d9f6e8f -
Add Llama 2 license files
4c0c8b2 -
Add Llama 2 license files
cdaffb2 -
Add Llama 2 license files
dca511f -
Initial GGUF model commit
ba908f8 -
Initial GGUF model commit
0cde384 -
Add Llama 2 license files
0234b54 -
Add Llama 2 license files
21cb3d3 -
Add Llama 2 license files
5507b15
-
Initial GGUF model commit
4c8b8c2