Run this model with HF Jobs
Run TLDRKKU/burapha on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/TLDRKKU/burapha. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/TLDRKKU/burapha on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/TLDRKKU/burapha. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/TLDRKKU/burapha. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use TLDRKKU/burapha with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TLDRKKU/burapha with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct") model = PeftModel.from_pretrained(base_model, "TLDRKKU/burapha") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files34 unmodified lines3536373839404142434445464748497 unmodified lines57585960616263642 unmodified lines67686934 unmodified lines## EvaluationFrom the project's internal eval harness (`runs/e1`, see `results.json` in this repo for full detail):| Test set | N | CER | Exact match ||---|---:|---:|---:|| burapha (in-domain) | 13,600 | 0.0388 | 96.12% || hme (out-of-domain) | 24,607 | 0.4336 | 12.47% || combined | 38,207 | 0.4290 | 42.24% |As expected for a single-dataset adapter, this model is strong on BURAPHA and poor on handwritten math (HME100K). See the sibling `HMk100` repo for the HME-specialized adapter (experiment `e2`), or the project's `e3` run for an adapter trained on both datasets jointly.## How to Use7 unmodified linesrevision="cc594898137f460bfe9f0759e9844b3ce807cfb5",torch_dtype=torch.bfloat16,)model = PeftModel.from_pretrained(base, "ptnonsen/burapha")processor = AutoProcessor.from_pretrained("ptnonsen/burapha")```## Training Procedure2 unmodified lines- Effective batch size 32 (per-device 8 Γ grad accumulation 4)- bf16, gradient checkpointing enabled- Framework: PEFT 0.20.034 unmodified lines353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394957 unmodified lines1031041051061071081091102 unmodified lines11311411511611711811912034 unmodified lines## EvaluationFrom the project's internal eval harness (`runs/e1`, see `results.json` in this repo for full detail).| Test set | N | CER | char F1 | Exact match ||---|---:|---:|---:|---:|| burapha (in-domain) | 13,600 | **0.0388** | 0.9612 | 96.12% || hme (out-of-domain math) | 24,607 | 0.4324 | 0.7490 | 12.47% || thai_sentence (out-of-domain prose) | 2,032 | 0.5041 | 0.6856 | 1.87% || combined | 38,207 | 0.4277 | 0.7516 | 42.24% |## FindingsEverything below is measured, from the runs recorded in this project. It is reported herebecause a model card that only shows the in-domain number is misleading.**1. It learned Thai *glyphs*, not Thai *text*.** 96.12% exact match on isolated BURAPHAcharacters collapses to 1.87% on connected Thai sentences (CER 0.504). BURAPHA is acharacter dataset; nothing in this adapter's training teaches word or sentence structure.Do not deploy it on Thai prose β use a sentence-trained adapter for that.**2. It is unusable on handwritten mathematics** (CER 0.432, 12.47% exact). Expected for asingle-dataset adapter, and the reason the project trained the joint `e3`.**3. Joint training dominates it.** `e3`, trained on BURAPHA + HME100K together, scores0.0400 on BURAPHA β statistically indistinguishable from this adapter's 0.0388 β while alsoscoring 0.0421 on maths, where this adapter scores 0.4324. There is no measured task onwhich `e1` beats `e3` by a meaningful margin. **`e1` is superseded by `e3`.****4. Weight-space merging does not recover this adapter's Thai skill.** Merging `e1` withthe math adapter `e2` at several ratios was tried and all of it was worse than jointtraining:| merge (e1βe2 weight) | burapha CER | hme CER | thai_sentence CER ||---|---:|---:|---:|| 0.7 β 0.3 | 0.0480 | 0.1134 | 0.4386 || 0.5 β 0.5 | 0.1215 | 0.0592 | 0.4133 || 0.3 β 0.7 | 0.5144 | 0.0483 | 0.4797 || **`e3` (joint training)** | **0.0400** | **0.0421** | 0.6753 |Every merge ratio trades one skill for the other; joint training gets both. A three-waymerge (`e7`) was also tried and lands at burapha 0.109β0.171 and hme 0.369β0.443 β worsethan `e3` on both. **Do not merge these adapters; retrain jointly instead.****5. Not selected for the production pipeline.** The Learnly MVP uses a routed two-adapterconfiguration β a sentence-trained Thai adapter for Thai-script regions, `e3` for symbolicand mathematical regions. `e1` is retained as the single-dataset baseline that establishesthe BURAPHA ceiling, not as a deployed component.### How to read the CER numbersCER here is corpus-level (total Levenshtein edits Γ· total reference characters) computedafter a normalisation pass that strips outer math delimiters and applies `latex_normalize`.That normalisation collapses *runs* of whitespace but keeps single spaces, which is fine forthis adapter but **not** comparable across decoders that emit space-separated tokens β seethe note in the `e3` card. Character precision/recall/F1 are an order-agnosticbag-of-characters overlap, not an alignment.## How to Use7 unmodified linesrevision="cc594898137f460bfe9f0759e9844b3ce807cfb5",torch_dtype=torch.bfloat16,)model = PeftModel.from_pretrained(base, "TLDRKKU/burapha")processor = AutoProcessor.from_pretrained("TLDRKKU/burapha")```## Training Procedure2 unmodified lines- Effective batch size 32 (per-device 8 Γ grad accumulation 4)- bf16, gradient checkpointing enabled- Framework: PEFT 0.20.0## Related- `TLDRKKU/HMk100` β HME100K-only adapter (`e2`)- `TLDRKKU/burapha-HMk100` β joint adapter (`e3`), the one to prefer
README.md+59-8