Instructions to use google/pix2struct-docvqa-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/pix2struct-docvqa-base with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "visual-question-answering" 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("visual-question-answering", model="google/pix2struct-docvqa-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/pix2struct-docvqa-base") model = AutoModelForMultimodalLM.from_pretrained("google/pix2struct-docvqa-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Delete onnx
a30ca1c -
Adding ONNX file of this model
Beep boop I am the [ONNX export bot 🤖🏎️](https://huggingface.co/spaces/onnx/export). On behalf of [Akshat007](https://huggingface.co/Akshat007), I would like to add to this repository the model converted to ONNX. What is ONNX? It stands for "Open Neural Network Exchange", and is the most commonly used open standard for machine learning interoperability. You can find out more at [onnx.ai](https://onnx.ai/)! The exported ONNX model can be then be consumed by various backends as TensorRT or TVM, or simply be used in a few lines with 🤗 Optimum through ONNX Runtime, check out how [here](https://huggingface.co/docs/optimum/main/en/onnxruntime/usage_guides/models)!5fe00de
-
Update README.md
4dde85b
-
Update config.json
bbead99
-
Update config.json
fb6a1ee
-
Create README.md
f3b2cd6 -
Upload processor
87ef4ff -
Upload Pix2StructForConditionalGeneration
49ed5ec -
initial commit
Younes Belkada5b600e3