Text Generation
Transformers
GGUF
code
granite
TensorBlock
GGUF
Eval Results (legacy)
conversational
Instructions to use tensorblock/granite-3b-code-instruct-2k-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/granite-3b-code-instruct-2k-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/granite-3b-code-instruct-2k-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/granite-3b-code-instruct-2k-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tensorblock/granite-3b-code-instruct-2k-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 tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama cli -hf tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use tensorblock/granite-3b-code-instruct-2k-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/granite-3b-code-instruct-2k-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-3b-code-instruct-2k-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
- SGLang
How to use tensorblock/granite-3b-code-instruct-2k-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 "tensorblock/granite-3b-code-instruct-2k-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-3b-code-instruct-2k-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "tensorblock/granite-3b-code-instruct-2k-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-3b-code-instruct-2k-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use tensorblock/granite-3b-code-instruct-2k-GGUF with Ollama:
ollama run hf.co/tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
- Unsloth Desktop
- Docker Model Runner
How to use tensorblock/granite-3b-code-instruct-2k-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
- Lemonade
How to use tensorblock/granite-3b-code-instruct-2k-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/granite-3b-code-instruct-2k-GGUF:Q2_K
Run and chat with the model
lemonade run user.granite-3b-code-instruct-2k-GGUF-Q2_K
List all available models
lemonade list
- Atomic Chat
Keep Q2_K/Q3_K_M gguf only
Browse files- granite-3b-code-instruct-2k-Q3_K_L.gguf +0 -3
- granite-3b-code-instruct-2k-Q3_K_S.gguf +0 -3
- granite-3b-code-instruct-2k-Q4_0.gguf +0 -3
- granite-3b-code-instruct-2k-Q4_K_M.gguf +0 -3
- granite-3b-code-instruct-2k-Q4_K_S.gguf +0 -3
- granite-3b-code-instruct-2k-Q5_0.gguf +0 -3
- granite-3b-code-instruct-2k-Q5_K_M.gguf +0 -3
- granite-3b-code-instruct-2k-Q5_K_S.gguf +0 -3
- granite-3b-code-instruct-2k-Q6_K.gguf +0 -3
- granite-3b-code-instruct-2k-Q8_0.gguf +0 -3
granite-3b-code-instruct-2k-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:e07b8ed370ae76cecb423b19e97ab03bf0864c17aa1c7e232d1448b35a4542f0
|
| 3 |
-
size 1876089440
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:14dff17a97cb09d4a37bd3f32710fb67ced6645e4ecaf5abea81d358335882a6
|
| 3 |
-
size 1551686240
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:807a21d625884a31a897ab5781f3875972137922730658e08d3a959ce8f32b4e
|
| 3 |
-
size 1997331040
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:80b9df998dddc8c3a62935445023dd3ce8c6fc0445596c2a11bfbcb6bd9af9a4
|
| 3 |
-
size 2132499040
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a896a8986c6b479c129ee15691a74446c606ed64ae94f5a967a548167b6013f6
|
| 3 |
-
size 2013715040
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5025cdf89b10e544b4e45860ee6395be39477b6f567602695eb884a52c9b9892
|
| 3 |
-
size 2416761440
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a5d9170372cd6094ad931106e009e7cc6229f9cce7ceaa7c859f4d0292d1944a
|
| 3 |
-
size 2486393440
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c4ffef9d61887c8175659df73526b5c4d364841320b1a1ac7d723212a4a3ef2a
|
| 3 |
-
size 2416761440
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:161037c71b443443ea5472b8c4c740b27358abec4c6bb4790d3523bec08b5ba7
|
| 3 |
-
size 2862406240
|
|
|
|
|
|
|
|
|
|
|
|
granite-3b-code-instruct-2k-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6b855882642be8afee1e46d31a6a2df1a2e2334e2600beb777e6cebfa7eac1dd
|
| 3 |
-
size 3705526880
|
|
|
|
|
|
|
|
|
|
|
|