Instructions to use staghado/granite-speech-4.0-1b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use staghado/granite-speech-4.0-1b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="staghado/granite-speech-4.0-1b-GGUF", filename="granite-speech-4.0-1b-Q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use staghado/granite-speech-4.0-1b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf staghado/granite-speech-4.0-1b-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf staghado/granite-speech-4.0-1b-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf staghado/granite-speech-4.0-1b-GGUF:Q8_0 # Run inference directly in the terminal: llama-cli -hf staghado/granite-speech-4.0-1b-GGUF:Q8_0
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 staghado/granite-speech-4.0-1b-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf staghado/granite-speech-4.0-1b-GGUF:Q8_0
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 staghado/granite-speech-4.0-1b-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf staghado/granite-speech-4.0-1b-GGUF:Q8_0
Use Docker
docker model run hf.co/staghado/granite-speech-4.0-1b-GGUF:Q8_0
- LM Studio
- Jan
- Ollama
How to use staghado/granite-speech-4.0-1b-GGUF with Ollama:
ollama run hf.co/staghado/granite-speech-4.0-1b-GGUF:Q8_0
- Unsloth Studio
How to use staghado/granite-speech-4.0-1b-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 staghado/granite-speech-4.0-1b-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 staghado/granite-speech-4.0-1b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for staghado/granite-speech-4.0-1b-GGUF to start chatting
- Docker Model Runner
How to use staghado/granite-speech-4.0-1b-GGUF with Docker Model Runner:
docker model run hf.co/staghado/granite-speech-4.0-1b-GGUF:Q8_0
- Lemonade
How to use staghado/granite-speech-4.0-1b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull staghado/granite-speech-4.0-1b-GGUF:Q8_0
Run and chat with the model
lemonade run user.granite-speech-4.0-1b-GGUF-Q8_0
List all available models
lemonade list
Granite Speech 4.0 1B โ GGUF
GGUF conversion of ibm-granite/granite-4.0-1b-speech for use with llama.cpp audio-multimodal support (see PR #22101).
| File | Quant | Size |
|---|---|---|
granite-speech-4.0-1b-Q8_0.gguf |
Q8_0 | ~1.8 GB |
mmproj-granite-speech-4.0-1b-f16.gguf |
f16 | ~1.1 GB |
The LLM is quantized to Q8_0; the audio encoder + QFormer projector (mmproj) stays at f16 because llama-quantize does not support the clip architecture used by audio projectors.
Usage
One-shot CLI
llama-mtmd-cli -hf staghado/granite-speech-4.0-1b-GGUF \
--audio my.wav \
-p "can you transcribe the speech into a written format?" \
--jinja --temp 0
Server (OpenAI-compatible)
llama-server -hf staghado/granite-speech-4.0-1b-GGUF --jinja
Then POST to /v1/chat/completions:
{
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "can you transcribe the speech into a written format?"},
{"type": "input_audio", "input_audio": {"data": "<base64 wav>", "format": "wav"}}
]
}]
}
Audio input requirements: 16 kHz mono WAV (or MP3). From the GGUF's load_hparams: n_mel_bins=160, audio_n_fft=512, audio_window_len=400, audio_hop_len=160, audio_sample_rate=16000.
Conversion provenance
Produced with llama.cpp master (commit 2e97c5f96, build 9100) using:
python convert_hf_to_gguf.py granite-src --outtype f16 --outfile granite-speech-4.0-1b-f16.gguf
python convert_hf_to_gguf.py granite-src --outtype f16 --mmproj --outfile mmproj-granite-speech-4.0-1b-f16.gguf
llama-quantize granite-speech-4.0-1b-f16.gguf granite-speech-4.0-1b-Q8_0.gguf Q8_0
License
Inherits Apache 2.0 from the base model.
- Downloads last month
- 212
8-bit
Model tree for staghado/granite-speech-4.0-1b-GGUF
Base model
ibm-granite/granite-4.0-1b-base