Instructions to use nobug12345/nk_ocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nobug12345/nk_ocr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="nobug12345/nk_ocr")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("nobug12345/nk_ocr") model = AutoModelForMultimodalLM.from_pretrained("nobug12345/nk_ocr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nobug12345/nk_ocr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nobug12345/nk_ocr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nobug12345/nk_ocr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nobug12345/nk_ocr
- SGLang
How to use nobug12345/nk_ocr 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 "nobug12345/nk_ocr" \ --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": "nobug12345/nk_ocr", "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 "nobug12345/nk_ocr" \ --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": "nobug12345/nk_ocr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nobug12345/nk_ocr with Docker Model Runner:
docker model run hf.co/nobug12345/nk_ocr
Commit History
-
Update config.json
Verified signature552fd82 -
Update preprocessor_config.json
Verified signaturef1bffc7 -
Update tokenizer_config.json
Verified signatureb4c388a
-
Create tokenizer.json
Verified signature111a414 -
Create special_tokens_map.json
Verified signatureb0436cc -
Create added_tokens.json
Verified signatureee51753 -
Create tokenizer_config.json
Verified signature04a1e7b -
Update preprocessor_config.json
Verified signaturea1ccc44 -
Update preprocessor_config.json
Verified signaturea0bc5d6 -
Update config.json
Verified signatureab852ce -
Update preprocessor_config.json
Verified signaturee085941 -
Update preprocessor_config.json
Verified signaturec8ae48e -
Create preprocessor_config.json
Verified signature7335ff5 -
Create config.json
Verified signature0f325c4 -
initial commit
Verified signature46fa851