alt.freeweights.text / pix2struct-docvqa-base
From: google <huggingface.co/google>Newsgroups: alt.freeweights.textSubject:

pix2struct-docvqa-base

Date: 2026-11-15Commit: 63f6b3dSigned: 2DC28CC7B26A283B ✓

Visual question answering model with 282M parameters. Safetensors weights, 2.26 GB in all. Published by google under Apache-2.0.

282M params2.26GBpix2struct-docvqa-basesafetensorspermissive
FactsParams282MSize2.26 GBFormatssafetensorsTaskvisual question answeringLicenseApache-2.0From sourcepermissive
$ fw get google/pix2struct-docvqa-base
# manifest sha256 4facc05336e4… · 2.26 GB · 10 files
$ fw verify ./pix2struct-docvqa-base google/pix2struct-docvqa-base
From sourceHosted (signed)google/pix2struct-docvqa-baseLast check: 2026-11-15 03:24 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Overview

Size
2.26 GB
Weights
1.13 GB (safetensors)
Parameters
282M
Formats
safetensors
Task
visual question answering
License
Apache-2.0 (permissive)
Files
10, each with a sha256
Publisher
google
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:24 UTCpassed

Model card

From the publisher at commit 63f6b3d. Shown as plain text with links; images open at the publisher.

Model card for Pix2Struct - Finetuned on Doc-VQA (Visual Question Answering over scanned documents)#

Image: model_image

Table of Contents#

  1. TL;DR
  2. Using the model
  3. Contribution
  4. Citation

TL;DR#

Pix2Struct is an image encoder - text decoder model that is trained on image-text pairs for various tasks, including image captionning and visual question answering. The full list of available models can be found on the Table 1 of the paper:

Image: Table 1 - paper

The abstract of the model states that:

Visually-situated language is ubiquitous—sources range from textbooks with diagrams to web pages with images and tables, to mobile apps with buttons and

forms. Perhaps due to this diversity, previous work has typically relied on domainspecific recipes with limited sharing of the underlying data, model architectures, and objectives. We present Pix2Struct, a pretrained image-to-text model for purely visual language understanding, which can be finetuned on tasks containing visually-situated language. Pix2Struct is pretrained by learning to parse masked screenshots of web pages into simplified HTML. The web, with its richness of visual elements cleanly reflected in the HTML structure, provides a large source of pretraining data well suited to the diversity of downstream tasks. Intuitively, this objective subsumes common pretraining signals such as OCR, language modeling, image captioning. In addition to the novel pretraining strategy, we introduce a variable-resolution input representation and a more flexible integration of language and vision inputs, where language prompts such as questions are rendered directly on top of the input image. For the first time, we show that a single pretrained model can achieve state-of-the-art results in six out of nine tasks across four domains: documents, illustrations, user interfaces, and natural images.

Using the model#

Converting from T5x to huggingface#

You can use the convert_pix2struct_checkpoint_to_pytorch.py script as follows:

python convert_pix2struct_checkpoint_to_pytorch.py --t5x_checkpoint_path PATH_TO_T5X_CHECKPOINTS --pytorch_dump_path PATH_TO_SAVE

if you are converting a large model, run:

python convert_pix2struct_checkpoint_to_pytorch.py --t5x_checkpoint_path PATH_TO_T5X_CHECKPOINTS --pytorch_dump_path PATH_TO_SAVE --use-large

Once saved, you can push your converted model with the following snippet:

from transformers import Pix2StructForConditionalGeneration, Pix2StructProcessor

model = Pix2StructForConditionalGeneration.from_pretrained(PATH_TO_SAVE)
processor = Pix2StructProcessor.from_pretrained(PATH_TO_SAVE)

model.push_to_hub("USERNAME/MODEL_NAME")
processor.push_to_hub("USERNAME/MODEL_NAME")

Running the model#

The instructions for running this model are totally similar to the instructions stated on pix2struct-aid-base model.

Contribution#

