jihadv4's picture
Sync feedback: +6 new records, +6 new images (Total: 207 records)
f33be96 verified
|
Raw History Blame Contribute Delete
3.62 kB
---
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) | 334 |
| **`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`) | 207 |
### πŸ“‘ Document Types Represented
| Document Type | Document Count |
|---|---|
| `air_waybill` | 27 |
| `bill_of_entry` | 26 |
| `commercial_lca` | 25 |
| `exp_form` | 25 |
| `final_invoice` | 28 |
| `imp_form` | 25 |
| `industrial_lca` | 25 |
| `ocean_bl` | 26 |
**Total DPO Preference Pairs Available:** 1 (for Direct Preference Optimization)
---
## πŸš€ 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 unsloth.trainer import UnslothVisionDataCollator
from trl import SFTTrainer, SFTConfig
# 1. Load the ready-to-train dataset directly from Hugging Face
ds = load_dataset("jihadv4/bb-trade-idp-feedback_V1")
train_data = ds["train"]
eval_data = ds.get("validation")
# 2. Load model & attach vision LoRA adapters
model, tokenizer = FastVisionModel.from_pretrained(
"unsloth/Qwen3-VL-Max-Instruct",
load_in_4bit=True,
max_seq_length=2048,
)
model = FastVisionModel.get_peft_model(
model,
finetune_vision_layers=True,
finetune_language_layers=True,
finetune_attention_modules=True,
finetune_mlp_modules=True,
r=16,
lora_alpha=16,
lora_dropout=0.05,
)
FastVisionModel.for_training(model)
# 3. Train with SFTTrainer
trainer = SFTTrainer(
model=model,
tokenizer=tokenizer,
data_collator=UnslothVisionDataCollator(model, tokenizer),
train_dataset=train_data,
eval_dataset=eval_data,
args=SFTConfig(
per_device_train_batch_size=2,
gradient_accumulation_steps=4,
learning_rate=1e-4,
num_train_epochs=3,
optim="adamw_8bit",
output_dir="./lora_checkpoints",
),
)
trainer.train()
```
---
## πŸ“¦ Standalone Artifacts in this Repository
- **`images/`**: Content-addressed directory containing every verified document page image (LFS deduplicated).
- **`images_backup.tar.gz`**: Standalone compressed archive of all page images for raw PyTorch / non-parquet workflows.
- **`feedback.jsonl`**: Exact raw JSONL feedback log with per-record `batch_id` and `synced_at` watermarks.
- **`schemas_bundle.json`**: Official Bangladesh Bank JSON schemas, field definitions, and XML templates.
- **`trade_ontology.json`**: Concept synonym mappings and bilingual hints.
- **`training_config.json`**: Recommended hyperparameters, target modules, and runtime compatibility settings.