Instructions to use second-state/CodeLlama-13B-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use second-state/CodeLlama-13B-Instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="second-state/CodeLlama-13B-Instruct-GGUF")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("second-state/CodeLlama-13B-Instruct-GGUF") model = AutoModelForCausalLM.from_pretrained("second-state/CodeLlama-13B-Instruct-GGUF") - llama-cpp-python
How to use second-state/CodeLlama-13B-Instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="second-state/CodeLlama-13B-Instruct-GGUF", filename="CodeLlama-13b-Instruct-hf-Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use second-state/CodeLlama-13B-Instruct-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf second-state/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-server -hf second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf second-state/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 second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf second-state/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 second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use second-state/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 "second-state/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": "second-state/CodeLlama-13B-Instruct-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- SGLang
How to use second-state/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 "second-state/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": "second-state/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 "second-state/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": "second-state/CodeLlama-13B-Instruct-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use second-state/CodeLlama-13B-Instruct-GGUF with Ollama:
ollama run hf.co/second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- Unsloth Studio
How to use second-state/CodeLlama-13B-Instruct-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for second-state/CodeLlama-13B-Instruct-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for second-state/CodeLlama-13B-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for second-state/CodeLlama-13B-Instruct-GGUF to start chatting
- Docker Model Runner
How to use second-state/CodeLlama-13B-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/second-state/CodeLlama-13B-Instruct-GGUF:Q4_K_M
- Lemonade
How to use second-state/CodeLlama-13B-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull second-state/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
Xin Liu commited on
Commit ·
d428853
1
Parent(s): 5d48cf3
Add models
Browse filesSigned-off-by: Xin Liu <sam@secondstate.io>
- CodeLlama-13b-Instruct-hf-Q2_K.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q3_K_L.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q3_K_M.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q3_K_S.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q4_0.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q4_K_M.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q4_K_S.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q5_0.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q5_K_M.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q5_K_S.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q6_K.gguf +3 -0
- CodeLlama-13b-Instruct-hf-Q8_0.gguf +3 -0
CodeLlama-13b-Instruct-hf-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6dfc9309d48fffd2ecbdc0571f96a99da7d7bf094208a713e9a4cb8205546f29
|
| 3 |
+
size 5429442880
|
CodeLlama-13b-Instruct-hf-Q3_K_L.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52a7dd56e80f0d362635be72bfc5dc76eda5f4317ab55d6a04f824b1a7b5e798
|
| 3 |
+
size 6929662400
|
CodeLlama-13b-Instruct-hf-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d62f4656f12c2cc6763c9ea47fc1474dbaa5ab6adee4f3452f91da979fdbbabf
|
| 3 |
+
size 6337872320
|
CodeLlama-13b-Instruct-hf-Q3_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8dbe16cb1b2046faac05e8803822309deb9e1bfc74a4d05c2eefff813e4ae44f
|
| 3 |
+
size 5659083200
|
CodeLlama-13b-Instruct-hf-Q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd4e71c660c8d04ec0c12806a69a05651c1882308323714a8e7bf61e94102830
|
| 3 |
+
size 7365948480
|
CodeLlama-13b-Instruct-hf-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2ad727d4893bc44add809e992c8f584e4fb1e986163a5b7510e2cc1f34b3c55
|
| 3 |
+
size 7866070080
|
CodeLlama-13b-Instruct-hf-Q4_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:611b17920328206a9c0ae7928c66bb52d6d986ce35a7fd82d9036b0bc9ef1718
|
| 3 |
+
size 7414445120
|
CodeLlama-13b-Instruct-hf-Q5_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aff52f07419e1bfbb452644960b0fa63907f40689f9a85f580e3813ffb54fa3c
|
| 3 |
+
size 8972409920
|
CodeLlama-13b-Instruct-hf-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b30d01b5a22f2b3dc6cd01084b50114dde5e63cbc240ee7ad20ebbd6c63eab95
|
| 3 |
+
size 9230048320
|
CodeLlama-13b-Instruct-hf-Q5_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5bdcb03bada3c3fa7138752df6c8f804d8fad511e72d97ecdef5bea1adc785b3
|
| 3 |
+
size 8972409920
|
CodeLlama-13b-Instruct-hf-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b86d1658be2bf2b03d764d3e97e6a19ce6367a301192945a8358d7d51a9c67ed
|
| 3 |
+
size 10679275200
|
CodeLlama-13b-Instruct-hf-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44a69ac2d210548b1edc0f0b622a2c196e364d5923f695327c3b506f8581eb95
|
| 3 |
+
size 13831494080
|