Instructions to use gabriellarson/Nanonets-OCR-s-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use gabriellarson/Nanonets-OCR-s-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="gabriellarson/Nanonets-OCR-s-GGUF", filename="Nanonets-OCR-s-BF16.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use gabriellarson/Nanonets-OCR-s-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # 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
Install from WinGet (Windows)
winget install llama.cpp # 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
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 new
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
- 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
I updated the gguf to use the correct chat template. Make sure you use the right sampling parameters (as included in the llama-server command here).
run llama-server:
./llama-server -m "Nanonets-OCR-s-BF16.gguf" --mmproj "mmproj-Nanonets-OCR-s-F32.gguf" --repeat-penalty 1.05 --temp 0.0 --top-p 1.0 --min-p 0.0 --top-k -1
prompt:
Extract the text from the above document as if you were reading it naturally. Return the tables in html format. Return the equations in LaTeX representation. If there is an image in the document and image caption is not present, add a small description of the image inside the <img></img> tag; otherwise, add the image caption inside <img></img>. Watermarks should be wrapped in brackets. Ex: <watermark>OFFICIAL COPY</watermark>. Page numbers should be wrapped in brackets. Ex: <page_number>14</page_number> or <page_number>9/22</page_number>. Prefer using โ and โ for check boxes.
- Downloads last month
- 90
16-bit