Image-Text-to-Text
Transformers
GGUF
text-generation-inference
unsloth
qwen3_vl
trl
sft
chemistry
code
climate
art
biology
finance
legal
music
medical
agent
llama-cpp
gguf-my-repo
Instructions to use Lamapi/next-ocr-Q5_K_M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lamapi/next-ocr-Q5_K_M-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Lamapi/next-ocr-Q5_K_M-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Lamapi/next-ocr-Q5_K_M-GGUF", dtype="auto") - llama-cpp-python
How to use Lamapi/next-ocr-Q5_K_M-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Lamapi/next-ocr-Q5_K_M-GGUF", filename="next-ocr-q5_k_m.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Lamapi/next-ocr-Q5_K_M-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: llama-cli -hf Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: llama-cli -hf Lamapi/next-ocr-Q5_K_M-GGUF:Q5_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 Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf Lamapi/next-ocr-Q5_K_M-GGUF:Q5_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 Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
Use Docker
docker model run hf.co/Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
- LM Studio
- Jan
- vLLM
How to use Lamapi/next-ocr-Q5_K_M-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lamapi/next-ocr-Q5_K_M-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lamapi/next-ocr-Q5_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
- SGLang
How to use Lamapi/next-ocr-Q5_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 "Lamapi/next-ocr-Q5_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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lamapi/next-ocr-Q5_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Lamapi/next-ocr-Q5_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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lamapi/next-ocr-Q5_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Lamapi/next-ocr-Q5_K_M-GGUF with Ollama:
ollama run hf.co/Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
- Unsloth Studio
How to use Lamapi/next-ocr-Q5_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 Lamapi/next-ocr-Q5_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 Lamapi/next-ocr-Q5_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 Lamapi/next-ocr-Q5_K_M-GGUF to start chatting
- Docker Model Runner
How to use Lamapi/next-ocr-Q5_K_M-GGUF with Docker Model Runner:
docker model run hf.co/Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
- Lemonade
How to use Lamapi/next-ocr-Q5_K_M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Lamapi/next-ocr-Q5_K_M-GGUF:Q5_K_M
Run and chat with the model
lemonade run user.next-ocr-Q5_K_M-GGUF-Q5_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- text-generation-inference
|
| 4 |
+
- transformers
|
| 5 |
+
- unsloth
|
| 6 |
+
- qwen3_vl
|
| 7 |
+
- trl
|
| 8 |
+
- sft
|
| 9 |
+
- chemistry
|
| 10 |
+
- code
|
| 11 |
+
- climate
|
| 12 |
+
- art
|
| 13 |
+
- biology
|
| 14 |
+
- finance
|
| 15 |
+
- legal
|
| 16 |
+
- music
|
| 17 |
+
- medical
|
| 18 |
+
- agent
|
| 19 |
+
- llama-cpp
|
| 20 |
+
- gguf-my-repo
|
| 21 |
+
license: apache-2.0
|
| 22 |
+
language:
|
| 23 |
+
- en
|
| 24 |
+
- ab
|
| 25 |
+
- aa
|
| 26 |
+
- ae
|
| 27 |
+
- af
|
| 28 |
+
- ak
|
| 29 |
+
- am
|
| 30 |
+
- an
|
| 31 |
+
- ar
|
| 32 |
+
- as
|
| 33 |
+
- av
|
| 34 |
+
- ay
|
| 35 |
+
- az
|
| 36 |
+
- ba
|
| 37 |
+
- be
|
| 38 |
+
- bg
|
| 39 |
+
- bh
|
| 40 |
+
- bi
|
| 41 |
+
- bm
|
| 42 |
+
- bn
|
| 43 |
+
- bo
|
| 44 |
+
- br
|
| 45 |
+
- bs
|
| 46 |
+
- ca
|
| 47 |
+
- ce
|
| 48 |
+
- ch
|
| 49 |
+
- co
|
| 50 |
+
- cr
|
| 51 |
+
- cs
|
| 52 |
+
- cu
|
| 53 |
+
- cv
|
| 54 |
+
- cy
|
| 55 |
+
- da
|
| 56 |
+
- de
|
| 57 |
+
- dv
|
| 58 |
+
- dz
|
| 59 |
+
- ee
|
| 60 |
+
- el
|
| 61 |
+
- eo
|
| 62 |
+
- es
|
| 63 |
+
- et
|
| 64 |
+
- eu
|
| 65 |
+
- fa
|
| 66 |
+
- ff
|
| 67 |
+
- fi
|
| 68 |
+
- fj
|
| 69 |
+
- fo
|
| 70 |
+
- fr
|
| 71 |
+
- fy
|
| 72 |
+
- ga
|
| 73 |
+
- gd
|
| 74 |
+
- gl
|
| 75 |
+
- gn
|
| 76 |
+
- gv
|
| 77 |
+
- ha
|
| 78 |
+
- he
|
| 79 |
+
- hi
|
| 80 |
+
- ho
|
| 81 |
+
- gu
|
| 82 |
+
- hr
|
| 83 |
+
- ht
|
| 84 |
+
- hu
|
| 85 |
+
- hz
|
| 86 |
+
- hy
|
| 87 |
+
- id
|
| 88 |
+
- ia
|
| 89 |
+
- ig
|
| 90 |
+
- ie
|
| 91 |
+
- ik
|
| 92 |
+
- ii
|
| 93 |
+
- is
|
| 94 |
+
- io
|
| 95 |
+
- iu
|
| 96 |
+
- it
|
| 97 |
+
- jv
|
| 98 |
+
- ja
|
| 99 |
+
- kg
|
| 100 |
+
- ka
|
| 101 |
+
- kj
|
| 102 |
+
- ki
|
| 103 |
+
- kl
|
| 104 |
+
- kk
|
| 105 |
+
- kn
|
| 106 |
+
- km
|
| 107 |
+
- kr
|
| 108 |
+
- ko
|
| 109 |
+
- ku
|
| 110 |
+
- ks
|
| 111 |
+
- kw
|
| 112 |
+
- kv
|
| 113 |
+
- la
|
| 114 |
+
- ky
|
| 115 |
+
- lg
|
| 116 |
+
- lb
|
| 117 |
+
- ln
|
| 118 |
+
- li
|
| 119 |
+
- lt
|
| 120 |
+
- lo
|
| 121 |
+
- lv
|
| 122 |
+
- lu
|
| 123 |
+
- mg
|
| 124 |
+
- mi
|
| 125 |
+
- mh
|
| 126 |
+
- ml
|
| 127 |
+
- mk
|
| 128 |
+
- mr
|
| 129 |
+
- mn
|
| 130 |
+
- mt
|
| 131 |
+
- ms
|
| 132 |
+
- na
|
| 133 |
+
- my
|
| 134 |
+
- nd
|
| 135 |
+
- nb
|
| 136 |
+
- ng
|
| 137 |
+
- nl
|
| 138 |
+
- ne
|
| 139 |
+
- 'no'
|
| 140 |
+
- nn
|
| 141 |
+
- nv
|
| 142 |
+
- nr
|
| 143 |
+
- oc
|
| 144 |
+
- oj
|
| 145 |
+
- om
|
| 146 |
+
- ny
|
| 147 |
+
- os
|
| 148 |
+
- or
|
| 149 |
+
- pa
|
| 150 |
+
- pi
|
| 151 |
+
- pl
|
| 152 |
+
- ps
|
| 153 |
+
- pt
|
| 154 |
+
- rm
|
| 155 |
+
- rn
|
| 156 |
+
- qu
|
| 157 |
+
- ro
|
| 158 |
+
- ru
|
| 159 |
+
- sn
|
| 160 |
+
- rw
|
| 161 |
+
- so
|
| 162 |
+
- sa
|
| 163 |
+
- sc
|
| 164 |
+
- sd
|
| 165 |
+
pipeline_tag: image-text-to-text
|
| 166 |
+
library_name: transformers
|
| 167 |
+
base_model: Lamapi/next-ocr
|
| 168 |
+
---
|
| 169 |
+
|
| 170 |
+
# Lamapi/next-ocr-Q5_K_M-GGUF
|
| 171 |
+
This model was converted to GGUF format from [`Lamapi/next-ocr`](https://huggingface.co/Lamapi/next-ocr) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 172 |
+
Refer to the [original model card](https://huggingface.co/Lamapi/next-ocr) for more details on the model.
|
| 173 |
+
|
| 174 |
+
## Use with llama.cpp
|
| 175 |
+
Install llama.cpp through brew (works on Mac and Linux)
|
| 176 |
+
|
| 177 |
+
```bash
|
| 178 |
+
brew install llama.cpp
|
| 179 |
+
|
| 180 |
+
```
|
| 181 |
+
Invoke the llama.cpp server or the CLI.
|
| 182 |
+
|
| 183 |
+
### CLI:
|
| 184 |
+
```bash
|
| 185 |
+
llama-cli --hf-repo Lamapi/next-ocr-Q5_K_M-GGUF --hf-file next-ocr-q5_k_m.gguf -p "The meaning to life and the universe is"
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
### Server:
|
| 189 |
+
```bash
|
| 190 |
+
llama-server --hf-repo Lamapi/next-ocr-Q5_K_M-GGUF --hf-file next-ocr-q5_k_m.gguf -c 2048
|
| 191 |
+
```
|
| 192 |
+
|
| 193 |
+
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.
|
| 194 |
+
|
| 195 |
+
Step 1: Clone llama.cpp from GitHub.
|
| 196 |
+
```
|
| 197 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 198 |
+
```
|
| 199 |
+
|
| 200 |
+
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).
|
| 201 |
+
```
|
| 202 |
+
cd llama.cpp && LLAMA_CURL=1 make
|
| 203 |
+
```
|
| 204 |
+
|
| 205 |
+
Step 3: Run inference through the main binary.
|
| 206 |
+
```
|
| 207 |
+
./llama-cli --hf-repo Lamapi/next-ocr-Q5_K_M-GGUF --hf-file next-ocr-q5_k_m.gguf -p "The meaning to life and the universe is"
|
| 208 |
+
```
|
| 209 |
+
or
|
| 210 |
+
```
|
| 211 |
+
./llama-server --hf-repo Lamapi/next-ocr-Q5_K_M-GGUF --hf-file next-ocr-q5_k_m.gguf -c 2048
|
| 212 |
+
```
|