Instructions to use TheBloke/CodeLlama-34B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-34B-Instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-34B-Instruct-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-34B-Instruct-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TheBloke/CodeLlama-34B-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-34B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-34B-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-34B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-34B-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-34B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheBloke/CodeLlama-34B-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-34B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use TheBloke/CodeLlama-34B-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-34B-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-34B-Instruct-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
- SGLang
How to use TheBloke/CodeLlama-34B-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-34B-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-34B-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-34B-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-34B-Instruct-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use TheBloke/CodeLlama-34B-Instruct-GGUF with Ollama:
ollama run hf.co/TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use TheBloke/CodeLlama-34B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
- Lemonade
How to use TheBloke/CodeLlama-34B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheBloke/CodeLlama-34B-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.CodeLlama-34B-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Commit History
-
Update base_model formatting
7b84402
-
Upload README.md
dba5400
-
Upload README.md
ef7d1e1
-
Upload README.md
ef916a4 -
Upload README.md
423d1b3 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
d7ea8ba -
Add Llama 2 license files
9eb28a4 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
b6ec9a7 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
88c7c73 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
e6d20bc -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
f45f4e5 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
11c27bc -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
94000e1 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
ff50fee -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
7c635b8 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
1c164fc -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
0c66116 -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
45f141a -
Initial GGUF model commit (model made with llama.cpp commit d59bd97)
b385a73 -
Upload README.md
2ed909a -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
1ceb154 -
Add Llama 2 license files
c350c24 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
4cc4343 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
0a62485 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
61a4d8e -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
1a3c3fd -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
9f08c8c -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
39e3db7 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
2a75527 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
3da73d6 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
0556077 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
b3c2c23 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
9082b45 -
Initial GGUF model commit (model made with llama.cpp commit 2ba85c8)
1e2bbd3
-
Initial GGUF model commit
fe8bdfd -
Initial GGUF model commit
0654251 -
Add Llama 2 license files
8906948 -
Add Llama 2 license files
f960747 -
Add Llama 2 license files
dc35420 -
Initial GGUF model commit
d45bbd2 -
Initial GGUF model commit
d3d1ad3 -
Add Llama 2 license files
56f99e2 -
Add Llama 2 license files
2c389d5 -
Add Llama 2 license files
4f74239 -
Initial GGUF model commit
faa82c5 -
Initial GGUF model commit
eaecbd3 -
Add Llama 2 license files
39b2313 -
Add Llama 2 license files
e86b75f -
Add Llama 2 license files
fa6b6f7
-
Initial GGUF model commit
60304ff