File size: 3,051 Bytes
39029ee b41e62f 39029ee b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 e33e3fa b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f aeebf95 b41e62f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | ---
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:
```python
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()
```
|