bisalsaha's picture
Update dataset card to match 100% jihadv4 format & statistics
aeebf95 verified
|
Raw History Blame Contribute Delete
3.05 kB
metadata
license: apache-2.0
task_categories:
  - image-to-text
  - visual-question-answering
tags:
  - vlm
  - unsloth
  - qwen-vl
  - document-ai
  - trade-finance
  - bangladesh-bank
size_categories:
  - n<1K

🏦 Bangladesh Bank Trade Finance IDP β€” Multi-User Collaborative Fine-Tuning Dataset

This dataset contains human-reviewed, verified, and corrected document extractions for the 8 official Bangladesh Bank regulatory trade-finance document types.

It is completely self-contained and structured for immediate Vision-Language Model (VLM) fine-tuning anytime from any environment (Colab, Kaggle, GPU cluster, or local), with built-in multi-annotator merge support and incremental delta uploads.


πŸ“Š Dataset Structure & Splits

Split / Subset Description Examples
train Ready-to-train multi-task VLM conversations (messages format) 320
validation Stratified held-out evaluation conversations for monitoring eval loss 80
documents Full document-level feedback records with model outputs, human corrections, confidence scores & DPO pairs (subset: documents) 200

πŸ“‘ Document Types Represented

Document Type Document Count
air_waybill 25
bill_of_entry 25
commercial_lca 25
exp_form 25
final_invoice 25
imp_form 25
industrial_lca 25
ocean_bl 25

Total DPO Preference Pairs Available: 10 (for Direct Preference Optimization)

  • Visual Diversity: 8 Header styles, 5 Table formats, 4 Procedural Stamp configurations, and 12 distinct color palettes.
  • Realistic Handwriting: Natural handwriting pen fills and endorsements in varied inks (blue ballpoint, dark ink, navy, royal blue) paired with 100% strictly validated schema JSON.
  • Header Integrity: MessageIdentifier is strictly excluded from document image layouts and is normalized as empty "" in ground truth.

πŸš€ Quickstart: Train in 10 Lines with Unsloth / TRL

You can fine-tune Qwen3-VL / Qwen2.5-VL directly on this dataset without ANY manual data wrangling:

from datasets import load_dataset
from unsloth import FastVisionModel
from trl import SFTTrainer, SFTConfig

# 1. Load dataset directly from Hugging Face
ds = load_dataset("bisalsaha/bb-trade-idp-feedback")
train_data = ds["train"]
eval_data = ds.get("validation")

# 2. Load model & attach vision LoRA adapters
model, tokenizer = FastVisionModel.from_pretrained(
    "unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bit",
    load_in_4bit=True
)
model = FastVisionModel.get_peft_model(
    model,
    r=16,
    lora_alpha=32,
    target_modules=["q_proj", "v_proj"]
)

# 3. SFT Trainer
trainer = SFTTrainer(
    model=model,
    train_dataset=train_data,
    eval_dataset=eval_data,
    dataset_text_field="messages",
    max_seq_length=2048,
    args=SFTConfig(
        per_device_train_batch_size=2,
        gradient_accumulation_steps=4,
        learning_rate=1e-4,
        output_dir="./qwen3vl_trade_idp"
    )
)
trainer.train()