Tcyber/deepseek_ocr_ethiopian_legal_FULL
026
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.
Run on Colab (free T4)
Load this model with on-the-fly 4-bit quantization so it fits a 16 GB Colab T4:
- Open
colab/Deepseek_OCR_FULL_T4_Test.ipynbfrom the Files tab of this repo. - Upload the notebook to Google Colab (or copy the cells).
- Runtime → Run all, then upload a page image when prompted.
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)