Text Generation
Transformers
GGUF
code
granite
TensorBlock
GGUF
Eval Results (legacy)
conversational
Instructions to use tensorblock/granite-34b-code-instruct-8k-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/granite-34b-code-instruct-8k-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/granite-34b-code-instruct-8k-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/granite-34b-code-instruct-8k-GGUF", filename="granite-34b-code-instruct-8k-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
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 tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
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 tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/granite-34b-code-instruct-8k-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-34b-code-instruct-8k-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
- SGLang
How to use tensorblock/granite-34b-code-instruct-8k-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-34b-code-instruct-8k-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-34b-code-instruct-8k-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-34b-code-instruct-8k-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-34b-code-instruct-8k-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with Ollama:
ollama run hf.co/tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
- Unsloth Studio
How to use tensorblock/granite-34b-code-instruct-8k-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 tensorblock/granite-34b-code-instruct-8k-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 tensorblock/granite-34b-code-instruct-8k-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tensorblock/granite-34b-code-instruct-8k-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
- Lemonade
How to use tensorblock/granite-34b-code-instruct-8k-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/granite-34b-code-instruct-8k-GGUF:Q2_K
Run and chat with the model
lemonade run user.granite-34b-code-instruct-8k-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- granite-34b-code-instruct-8k-Q3_K_L.gguf +0 -3
- granite-34b-code-instruct-8k-Q3_K_S.gguf +0 -3
- granite-34b-code-instruct-8k-Q4_0.gguf +0 -3
- granite-34b-code-instruct-8k-Q4_K_M.gguf +0 -3
- granite-34b-code-instruct-8k-Q4_K_S.gguf +0 -3
- granite-34b-code-instruct-8k-Q5_0.gguf +0 -3
- granite-34b-code-instruct-8k-Q5_K_M.gguf +0 -3
- granite-34b-code-instruct-8k-Q5_K_S.gguf +0 -3
- granite-34b-code-instruct-8k-Q6_K.gguf +0 -3
- granite-34b-code-instruct-8k-Q8_0.gguf +0 -3
granite-34b-code-instruct-8k-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:91bb91dd64da7cf04163f39da9bde159b698d43721f54d9d34215c2ccb9386ac
|
| 3 |
-
size 19549669696
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c04a0744c7ffca0cd710469238db80e49bcc7e02ecb4a23b88147bd213dc4062
|
| 3 |
-
size 14807976256
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d8fddde839433f20a0087c0a6072693fb55151403b9a0c71279f65a16bddcb9a
|
| 3 |
-
size 19238242624
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:982eff4a94083b558da1f21814841bc262e5c8dffc5bbc7d164441002961ab9f
|
| 3 |
-
size 21383629120
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6ac6ef8f4fc9fa18ef19ad14d17adecfd1c229af45c2dd061d645fb2468bb424
|
| 3 |
-
size 19445860672
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7735b0f47fcf3abab6cd03adf9514c3a66c973cd52d69ccf9fb02ab6170e7995
|
| 3 |
-
size 23407905088
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:fe80956278b94a2369ab6e3d7ce9d0b03fcc27af7552195fef689b6334b167c5
|
| 3 |
-
size 24749852992
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:60cd2307c0e3e1d2e2656264de1ca7276afa1a92c4e49e16103618c1834b0800
|
| 3 |
-
size 23407905088
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:534c9e2d41729dc85c277fdbacb4ee19973afa5f0bdf34a42cbd479e76d5956f
|
| 3 |
-
size 27838171456
|
|
|
|
|
|
|
|
|
|
|
|
granite-34b-code-instruct-8k-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9dbb05a4ec263d51670bbf5c88fab26cdc942a7b8d2ecd2b783fe726bf0bd43a
|
| 3 |
-
size 35990030656
|
|
|
|
|
|
|
|
|
|
|
|