Mubsir — Arabic Handwritten Text Recognition (HTR) Adapter
Mubsir
(مُبصِر — "one who sees clearly") is a QLoRA adapter that fine-tunes
Qwen2-VL-2B-Instruct
for Arabic handwritten text recognition. Given an image of unstructured Arabic handwriting, the model outputs an accurate digital transcript.
This repository contains the
standalone LoRA adapter weights only
. For a ready-to-use, fully merged 16-bit model, see
Hatim2221/Mubsir-Qwen-2B-VL
.
Trainer:
Native Hugging Face
Trainer
(used in place of
SFTTrainer
to avoid library versioning conflicts in the Kaggle environment)
Memory management:
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
, capped dynamic image resolution, and reduced batch sizes to fit multimodal fine-tuning within T4 VRAM limits without OOM failures
Usage
The adapter must be attached to the base model at full precision. Loading the 4-bit quantized base and merging the 16-bit adapter directly in VRAM introduces rounding errors and degrades transcription quality — load the base model in
torch.float16
instead.
Always merge from a
float16
(or
bfloat16
) base — merging into a 4-bit quantized base will silently corrupt the adapter's learned weights.
Intended Use
Digitizing Arabic handwritten documents, notes, and manuscripts
Research and benchmarking on Arabic HTR
As a base for further fine-tuning on domain-specific handwriting (e.g., historical manuscripts, forms, exam scripts)
Limitations
Trained on the KHATT dataset; performance may degrade on handwriting styles, scripts, or document layouts (e.g., dense marginalia, mixed-language text) that differ significantly from the training distribution.
As with any HTR system, accuracy depends on image quality — resolution, lighting, and skew can affect output.
Not evaluated for languages or scripts other than Arabic.
Citation
If you use this adapter, please consider citing the base model and the KHATT dataset:
Mubsir-vl-arabic-htr-adapter huggingface.co is an AI model on huggingface.co that provides Mubsir-vl-arabic-htr-adapter's model effect (), which can be used instantly with this Hatim2221 Mubsir-vl-arabic-htr-adapter model. huggingface.co supports a free trial of the Mubsir-vl-arabic-htr-adapter model, and also provides paid use of the Mubsir-vl-arabic-htr-adapter. Support call Mubsir-vl-arabic-htr-adapter model through api, including Node.js, Python, http.
Mubsir-vl-arabic-htr-adapter huggingface.co is an online trial and call api platform, which integrates Mubsir-vl-arabic-htr-adapter's modeling effects, including api services, and provides a free online trial of Mubsir-vl-arabic-htr-adapter, you can try Mubsir-vl-arabic-htr-adapter online for free by clicking the link below.
Hatim2221 Mubsir-vl-arabic-htr-adapter online free url in huggingface.co:
Mubsir-vl-arabic-htr-adapter is an open source model from GitHub that offers a free installation service, and any user can find Mubsir-vl-arabic-htr-adapter on GitHub to install. At the same time, huggingface.co provides the effect of Mubsir-vl-arabic-htr-adapter install, users can directly use Mubsir-vl-arabic-htr-adapter installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Mubsir-vl-arabic-htr-adapter install url in huggingface.co: