Instructions to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF", dtype="auto") - llama-cpp-python
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF", filename="granite-3.0-8b-instruct-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
Use Docker
docker model run hf.co/davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "davelsphere/granite-3.0-8b-instruct-Q4_K_M-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": "davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
- SGLang
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 "davelsphere/granite-3.0-8b-instruct-Q4_K_M-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": "davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 "davelsphere/granite-3.0-8b-instruct-Q4_K_M-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": "davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with Ollama:
ollama run hf.co/davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
- Unsloth Studio
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 davelsphere/granite-3.0-8b-instruct-Q4_K_M-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 davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF to start chatting
- Pi
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with Docker Model Runner:
docker model run hf.co/davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
- Lemonade
How to use davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.granite-3.0-8b-instruct-Q4_K_M-GGUF-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-generation
|
| 3 |
+
inference: false
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- language
|
| 8 |
+
- granite-3.0
|
| 9 |
+
- llama-cpp
|
| 10 |
+
- gguf-my-repo
|
| 11 |
+
base_model: ibm-granite/granite-3.0-8b-instruct
|
| 12 |
+
model-index:
|
| 13 |
+
- name: granite-3.0-2b-instruct
|
| 14 |
+
results:
|
| 15 |
+
- task:
|
| 16 |
+
type: text-generation
|
| 17 |
+
dataset:
|
| 18 |
+
name: IFEval
|
| 19 |
+
type: instruction-following
|
| 20 |
+
metrics:
|
| 21 |
+
- type: pass@1
|
| 22 |
+
value: 52.27
|
| 23 |
+
name: pass@1
|
| 24 |
+
- type: pass@1
|
| 25 |
+
value: 8.22
|
| 26 |
+
name: pass@1
|
| 27 |
+
- task:
|
| 28 |
+
type: text-generation
|
| 29 |
+
dataset:
|
| 30 |
+
name: AGI-Eval
|
| 31 |
+
type: human-exams
|
| 32 |
+
metrics:
|
| 33 |
+
- type: pass@1
|
| 34 |
+
value: 40.52
|
| 35 |
+
name: pass@1
|
| 36 |
+
- type: pass@1
|
| 37 |
+
value: 65.82
|
| 38 |
+
name: pass@1
|
| 39 |
+
- type: pass@1
|
| 40 |
+
value: 34.45
|
| 41 |
+
name: pass@1
|
| 42 |
+
- task:
|
| 43 |
+
type: text-generation
|
| 44 |
+
dataset:
|
| 45 |
+
name: OBQA
|
| 46 |
+
type: commonsense
|
| 47 |
+
metrics:
|
| 48 |
+
- type: pass@1
|
| 49 |
+
value: 46.6
|
| 50 |
+
name: pass@1
|
| 51 |
+
- type: pass@1
|
| 52 |
+
value: 71.21
|
| 53 |
+
name: pass@1
|
| 54 |
+
- type: pass@1
|
| 55 |
+
value: 82.61
|
| 56 |
+
name: pass@1
|
| 57 |
+
- type: pass@1
|
| 58 |
+
value: 77.51
|
| 59 |
+
name: pass@1
|
| 60 |
+
- type: pass@1
|
| 61 |
+
value: 60.32
|
| 62 |
+
name: pass@1
|
| 63 |
+
- task:
|
| 64 |
+
type: text-generation
|
| 65 |
+
dataset:
|
| 66 |
+
name: BoolQ
|
| 67 |
+
type: reading-comprehension
|
| 68 |
+
metrics:
|
| 69 |
+
- type: pass@1
|
| 70 |
+
value: 88.65
|
| 71 |
+
name: pass@1
|
| 72 |
+
- type: pass@1
|
| 73 |
+
value: 21.58
|
| 74 |
+
name: pass@1
|
| 75 |
+
- task:
|
| 76 |
+
type: text-generation
|
| 77 |
+
dataset:
|
| 78 |
+
name: ARC-C
|
| 79 |
+
type: reasoning
|
| 80 |
+
metrics:
|
| 81 |
+
- type: pass@1
|
| 82 |
+
value: 64.16
|
| 83 |
+
name: pass@1
|
| 84 |
+
- type: pass@1
|
| 85 |
+
value: 33.81
|
| 86 |
+
name: pass@1
|
| 87 |
+
- type: pass@1
|
| 88 |
+
value: 51.55
|
| 89 |
+
name: pass@1
|
| 90 |
+
- task:
|
| 91 |
+
type: text-generation
|
| 92 |
+
dataset:
|
| 93 |
+
name: HumanEvalSynthesis
|
| 94 |
+
type: code
|
| 95 |
+
metrics:
|
| 96 |
+
- type: pass@1
|
| 97 |
+
value: 64.63
|
| 98 |
+
name: pass@1
|
| 99 |
+
- type: pass@1
|
| 100 |
+
value: 57.16
|
| 101 |
+
name: pass@1
|
| 102 |
+
- type: pass@1
|
| 103 |
+
value: 65.85
|
| 104 |
+
name: pass@1
|
| 105 |
+
- type: pass@1
|
| 106 |
+
value: 49.6
|
| 107 |
+
name: pass@1
|
| 108 |
+
- task:
|
| 109 |
+
type: text-generation
|
| 110 |
+
dataset:
|
| 111 |
+
name: GSM8K
|
| 112 |
+
type: math
|
| 113 |
+
metrics:
|
| 114 |
+
- type: pass@1
|
| 115 |
+
value: 68.99
|
| 116 |
+
name: pass@1
|
| 117 |
+
- type: pass@1
|
| 118 |
+
value: 30.94
|
| 119 |
+
name: pass@1
|
| 120 |
+
- task:
|
| 121 |
+
type: text-generation
|
| 122 |
+
dataset:
|
| 123 |
+
name: PAWS-X (7 langs)
|
| 124 |
+
type: multilingual
|
| 125 |
+
metrics:
|
| 126 |
+
- type: pass@1
|
| 127 |
+
value: 64.94
|
| 128 |
+
name: pass@1
|
| 129 |
+
- type: pass@1
|
| 130 |
+
value: 48.2
|
| 131 |
+
name: pass@1
|
| 132 |
+
---
|
| 133 |
+
|
| 134 |
+
# davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF
|
| 135 |
+
This model was converted to GGUF format from [`ibm-granite/granite-3.0-8b-instruct`](https://huggingface.co/ibm-granite/granite-3.0-8b-instruct) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 136 |
+
Refer to the [original model card](https://huggingface.co/ibm-granite/granite-3.0-8b-instruct) for more details on the model.
|
| 137 |
+
|
| 138 |
+
## Use with llama.cpp
|
| 139 |
+
Install llama.cpp through brew (works on Mac and Linux)
|
| 140 |
+
|
| 141 |
+
```bash
|
| 142 |
+
brew install llama.cpp
|
| 143 |
+
|
| 144 |
+
```
|
| 145 |
+
Invoke the llama.cpp server or the CLI.
|
| 146 |
+
|
| 147 |
+
### CLI:
|
| 148 |
+
```bash
|
| 149 |
+
llama-cli --hf-repo davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF --hf-file granite-3.0-8b-instruct-q4_k_m.gguf -p "The meaning to life and the universe is"
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
### Server:
|
| 153 |
+
```bash
|
| 154 |
+
llama-server --hf-repo davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF --hf-file granite-3.0-8b-instruct-q4_k_m.gguf -c 2048
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
|
| 158 |
+
|
| 159 |
+
Step 1: Clone llama.cpp from GitHub.
|
| 160 |
+
```
|
| 161 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
|
| 165 |
+
```
|
| 166 |
+
cd llama.cpp && LLAMA_CURL=1 make
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
Step 3: Run inference through the main binary.
|
| 170 |
+
```
|
| 171 |
+
./llama-cli --hf-repo davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF --hf-file granite-3.0-8b-instruct-q4_k_m.gguf -p "The meaning to life and the universe is"
|
| 172 |
+
```
|
| 173 |
+
or
|
| 174 |
+
```
|
| 175 |
+
./llama-server --hf-repo davelsphere/granite-3.0-8b-instruct-Q4_K_M-GGUF --hf-file granite-3.0-8b-instruct-q4_k_m.gguf -c 2048
|
| 176 |
+
```
|