Image-to-Text
Transformers
Safetensors
vision-encoder-decoder
image-text-to-text
donut
document-parsing
lhdn
ebc
Instructions to use acceler-technology/dev-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/dev-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/dev-lhdn-parse-donut-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("acceler-technology/dev-lhdn-parse-donut-model") model = AutoModelForMultimodalLM.from_pretrained("acceler-technology/dev-lhdn-parse-donut-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from acceler-technology/dev-lhdn-parse-donut-model: direct link, hf CLI and curl.
- Browser
- Download file 2.97 kB
-
https://huggingface.co/acceler-technology/dev-lhdn-parse-donut-model/resolve/main/README.md
- Command line
-
hf download hf://acceler-technology/dev-lhdn-parse-donut-model/README.md
-
curl -L -o README.md https://huggingface.co/acceler-technology/dev-lhdn-parse-donut-model/resolve/main/README.md
2.97 kB
| library_name: transformers | |
| pipeline_tag: image-to-text | |
| base_model: naver-clova-ix/donut-base | |
| tags: | |
| - donut | |
| - document-parsing | |
| - lhdn | |
| - ebc | |
| # LHDN Document Parser · Donut · Development | |
| A Donut-based document-image parser for the acceler-technology team's LHDN document-processing project. This repository holds the development checkpoint for the team's model training and iteration work. | |
| **中文简介:** 团队用于 LHDN 文档图片解析的 Donut 开发模型,探索从页面图片生成文档内容的文本表示。 | |
| ## Purpose and model details | |
| Donut combines a visual encoder with a text decoder. It reads a document image and generates an output sequence without requiring a separate OCR model in the Donut architecture. PDF pages must first be rendered as images. | |
| | Item | Value | | |
| | --- | --- | | |
| | Role | Development checkpoint | | |
| | Architecture | `VisionEncoderDecoderModel` | | |
| | Encoder / decoder | Donut Swin / mBART | | |
| | Recorded base | `naver-clova-ix/donut-base` | | |
| | Encoder image-size setting | `[1800, 1350]` | | |
| | Saved Transformers version | 4.47.0 | | |
| Source: [config.json](https://huggingface.co/acceler-technology/dev-lhdn-parse-donut-model/blob/main/config.json). Development and production snapshots have different image-size settings. Use this repository's processor alongside its weights. | |
| ## Load the model | |
| Install `torch`, `transformers`, `sentencepiece`, and `pillow` first. | |
| ```python | |
| from transformers import DonutProcessor, VisionEncoderDecoderModel | |
| model_id = "acceler-technology/dev-lhdn-parse-donut-model" | |
| processor = DonutProcessor.from_pretrained(model_id) | |
| model = VisionEncoderDecoderModel.from_pretrained(model_id) | |
| model.eval() | |
| ``` | |
| This is a loading example. The task prompt, image preparation, and output decoding must match the training setup. It is not a validated extraction demo. | |
| ## Project and limitations | |
| Related project data is held in [lhdn-dataset](https://huggingface.co/datasets/acceler-technology/lhdn-dataset), which remains private. The model history records training iterations. The exact training subset, full recipe, and quantitative evaluation results are not documented here. | |
| Poor scans and unfamiliar layouts can affect generated output. Check extracted values against the source document before use. The model does not determine tax or legal outcomes. | |
| ## Team and links | |
| Developed within [acceler-technology](https://huggingface.co/acceler-technology). Henry ([HenryTeo27](https://huggingface.co/HenryTeo27)) led this project area, executed the data work, and participated in model training and technical discussions. [kwyong](https://huggingface.co/kwyong) handled model uploads. | |
| [Project showcase](https://github.com/HenryTeo27/EBC-HuggingFace-Showcase) · [Production Donut snapshot](https://huggingface.co/acceler-technology/prod-lhdn-parse-donut-model) | |
| A license has not been specified for this checkpoint. Check the checkpoint's and upstream model's terms before reuse. | |