Instructions to use gabriellarson/Nanonets-OCR-s-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 gabriellarson/Nanonets-OCR-s-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 gabriellarson/Nanonets-OCR-s-GGUF:BF16 # Run inference directly in the terminal: llama cli -hf gabriellarson/Nanonets-OCR-s-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf gabriellarson/Nanonets-OCR-s-GGUF:BF16 # Run inference directly in the terminal: llama cli -hf gabriellarson/Nanonets-OCR-s-GGUF:BF16
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 gabriellarson/Nanonets-OCR-s-GGUF:BF16 # Run inference directly in the terminal: ./llama-cli -hf gabriellarson/Nanonets-OCR-s-GGUF:BF16
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 gabriellarson/Nanonets-OCR-s-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf gabriellarson/Nanonets-OCR-s-GGUF:BF16
Use Docker
docker model run hf.co/gabriellarson/Nanonets-OCR-s-GGUF:BF16
- LM Studio
- Jan
- vLLM
How to use gabriellarson/Nanonets-OCR-s-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gabriellarson/Nanonets-OCR-s-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": "gabriellarson/Nanonets-OCR-s-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/gabriellarson/Nanonets-OCR-s-GGUF:BF16
- Ollama
How to use gabriellarson/Nanonets-OCR-s-GGUF with Ollama:
ollama run hf.co/gabriellarson/Nanonets-OCR-s-GGUF:BF16
- Unsloth Studio
How to use gabriellarson/Nanonets-OCR-s-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 gabriellarson/Nanonets-OCR-s-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 gabriellarson/Nanonets-OCR-s-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gabriellarson/Nanonets-OCR-s-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use gabriellarson/Nanonets-OCR-s-GGUF with Docker Model Runner:
docker model run hf.co/gabriellarson/Nanonets-OCR-s-GGUF:BF16
- Lemonade
How to use gabriellarson/Nanonets-OCR-s-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull gabriellarson/Nanonets-OCR-s-GGUF:BF16
Run and chat with the model
lemonade run user.Nanonets-OCR-s-GGUF-BF16
List all available models
lemonade list
How to run with mmproj
Can someone provide some sample code on how to run this model locally via llama_cpp_python?
I don't understand how to pick up the mmproj file along with the gguf ..
I havent used llama_cpp_python but it looks like you use "clip_model_path"
example taken from: https://github.com/abetlen/llama-cpp-python/blob/b1d23df0bbd327b774083b5cf88e67ca0dd52b92/docs/server.md
{
"model": "models/ggml_llava-v1.5-7b/ggml-model-q4_k.gguf",
"model_alias": "gpt-4-vision-preview",
"chat_format": "llava-1-5",
"clip_model_path": "models/ggml_llava-v1.5-7b/mmproj-model-f16.gguf",
"n_gpu_layers": -1,
"offload_kqv": true,
"n_threads": 12,
"n_batch": 512,
"n_ctx": 2048
}