alt.freeweights.vision / pix2struct-base
From: google <huggingface.co/google>Newsgroups: alt.freeweights.visionSubject:

pix2struct-base

Date: 2026-11-14Commit: 4605659Signed: 2DC28CC7B26A283B ✓

Image to text model with 282M parameters. Safetensors weights, 2.26 GB in all. Published by google under Apache-2.0.

282M params2.26GBpix2struct-basesafetensorspermissive
FactsParams282MSize2.26 GBFormatssafetensorsTaskimage to textLicenseApache-2.0From sourcepermissive
$ fw get google/pix2struct-base
# manifest sha256 fa8ef9001c51… · 2.26 GB · 10 files
$ fw verify ./pix2struct-base google/pix2struct-base
From sourceHosted (signed)google/pix2struct-baseLast check: 2026-11-14 21:36 UTC

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

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
2.26 GB
Weights
1.13 GB (safetensors)
Parameters
282M
Formats
safetensors
Task
image to text
License
Apache-2.0 (permissive)
Files
10, each with a sha256
Publisher
google
Added
2026-11-14
Section
alt.freeweights.vision
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-14 21:36 UTCpassed

Model card

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

Model card for Pix2Struct - Pretrained weights#

Image: model_image

This model is the pretrained version of Pix2Struct, use this model for fine-tuning purposes only.

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")

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.32 KB4250a18c9308f7bb6a1734dc60537e2711e8589b46fe807bfa57b212cbb2a25e
config.json4.92 KBa898fc9fd9b376fcaabe142606b69d22671f7641493626784779ca6d1d5769e5
model.safetensors1.13 GB5dfcab2c597394493415577710adc2fcd3be19324a70d2be7972f2f655a12a37
preprocessor_config.json231 B0f828a7f1a002e7184b9ca78f75f24e5eb0efd0028a85deadd408be6b692c430
pytorch_model.bin1.13 GB9309d0f92cbfd28c13a38cbbea117dd2263a426e713b2559b192974566e34f28
special_tokens_map.json2.20 KB5c87151ef0f72a99d1f766a4c418bd2a1f90aaa30a8e22fe5eca9641daebb64f
spiece.model851 KB7fd650335add59bed55a432186ca0437a09e185c2d241faab468a538fe6bcf94
tokenizer.json3.27 MB0af109b23840545ef2c286073f4373959badba1faa73c8557881d5126f6287c9
tokenizer_config.json2.61 KB500b11b6ff82982e3b127176495e6e1b54a34e7622dc441c5862f3a32b6d8deb
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
4605659ec5 pinned now manifest updated, same commit2026-11-14 21:36 UTC10 files · 2.26 GB
4605659ec52026-11-14 21:36 UTC10 files · 2.26 GB

Use it

$ fw get google/pix2struct-base
# manifest sha256 fa8ef9001c51… · 2.26 GB · 10 files
$ fw verify ./pix2struct-base google/pix2struct-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-base.json --dir ./pix2struct-base $ python3 fw.py verify ./pix2struct-base ./google__pix2struct-base.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download google/pix2struct-base --revision 4605659ec5d82c985955ebdea8210f32fe54a682 --local-dir ./pix2struct-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-14
Text in
README.md
Text sha256
4250a18c9308f7bb6a1734dc60537e2711e8589b46fe807bfa57b212cbb2a25e
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.visionSubject: pix2struct-baseDate: 2026-11-14Commit: 4605659Signed: 2DC28CC7B26A283B ✓
Upstream
google/pix2struct-base
Pinned commit
4605659ec5d82c985955ebdea8210f32fe54a682
Manifest
pix2struct-base.json · .minisig
Manifest sha256
fa8ef9001c51a449a26c5a62f5a936195e4e9a11ed3f5d4f6b96ace45ce66d7d
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:36 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/google/pix2struct-base.json $ curl -O https://freeweights.allternit.com/manifests/google/pix2struct-base.json.minisig $ minisign -Vm pix2struct-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-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-base.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX