Downloads · 30 days
11
5% of all-time downloads
snskrt/qwen2-5-vl-sanskrit-ocr
qwen2-5-vl-sanskrit-ocr is a text generation model from snskrt. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of Qwen/Qwen2.5-VL-7B-Instruct on the diabolic6045/sanskrit-ocr-parallel-corpus-chat-template dataset. This data is converted from snskrt/SanskritOCRParallelCorpus by Sanskrit Datasets.
Downloads · 30 days
11
5% of all-time downloads
All-time downloads
206
Public
Parameters
8.3B
16.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.6 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Qwen/Qwen2.5-VL-7B-Instruct on the diabolic6045/sanskrit-ocr-parallel-corpus-chat-template dataset. This data is converted from snskrt/Sanskrit_OCR_Parallel_Corpus by Sanskrit Datasets.
It achieves the following results on the evaluation set:
This is a fine-tuned version of Qwen2.5-VL-7B-Instruct, specifically adapted for Sanskrit OCR (Optical Character Recognition) tasks. The model has been trained using LoRA (Low-Rank Adaptation) on a dataset of Sanskrit text images and their corresponding transcriptions.
Key Features:
Capabilities:
The model maintains the original Qwen2.5-VL's vision-language capabilities while being specialized for Sanskrit text recognition tasks.
The model was trained on the diabolic6045/sanskrit-ocr-parallel-corpus-chat-template dataset, which contains Sanskrit text images paired with their corresponding transcriptions. The dataset was converted from the original snskrt/Sanskrit_OCR_Parallel_Corpus and formatted with chat templates for vision-language training.
The model was evaluated on a test set of 314 Sanskrit text samples:
| Metric | Value |
|---|---|
| Total Samples | 314 |
| Successful Samples | 314 |
| Failed Samples | 0 |
| Success Rate | 100.00% |
| Exact Match Accuracy | 1.59% |
| Character-level Accuracy | 86.38% |
| Token-level Jaccard Similarity | 50.44% |
Key Insights:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Mem Active(gib) | Mem Allocated(gib) | Mem Reserved(gib) |
|---|---|---|---|---|---|---|
| No log | 0 | 0 | 3.3372 | 17.59 | 17.59 | 17.66 |
| 0.2428 | 1.0 | 369 | 0.3075 | 20.69 | 20.69 | 21.27 |
| 0.2057 | 2.0 | 738 | 0.2660 | 20.79 | 20.79 | 21.46 |
This model was trained using: <br> <img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>
<details><summary>See axolotl config</summary>axolotl version: 0.12.2
base_model: Qwen/Qwen2.5-VL-7B-Instruct
processor_type: AutoProcessor
# these 3 lines are needed for now to handle vision chat templates w images
skip_prepare_dataset: true
remove_unused_columns: false
sample_packing: false
chat_template: qwen2_vl
datasets:
- path: sanskrit_multimodal_train.json
type: chat_template
field_messages: messages
dataset_prepared_path: last_run_prepared
val_set_size: 0.01
output_dir: ./outputs/out-qwen2-5-vl
adapter: lora
lora_model_dir:
sequence_len: 2048
pad_to_sequence_len: false
lora_r: 32
lora_alpha: 16
lora_dropout: 0.05
lora_target_modules: 'model.language_model.layers.[\d]+.(mlp|cross_attn|self_attn).(up|down|gate|q|k|v|o)_proj'
wandb_project: Sanskrit-OCR
wandb_entity:
wandb_watch:
wandb_name: qwen2-5-vl-sanskrit-ocr
wandb_log_model:
gradient_accumulation_steps: 4
micro_batch_size: 2
num_epochs: 3
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.0002
bf16: true
fp16:
tf32: true
gradient_checkpointing: true
logging_steps: 1
flash_attention: true
eager_attention:
warmup_ratio: 0.1
evals_per_epoch: 1
saves_per_epoch: 1
weight_decay: 0.0
# Automatically upload checkpoint and final model to HF
hub_model_id: diabolic6045/qwen2-5-vl-sanskrit-ocr-lora
# save_first_step: true # uncomment this to validate checkpoint saving works with your config
</details><br>