Instructions to use tensorblock/granite-3.0-1b-a400m-base-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/granite-3.0-1b-a400m-base-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/granite-3.0-1b-a400m-base-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/granite-3.0-1b-a400m-base-GGUF", device_map="auto") - llama-cpp-python
How to use tensorblock/granite-3.0-1b-a400m-base-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/granite-3.0-1b-a400m-base-GGUF", filename="granite-3.0-1b-a400m-base-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 tensorblock/granite-3.0-1b-a400m-base-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-3.0-1b-a400m-base-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/granite-3.0-1b-a400m-base-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-3.0-1b-a400m-base-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/granite-3.0-1b-a400m-base-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-3.0-1b-a400m-base-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/granite-3.0-1b-a400m-base-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-3.0-1b-a400m-base-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/granite-3.0-1b-a400m-base-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/granite-3.0-1b-a400m-base-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/granite-3.0-1b-a400m-base-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/granite-3.0-1b-a400m-base-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/granite-3.0-1b-a400m-base-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/granite-3.0-1b-a400m-base-GGUF:Q2_K
- SGLang
How to use tensorblock/granite-3.0-1b-a400m-base-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-3.0-1b-a400m-base-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": "tensorblock/granite-3.0-1b-a400m-base-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 "tensorblock/granite-3.0-1b-a400m-base-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": "tensorblock/granite-3.0-1b-a400m-base-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/granite-3.0-1b-a400m-base-GGUF with Ollama:
ollama run hf.co/tensorblock/granite-3.0-1b-a400m-base-GGUF:Q2_K
- Unsloth Studio
How to use tensorblock/granite-3.0-1b-a400m-base-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-3.0-1b-a400m-base-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-3.0-1b-a400m-base-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-3.0-1b-a400m-base-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use tensorblock/granite-3.0-1b-a400m-base-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/granite-3.0-1b-a400m-base-GGUF:Q2_K
- Lemonade
How to use tensorblock/granite-3.0-1b-a400m-base-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/granite-3.0-1b-a400m-base-GGUF:Q2_K
Run and chat with the model
lemonade run user.granite-3.0-1b-a400m-base-GGUF-Q2_K
List all available models
lemonade list
Remove .gguf files (keep Q2_K.gguf)
Browse files- granite-3.0-1b-a400m-base-Q3_K_L.gguf +0 -3
- granite-3.0-1b-a400m-base-Q3_K_M.gguf +0 -3
- granite-3.0-1b-a400m-base-Q3_K_S.gguf +0 -3
- granite-3.0-1b-a400m-base-Q4_0.gguf +0 -3
- granite-3.0-1b-a400m-base-Q4_K_M.gguf +0 -3
- granite-3.0-1b-a400m-base-Q4_K_S.gguf +0 -3
- granite-3.0-1b-a400m-base-Q5_0.gguf +0 -3
- granite-3.0-1b-a400m-base-Q5_K_M.gguf +0 -3
- granite-3.0-1b-a400m-base-Q5_K_S.gguf +0 -3
- granite-3.0-1b-a400m-base-Q6_K.gguf +0 -3
- granite-3.0-1b-a400m-base-Q8_0.gguf +0 -3
granite-3.0-1b-a400m-base-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:153ec3f673c2918558e957a56ea4695886117aab7ecfecc33eaac5bbd8bd50c8
|
| 3 |
-
size 733023296
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q3_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9c0e47a903d8de1e617f87947d4015dea20198e4baed3208bdcf8ce788d933b7
|
| 3 |
-
size 680201280
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9c535b3189a8a04637624e44427ef360e569648cdaf23301f9a112f52cb367e3
|
| 3 |
-
size 619482176
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5c0586a77cc14d8fbdbddaed56d70786302b27f6efa0dac55fc623702bb3f87c
|
| 3 |
-
size 796625984
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:dd568693ac72b441248210d63ed14e070644032ba6cd2786758888440cce38a1
|
| 3 |
-
size 850152512
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:e0b2fa8d17449846a9101168599a5cda556ab978e28f041e494ebce88174109a
|
| 3 |
-
size 803179584
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:18f4415e01c1a9d5957a643631b99c981ed12fa8bf91750bc2e99102a79a7e3e
|
| 3 |
-
size 963349568
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:97db0bc59d600d13e72daab717300ec40fc1b9775126ac0a92554d2b0acb554a
|
| 3 |
-
size 990923840
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8af1df0308e3acfcd4a865bf7ef30881eca4b2fad3525178705ec7610ce6943a
|
| 3 |
-
size 963349568
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5849a5e3d198e9569c9f94a091150cfc6d2e2652509e2cf51988154ce94c3e4f
|
| 3 |
-
size 1140493376
|
|
|
|
|
|
|
|
|
|
|
|
granite-3.0-1b-a400m-base-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6d7f29187f8eb2c542062f276ecad84661578e81d1d073ce52adbf80fd0f2b97
|
| 3 |
-
size 1475710016
|
|
|
|
|
|
|
|
|
|
|
|