Image-Text-to-Text
Transformers
TensorBoard
Safetensors
pix2struct
Generated from Trainer
invoice-processing
information-extraction
czech-language
document-ai
multimodal-model
generative-model
synthetic-data
layout-augmentation
Instructions to use TomasFAV/Pix2StructCzechInvoiceV01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TomasFAV/Pix2StructCzechInvoiceV01 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="TomasFAV/Pix2StructCzechInvoiceV01")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("TomasFAV/Pix2StructCzechInvoiceV01") model = AutoModelForImageTextToText.from_pretrained("TomasFAV/Pix2StructCzechInvoiceV01") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TomasFAV/Pix2StructCzechInvoiceV01 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TomasFAV/Pix2StructCzechInvoiceV01" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TomasFAV/Pix2StructCzechInvoiceV01", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TomasFAV/Pix2StructCzechInvoiceV01
- SGLang
How to use TomasFAV/Pix2StructCzechInvoiceV01 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TomasFAV/Pix2StructCzechInvoiceV01" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TomasFAV/Pix2StructCzechInvoiceV01", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TomasFAV/Pix2StructCzechInvoiceV01" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TomasFAV/Pix2StructCzechInvoiceV01", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TomasFAV/Pix2StructCzechInvoiceV01 with Docker Model Runner:
docker model run hf.co/TomasFAV/Pix2StructCzechInvoiceV01
Model save
Browse files
README.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: TomasFAV/Pix2StructCzechInvoice
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- f1
|
| 9 |
+
model-index:
|
| 10 |
+
- name: Pix2StructCzechInvoiceV1
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
+
|
| 17 |
+
# Pix2StructCzechInvoiceV1
|
| 18 |
+
|
| 19 |
+
This model is a fine-tuned version of [TomasFAV/Pix2StructCzechInvoice](https://huggingface.co/TomasFAV/Pix2StructCzechInvoice) on an unknown dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 0.4679
|
| 22 |
+
- F1: 0.6432
|
| 23 |
+
|
| 24 |
+
## Model description
|
| 25 |
+
|
| 26 |
+
More information needed
|
| 27 |
+
|
| 28 |
+
## Intended uses & limitations
|
| 29 |
+
|
| 30 |
+
More information needed
|
| 31 |
+
|
| 32 |
+
## Training and evaluation data
|
| 33 |
+
|
| 34 |
+
More information needed
|
| 35 |
+
|
| 36 |
+
## Training procedure
|
| 37 |
+
|
| 38 |
+
### Training hyperparameters
|
| 39 |
+
|
| 40 |
+
The following hyperparameters were used during training:
|
| 41 |
+
- learning_rate: 0.0001
|
| 42 |
+
- train_batch_size: 8
|
| 43 |
+
- eval_batch_size: 1
|
| 44 |
+
- seed: 42
|
| 45 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 46 |
+
- lr_scheduler_type: cosine_with_restarts
|
| 47 |
+
- lr_scheduler_warmup_steps: 0.1
|
| 48 |
+
- num_epochs: 10
|
| 49 |
+
- mixed_precision_training: Native AMP
|
| 50 |
+
|
| 51 |
+
### Training results
|
| 52 |
+
|
| 53 |
+
| Training Loss | Epoch | Step | Validation Loss | F1 |
|
| 54 |
+
|:-------------:|:-----:|:----:|:---------------:|:------:|
|
| 55 |
+
| 0.1978 | 1.0 | 75 | 0.3757 | 0.5804 |
|
| 56 |
+
| 0.1031 | 2.0 | 150 | 0.3578 | 0.6399 |
|
| 57 |
+
| 0.0725 | 3.0 | 225 | 0.3504 | 0.6318 |
|
| 58 |
+
| 0.0512 | 4.0 | 300 | 0.3929 | 0.6396 |
|
| 59 |
+
| 0.0500 | 5.0 | 375 | 0.4072 | 0.6394 |
|
| 60 |
+
| 0.0462 | 6.0 | 450 | 0.4655 | 0.4377 |
|
| 61 |
+
| 0.0502 | 7.0 | 525 | 0.6320 | 0.3384 |
|
| 62 |
+
| 0.0528 | 8.0 | 600 | 0.4835 | 0.5018 |
|
| 63 |
+
| 0.0393 | 9.0 | 675 | 0.4679 | 0.6432 |
|
| 64 |
+
| 0.0392 | 10.0 | 750 | 0.5330 | 0.4931 |
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
### Framework versions
|
| 68 |
+
|
| 69 |
+
- Transformers 5.0.0
|
| 70 |
+
- Pytorch 2.10.0+cu128
|
| 71 |
+
- Datasets 4.0.0
|
| 72 |
+
- Tokenizers 0.22.2
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1130333048
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00afcfbc5ea5bf088a7e1304ab44027b8ec3b6f831c06cf51d3930c9a7015307
|
| 3 |
size 1130333048
|
runs/Mar14_23-53-02_77b291cf41b2/events.out.tfevents.1773534537.77b291cf41b2.903.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37aa2724b2be2089dd9468656452b1fabb68b7da7c33e70ff22e67cf08b5a5d4
|
| 3 |
+
size 405
|