Instructions to use acceler-technology/prod-lhdn-parse-donut-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use acceler-technology/prod-lhdn-parse-donut-model with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("image-to-text", model="acceler-technology/prod-lhdn-parse-donut-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("acceler-technology/prod-lhdn-parse-donut-model") model = AutoModelForMultimodalLM.from_pretrained("acceler-technology/prod-lhdn-parse-donut-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
LHDN Document Parser · Donut · Production Snapshot
A production snapshot of the acceler-technology team's Donut-based LHDN document parser. It preserves a released set of model weights and processing files separately from the development repository.
中文简介: 团队 Donut 文档图片解析模型的生产快照,保存一套独立于开发仓库的模型与处理配置。
Purpose and model details
The model maps document page images to generated text representations. Its Donut Swin encoder reads the image, and its mBART decoder generates the output sequence. PDF pages need to be rendered as images before processing.
| Item | Value |
|---|---|
| Role | Production snapshot |
| Architecture | VisionEncoderDecoderModel |
| Encoder / decoder | Donut Swin / mBART |
| Recorded source | acceler-technology/dev-lhdn-parse-donut-model |
| Encoder image-size setting | [1200, 2400] |
| Saved Transformers version | 4.48.2 |
Source: config.json. Use this repository's processor and weights together. Its prod name identifies a release snapshot; it does not establish a current live deployment.
Load the model
Install torch, transformers, sentencepiece, and pillow first.
from transformers import DonutProcessor, VisionEncoderDecoderModel
model_id = "acceler-technology/prod-lhdn-parse-donut-model"
processor = DonutProcessor.from_pretrained(model_id)
model = VisionEncoderDecoderModel.from_pretrained(model_id)
model.eval()
This is a loading example. Use the task prompt, preprocessing, and decoding from the matching training setup before attempting inference.
Project and limitations
Related project data is held in lhdn-dataset, which remains private. The exact training subset, full recipe, and quantitative evaluation results are not documented here.
Generated fields can be missing or incorrect, especially on unfamiliar layouts or poor scans. Check the format and values against the source document. The model does not determine tax or legal outcomes.
Team and links
Developed within acceler-technology. Henry (HenryTeo27) led this project area, executed the data work, and participated in model training and technical discussions. kwyong handled model uploads.
Project showcase · Development Donut model
A license has not been specified for this checkpoint. Public visibility alone does not grant unrestricted reuse rights.
- Downloads last month
- 5