All models

layoutlm

A document model that reads text together with where it sits on the page.

Documents and OCR · 420 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (19 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
layoutlm
Parameters
113.3M
Operations
420
Framework
PyTorch
Recurrent
No
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m5542
Graph hash
b89e46e54b2bbd7ae30e5024138c57e86ee2446f89ef52a0b4bd7f23f1f7ca1e
Skeleton hash
c387bf860990aa5b9c7ea346fe763396b293bd6d3a27936974e0f3079c40aacb
Architecture hash
569a5192a03729034fed896ecaffb0561beea5cc4770f979624a8cf5f54da39e
Diagram SHA-256
7d9265bd5b61af5eab5390139d9a23d2d93e2d4489e2bb7008614a8b0236473d
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForMaskedLM.from_config()

What it is

This model is LayoutLMForMaskedLM, the masked language modeling form of LayoutLM.

About this model's family

LayoutLM is a model for documents that learns the text and the layout of the page together, not the text alone. It incorporates positional layout information and visual features of words from the document images.

LayoutLM does not read a page image by itself: it expects words and their bounding boxes from an external OCR engine. Each bounding box is given in the format (x0, y0, x1, y1), the upper left and lower right corners. The boxes are normalized on a 0-1000 scale.

Key idea. LayoutLM jointly learns text and document layout, incorporating positional layout information and visual features of words from the document images.

  • LayoutLM
  • MarkupLM
  • document understanding
  • document layout
  • text and layout
  • bounding boxes
  • OCR
  • document question answering

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.