Instructions to use btbtyler09/shrew-ocr-preview-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use btbtyler09/shrew-ocr-preview-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 btbtyler09/shrew-ocr-preview-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf btbtyler09/shrew-ocr-preview-GGUF:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf btbtyler09/shrew-ocr-preview-GGUF:Q8_0 # Run inference directly in the terminal: llama cli -hf btbtyler09/shrew-ocr-preview-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 btbtyler09/shrew-ocr-preview-GGUF:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf btbtyler09/shrew-ocr-preview-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 btbtyler09/shrew-ocr-preview-GGUF:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf btbtyler09/shrew-ocr-preview-GGUF:Q8_0
Use Docker
docker model run hf.co/btbtyler09/shrew-ocr-preview-GGUF:Q8_0
- LM Studio
- Jan
- vLLM
How to use btbtyler09/shrew-ocr-preview-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "btbtyler09/shrew-ocr-preview-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": "btbtyler09/shrew-ocr-preview-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/btbtyler09/shrew-ocr-preview-GGUF:Q8_0
- Ollama
How to use btbtyler09/shrew-ocr-preview-GGUF with Ollama:
ollama run hf.co/btbtyler09/shrew-ocr-preview-GGUF:Q8_0
- Unsloth Studio
How to use btbtyler09/shrew-ocr-preview-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 btbtyler09/shrew-ocr-preview-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 btbtyler09/shrew-ocr-preview-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for btbtyler09/shrew-ocr-preview-GGUF to start chatting
- Pi
How to use btbtyler09/shrew-ocr-preview-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf btbtyler09/shrew-ocr-preview-GGUF:Q8_0
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": "btbtyler09/shrew-ocr-preview-GGUF:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use btbtyler09/shrew-ocr-preview-GGUF with Docker Model Runner:
docker model run hf.co/btbtyler09/shrew-ocr-preview-GGUF:Q8_0
- Lemonade
How to use btbtyler09/shrew-ocr-preview-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull btbtyler09/shrew-ocr-preview-GGUF:Q8_0
Run and chat with the model
lemonade run user.shrew-ocr-preview-GGUF-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use btbtyler09/shrew-ocr-preview-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 btbtyler09/shrew-ocr-preview-GGUF:Q8_0
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 btbtyler09/shrew-ocr-preview-GGUF:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use btbtyler09/shrew-ocr-preview-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf btbtyler09/shrew-ocr-preview-GGUF:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "btbtyler09/shrew-ocr-preview-GGUF:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
shrew-ocr-preview-GGUF
GGUF conversions of shrew-ocr-preview for llama.cpp. The model converts one document page image per request into a single JSON object containing document metadata, a summary, RAG-ready semantic chunks, and figures/tables with bounding boxes and HTML — see the merged model card for the output schema and full input contract.
Converted from the bf16 merged checkpoint with llama.cpp release b10453 (native Granite4Vision support). Only the language model is quantized; the vision tower is f16 in the mmproj — the same layout as the GPTQ variant.
Files
| file | size | validated envelope |
|---|---|---|
| shrew-ocr-preview-Q8_0.gguf | 3.6 GB | 12 GB-class GPUs at the full contract; up to 2 slots with KV quantization (see Serving) |
| shrew-ocr-preview-f16.gguf | 6.8 GB | reference precision; requires ≥16 GB VRAM at full 32k context (CUDA OOM on 12 GB with large-tile pages) |
| shrew-ocr-preview-mmproj-f16.gguf | 1.16 GB | required alongside either LM file |
SHA256SUMS is included; verify downloads against it.
Serving
llama-server splits -c evenly across parallel slots, and a slot with less than the full 32k
context crashes on dense pages (exit 139). The rule: set -c to N × 32768 for -np N —
full context per slot. This is a correctness requirement independent of VRAM.
# single slot — safe everywhere (~2.8 pages/min on a 12 GB RTX 3060)
llama-server -m shrew-ocr-preview-Q8_0.gguf \
--mmproj shrew-ocr-preview-mmproj-f16.gguf \
-ngl 99 -c 32768 -np 1 --host 0.0.0.0 --port 8080
# two slots on 12 GB — KV-cache quantization REQUIRED (f16 KV at 64k crashes under load);
# measured fidelity-neutral, ~2x throughput (~5.7 pages/min)
llama-server -m shrew-ocr-preview-Q8_0.gguf \
--mmproj shrew-ocr-preview-mmproj-f16.gguf \
-ngl 99 -c 65536 -np 2 \
--cache-type-k q8_0 --cache-type-v q8_0 \
--host 0.0.0.0 --port 8080
Multi-slot validation (50-page gate, 12 GB RTX 3060, paired per-page fidelity vs single-slot):
-np 2 + q8_0 KV scored first-pass 46/50, precision 0.939, paired fidelity delta 0.0000 — vs
44/50 / 0.935 single-slot. q8_0 KV quantization alone is also fidelity-neutral (paired delta
0.0000). Larger cards can scale -np further under the same -c = N × 32768 rule (unmeasured
beyond N=2). -np 2 with f16 KV on 12 GB crashes under load; do not run it without the KV
quantization flags.
Zero-setup alternative: docker run --gpus all -p 8000:8000 btbtyler09/shrew-ocr-cuda:v0.2.1
serves this model with the Q8_0 files baked in. Env vars NP / CTX / KV_QUANT expose the
same knobs (default NP=1, always safe).
The client contract is unchanged from the merged model card: glyph-routed bucket preprocessing,
the structured_extraction system prompt, temperature 0 (plus presence_penalty 0.3 per the
reference server). Point shrew-server at this
endpoint, or follow the merged card's Usage section for direct integration.
Validation
Q8_0 gate — 50 pages against the vLLM GPTQ-8bit variant on identical pages: first-pass ok 44/50 vs 43/50, extraction precision 0.935 vs 0.937, paired table-fidelity delta median 0.000, bbox emission verified. Throughput ~30 s/page single-stream on an RTX 3060 (vLLM: ~28 s/page).
f16 — quality spot-check 9/10 pages ok, precision 0.942 (measured at -c 16384 on an RTX 3060;
the full 32k contract needs ≥16 GB VRAM).
Versions
| variant | precision | size | notes |
|---|---|---|---|
| shrew-ocr-preview | bf16 | 7.5 GB | reference quality |
| shrew-ocr-preview-GPTQ-8bit | INT8 LM / bf16 vision | 4.9 GB | ~1.8× serving throughput, +0.25% domain perplexity; serve with --dtype half |
| shrew-ocr-preview-GGUF | Q8_0 or f16 LM / f16 vision (this repo) | 3.6–6.8 GB | llama.cpp; full context per slot required (-c = N × 32768) |
| shrew-ocr-preview-lora | LoRA adapter (r=256, bf16) | 2.0 GB | for composition / continued training |
This is a preview: weights update in place under these names as the model improves, and the repos
are pushed in lockstep from the same training generation. Each push's commit message records the
generation — pin a commit (revision=) for reproducibility.
Base model: ibm-granite/granite-vision-4.1-4b (Apache 2.0). All fine-tuning lives in the language model; the vision tower is unchanged from the base.
- Downloads last month
- 213
8-bit
16-bit
Model tree for btbtyler09/shrew-ocr-preview-GGUF
Base model
ibm-granite/granite-vision-4.1-4b