File size: 2,967 Bytes
e133218
 
189fe2b
 
 
 
 
 
 
e133218
 
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
 
 
 
 
 
 
 
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
 
e133218
189fe2b
 
 
 
 
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
e133218
189fe2b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
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.