Image-Text-to-Text
Transformers
Safetensors
Arabic
nemotron_parse
text-generation
ocr
arabic
document-ai
conversational
custom_code
Instructions to use g3ida/absir-arabic-ocr-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use g3ida/absir-arabic-ocr-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="g3ida/absir-arabic-ocr-mini", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("g3ida/absir-arabic-ocr-mini", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use g3ida/absir-arabic-ocr-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "g3ida/absir-arabic-ocr-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "g3ida/absir-arabic-ocr-mini", "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/g3ida/absir-arabic-ocr-mini
- SGLang
How to use g3ida/absir-arabic-ocr-mini 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 "g3ida/absir-arabic-ocr-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "g3ida/absir-arabic-ocr-mini", "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 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 "g3ida/absir-arabic-ocr-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "g3ida/absir-arabic-ocr-mini", "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" } } ] } ] }' - Docker Model Runner
How to use g3ida/absir-arabic-ocr-mini with Docker Model Runner:
docker model run hf.co/g3ida/absir-arabic-ocr-mini
Download examples/example_fihrist.png from g3ida/absir-arabic-ocr-mini: direct link, hf CLI and curl.
- Browser
- Download file 545 kB
-
https://huggingface.co/g3ida/absir-arabic-ocr-mini/resolve/main/examples/example_fihrist.png
- Command line
-
hf download hf://g3ida/absir-arabic-ocr-mini/examples/example_fihrist.png
-
curl -L -o example_fihrist.png https://huggingface.co/g3ida/absir-arabic-ocr-mini/resolve/main/examples/example_fihrist.png
545 kB

- Xet hash:
- 6d923224698f484d6d6c831f30ced8a69417f520a53bbac2f7da277d9a21a26f
- Size of remote file:
- 545 kB
- SHA256:
- b535f917a943b6cda6ece9b22bfebf7e39e920a5635be2e08f811cd1678662ab
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.