CoolFace
Modelpublic

Tcyber/deepseek_ocr_ethiopian_legal_FULL

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes26downloads
Model Card

Uploaded finetuned model

  • —Developed by: Tcyber
  • —License: apache-2.0
  • —Finetuned from model : deepseek-ai/DeepSeek-OCR-2

This deepseekvlv2 model was trained 2x faster with Unsloth and Huggingface's TRL library.

<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>

Run on Colab (free T4)

Load this model with on-the-fly 4-bit quantization so it fits a 16 GB Colab T4:

  1. 1.Open colab/Deepseek_OCR_FULL_T4_Test.ipynb from the Files tab of this repo.
  2. 2.Upload the notebook to Google Colab (or copy the cells).
  3. 3.Runtime → Run all, then upload a page image when prompted.
python
from unsloth import FastVisionModel
from transformers import AutoModel
import torch

model, tokenizer = FastVisionModel.from_pretrained(
    "Tcyber/deepseek_ocr_ethiopian_legal_FULL",
    load_in_4bit=True,               # ~4GB weights, fits 16GB T4
    dtype=torch.float16,             # T4 has no bf16 kernels
    auto_model=AutoModel,
    trust_remote_code=True,
    unsloth_force_compile=False,     # avoid RAM spike
    use_gradient_checkpointing=False,
)
FastVisionModel.for_inference(model)

res = model.infer(tokenizer, prompt="<image>\nFree OCR. ", image_file="page.png",
                  output_path="out/", image_size=768, base_size=1024,
                  crop_mode=False, save_results=False)
print(res)