Downloads · 30 days
4
19% of all-time downloads
TLDRKKU/merge-3way-0.34-0.33-0.33
merge-3way-0.34-0.33-0.33 is a image-text-to-text model from TLDRKKU. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as cc-by-nc-4.0.
Not a trained model. This is a PEFT addweightedadapter merge of already-published LoRA adapters: e1 0.34 + e2 0.33 + e5 0.33 (experiment e70.34-0.33-0.33 of THIRA — Thai Handwriting Intelligence Recognition & Analysis).
Downloads · 30 days
4
19% of all-time downloads
All-time downloads
21
Public
Repo size
190 MB
Likes
0
Public
Click a slice to open those files.
.safetensors190 MB · 96%
From the Hugging Face model README
Not a trained model. This is a PEFT add_weighted_adapter merge of already-published
LoRA adapters: e1 0.34 + e2 0.33 + e5 0.33 (experiment e7_0.34-0.33-0.33 of THIRA — Thai Handwriting Intelligence
Recognition & Analysis).
It is published so the merge experiment is reproducible. It is superseded by
TLDRKKU/burapha-HMk100 and should not be deployed — see Findings.
Qwen/Qwen2.5-VL-7B-Instruct, revision cc594898137f460bfe9f0759e9844b3ce807cfb5e1 0.34 + e2 0.33 + e5 0.33, via PEFT add_weighted_adapter| Test set | N | CER | char F1 | Exact match |
|---|---|---|---|---|
| burapha (Thai characters) | 13,600 | 0.1093 | 0.8909 | 89.09% |
| hme (handwritten maths) | 24,607 | 0.3687 | 0.7925 | 22.55% |
| thai_sentence (Thai prose) | 2,032 | 0.3043 | 0.8145 | 8.86% |
| combined | 40,239 | 0.3596 | 0.7957 | 44.35% |
Weight-space merging was tried as a cheaper alternative to joint training. It does not
work. Every ratio trades one skill against the other, and none reaches e3, which was
trained on both datasets together:
| configuration | burapha CER | hme CER | thai_sentence CER |
|---|---|---|---|
e4 merge 0.7–0.3 | 0.0480 | 0.1134 | 0.4386 |
e4 merge 0.5–0.5 | 0.1215 | 0.0592 | 0.4133 |
e4 merge 0.3–0.7 | 0.5144 | 0.0483 | 0.4797 |
e7 3-way 0.34/0.33/0.33 | 0.1093 | 0.3687 | 0.3043 |
e7 3-way 0.25/0.25/0.5 | 0.1710 | 0.4429 | 0.2326 |
e3 joint training | 0.0400 | 0.0421 | 0.6753 |
single-dataset e1 / e2 | 0.0388 / 3.1985 | 0.4324 / 0.0425 | 0.5041 / 1.3775 |
Use TLDRKKU/burapha-HMk100 (e3) instead. This repository exists so the merge
experiment is reproducible and the negative result is documented, not because the model
should be deployed.
One honest caveat: the three-way merges are the best of these on Thai sentences
(e7 0.25/0.25/0.5 reaches 0.2326, against e3's 0.6753) — but at 8–10× the maths
error, which is not a trade the THIRA pipeline can accept. For Thai prose, use
TLDRKKU/thai-sentence (e5, CER 0.1049) instead of any merge.
import torch
from peft import PeftModel
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
base = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"Qwen/Qwen2.5-VL-7B-Instruct",
revision="cc594898137f460bfe9f0759e9844b3ce807cfb5",
torch_dtype=torch.bfloat16,
)
model = PeftModel.from_pretrained(base, "TLDRKKU/merge-3way-0.34-0.33-0.33")
TLDRKKU/burapha — BURAPHA-only Thai character LoRA (e1)TLDRKKU/HMk100 — HME100K-only maths LoRA (e2)TLDRKKU/burapha-HMk100 — joint adapter (e3), the selected maths recogniserTLDRKKU/thai-sentence — Thai sentence LoRA (e5), the selected Thai recogniserPart of THIRA — Thai Handwriting Intelligence Recognition & Analysis.