Downloads · 30 days
15
36% of all-time downloads
SamMikaelson/OCR-int4-merged
OCR-int4-merged is a machine learning model from SamMikaelson. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
This is a merged version of the DeepSeek-OCR model that was quantized to INT4 and then dequantized back to full precision.
Downloads · 30 days
15
36% of all-time downloads
All-time downloads
42
Public
Parameters
1.4B
5.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.5 GB · 100%
From the Hugging Face model README
This is a merged version of the DeepSeek-OCR model that was quantized to INT4 and then dequantized back to full precision.
from transformers import AutoModelForCausalLM, AutoProcessor
from PIL import Image
# Load model and processor
model = AutoModelForCausalLM.from_pretrained(
"YOUR_USERNAME/OCR-int4-merged",
trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(
"YOUR_USERNAME/OCR-int4-merged",
trust_remote_code=True
)
# Process image
image = Image.open("document.jpg")
inputs = processor(images=image, return_tensors="pt")
# Generate OCR output
outputs = model.generate(**inputs, max_new_tokens=512)
text = processor.decode(outputs[0], skip_special_tokens=True)
print(text)
This model was created by:
The process allows for efficient storage and distribution while maintaining full model capabilities.