This model was originally contributed by Kenton Lee, Mandar Joshi et al. and added to the Hugging Face ecosystem by Younes Belkada.

Citation#

If you want to cite this work, please consider citing the original paper:

@misc{https://doi.org/10.48550/arxiv.2210.03347,
  doi = {10.48550/ARXIV.2210.03347},
  
  url = {https://arxiv.org/abs/2210.03347},
  
  author = {Lee, Kenton and Joshi, Mandar and Turc, Iulia and Hu, Hexiang and Liu, Fangyu and Eisenschlos, Julian and Khandelwal, Urvashi and Shaw, Peter and Chang, Ming-Wei and Toutanova, Kristina},
  
  keywords = {Computation and Language (cs.CL), Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences},
  
  title = {Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding},
  
  publisher = {arXiv},
  
  year = {2022},
  
  copyright = {Creative Commons Attribution 4.0 International}
}

Files

10 files · 2.26 GBWeights 1.13 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 10 files with their sha256
FileSizesha256
.gitattributes1.48 KBdb7c0371f46f0840b8f25794c1e3321c9b5820a8cb6ba9694a46fc64b8fae5a6
README.md4.48 KB794175546e80948e4efef30e95ebe859fdd26d07bcda26f738a1c97feb1e912a
config.json4.89 KB8d39973772a4218b555e30daecabdd5ea11aa1345dd711ff7f88fa90750b464f
model.safetensors1.13 GB067f7f314d87fa56daa5bcfaf36fa0b33ceebf7b7d4fae6a1e51ab7af64ee0b5
preprocessor_config.json249 Bc84e4eebc84171d6069533d9f0147ec7b4afd02ab78697cb5c30f9419ef7dc45
pytorch_model.bin1.13 GBc6aef999794a0e19fa3e1e0892a921433bcf1ea8133530afbd8f47d311c9b528
special_tokens_map.json2.20 KB5c87151ef0f72a99d1f766a4c418bd2a1f90aaa30a8e22fe5eca9641daebb64f
spiece.model851 KB7fd650335add59bed55a432186ca0437a09e185c2d241faab468a538fe6bcf94
tokenizer.json3.27 MB0af109b23840545ef2c286073f4373959badba1faa73c8557881d5126f6287c9
tokenizer_config.json2.58 KB5fdb6767a49aca48fdfa43d0279321918185fc4997bdb3ea72bf3a6301a1b43d
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
63f6b3de43 pinned now2026-11-15 03:24 UTC10 files · 2.26 GB

Use it

$ fw get google/pix2struct-docvqa-base
# manifest sha256 4facc05336e4… · 2.26 GB · 10 files
$ fw verify ./pix2struct-docvqa-base google/pix2struct-docvqa-base
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/google/pix2struct-docvqa-base.json --dir ./pix2struct-docvqa-base $ python3 fw.py verify ./pix2struct-docvqa-base ./google__pix2struct-docvqa-base.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/pix2struct-docvqa-base --revision 63f6b3de436e39f75c7a486881a9c2c14a7f4e89 --local-dir ./pix2struct-docvqa-base

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
794175546e80948e4efef30e95ebe859fdd26d07bcda26f738a1c97feb1e912a
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: google <huggingface.co/google>Newsgroups: alt.freeweights.textSubject: pix2struct-docvqa-baseDate: 2026-11-15Commit: 63f6b3dSigned: 2DC28CC7B26A283B ✓
Upstream
google/pix2struct-docvqa-base
Pinned commit
63f6b3de436e39f75c7a486881a9c2c14a7f4e89
Manifest
pix2struct-docvqa-base.json · .minisig
Manifest sha256
4facc05336e48743a8ba53f7f09ed08aef60a9d7dd1fa9b33847e1e42545d23c
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:24 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/google/pix2struct-docvqa-base.json $ curl -O https://freeweights.allternit.com/manifests/google/pix2struct-docvqa-base.json.minisig $ minisign -Vm pix2struct-docvqa-base.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/pix2struct-docvqa-base
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. pix2struct-docvqa-base.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B