Instructions to use TheBloke/CodeLlama-13B-Python-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/CodeLlama-13B-Python-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/CodeLlama-13B-Python-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TheBloke/CodeLlama-13B-Python-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TheBloke/CodeLlama-13B-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-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-13B-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-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf TheBloke/CodeLlama-13B-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-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TheBloke/CodeLlama-13B-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-13B-Python-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use TheBloke/CodeLlama-13B-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-13B-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-13B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- SGLang
How to use TheBloke/CodeLlama-13B-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-13B-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-13B-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-13B-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-13B-Python-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use TheBloke/CodeLlama-13B-Python-GGUF with Ollama:
ollama run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use TheBloke/CodeLlama-13B-Python-GGUF with Docker Model Runner:
docker model run hf.co/TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
- Lemonade
How to use TheBloke/CodeLlama-13B-Python-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TheBloke/CodeLlama-13B-Python-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.CodeLlama-13B-Python-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Initial GGUF model commit
Browse files
README.md
CHANGED
|
@@ -43,16 +43,14 @@ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is
|
|
| 43 |
|
| 44 |
The key benefit of GGUF is that it is a extensible, future-proof format which stores more information about the model as metadata. It also includes significantly improved tokenization code, including for the first time full support for special tokens. This should improve performance, especially with models that use new special tokens and implement custom prompt templates.
|
| 45 |
|
| 46 |
-
As of August
|
| 47 |
-
|
| 48 |
-
Here is a list of clients and libraries that are known to support GGUF:
|
| 49 |
* [llama.cpp](https://github.com/ggerganov/llama.cpp)
|
| 50 |
* [KoboldCpp](https://github.com/LostRuins/koboldcpp), now supports GGUF as of release 1.41! A powerful GGML web UI, with full GPU accel. Especially good for story telling.
|
| 51 |
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), should now work, choose the `c_transformers` backend. A great web UI with many interesting features. Supports CUDA GPU acceleration.
|
| 52 |
* [ctransformers](https://github.com/marella/ctransformers), now supports GGUF as of version 0.2.24! A Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
|
| 53 |
* [candle](https://github.com/huggingface/candle), added GGUF support on August 22nd. Candle is a Rust ML framework with a focus on performance, including GPU support, and ease of use.
|
| 54 |
|
| 55 |
-
|
| 56 |
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui), awaiting llama-cpp-python support.
|
| 57 |
* [LM Studio](https://lmstudio.ai/), in active development - hoped to be ready by August 25th-26th.
|
| 58 |
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), [in active development](https://github.com/abetlen/llama-cpp-python/issues/628).
|
|
|
|
| 43 |
|
| 44 |
The key benefit of GGUF is that it is a extensible, future-proof format which stores more information about the model as metadata. It also includes significantly improved tokenization code, including for the first time full support for special tokens. This should improve performance, especially with models that use new special tokens and implement custom prompt templates.
|
| 45 |
|
| 46 |
+
As of August 25th, here is a list of clients and libraries that are known to support GGUF:
|
|
|
|
|
|
|
| 47 |
* [llama.cpp](https://github.com/ggerganov/llama.cpp)
|
| 48 |
* [KoboldCpp](https://github.com/LostRuins/koboldcpp), now supports GGUF as of release 1.41! A powerful GGML web UI, with full GPU accel. Especially good for story telling.
|
| 49 |
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), should now work, choose the `c_transformers` backend. A great web UI with many interesting features. Supports CUDA GPU acceleration.
|
| 50 |
* [ctransformers](https://github.com/marella/ctransformers), now supports GGUF as of version 0.2.24! A Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
|
| 51 |
* [candle](https://github.com/huggingface/candle), added GGUF support on August 22nd. Candle is a Rust ML framework with a focus on performance, including GPU support, and ease of use.
|
| 52 |
|
| 53 |
+
The clients and libraries below are expecting to add GGUF support. Where possible a link to the relevant issue or PR is provided:
|
| 54 |
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui), awaiting llama-cpp-python support.
|
| 55 |
* [LM Studio](https://lmstudio.ai/), in active development - hoped to be ready by August 25th-26th.
|
| 56 |
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), [in active development](https://github.com/abetlen/llama-cpp-python/issues/628).
|