mBART Vietnamese OCR Adaptation
This model is a fine-tuned mBART baseline for Vietnamese text correction/OCR adaptation. It maps corrupted Vietnamese text to corrected Vietnamese text.
Usage
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
repo_id = "khangdoan/mbart-vi-ocr-adaptation"
tokenizer = AutoTokenizer.from_pretrained(repo_id, src_lang="vi_VN", tgt_lang="vi_VN")
model = AutoModelForSeq2SeqLM.from_pretrained(repo_id)
text = "Toi dang hoc xu ly ngon ngu tu nhien."
inputs = tokenizer(text, return_tensors="pt")
generated = model.generate(**inputs, max_length=256, num_beams=4)
print(tokenizer.decode(generated[0], skip_special_tokens=True))
Training
The model was fine-tuned from facebook/mbart-large-cc25 for Vietnamese
sequence-to-sequence correction.
Files
This repository contains inference files only:
model.safetensorsconfig.jsongeneration_config.jsontokenizer.jsontokenizer_config.json
Optimizer state and trainer checkpoints are not included.
- Downloads last month
- 1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for khangdoan/mbart-vi-ocr-adaptation
Base model
facebook/mbart-large-cc25