Instructions to use qhfmshal/TRPaliGemma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qhfmshal/TRPaliGemma with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="qhfmshal/TRPaliGemma")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("qhfmshal/TRPaliGemma") model = AutoModelForImageTextToText.from_pretrained("qhfmshal/TRPaliGemma") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use qhfmshal/TRPaliGemma with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qhfmshal/TRPaliGemma" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qhfmshal/TRPaliGemma", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/qhfmshal/TRPaliGemma
- SGLang
How to use qhfmshal/TRPaliGemma 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 "qhfmshal/TRPaliGemma" \ --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": "qhfmshal/TRPaliGemma", "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 "qhfmshal/TRPaliGemma" \ --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": "qhfmshal/TRPaliGemma", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use qhfmshal/TRPaliGemma with Docker Model Runner:
docker model run hf.co/qhfmshal/TRPaliGemma
Model Card for TRPaliGemma
This model is fine-tuned PaliGemma model for the Table recognition task.
Model Details
Model Description
Table recognition is a branch of Document AI. In the existing Table recognition, the structure of the table and the OCR results were calculated and combined, respectively. For this reason, unnecessary predictions are sometimes made in the process of parsing the table.(ex. bbox) Using VLM, the structure and text of the table will be predicted at the same time, eliminating unnecessary predictions and integrating the two tasks into one.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: Seokhyun Choi
- Funded by [optional]: [More Information Needed]
- Shared by [optional]: [More Information Needed]
- Model type: Vision Language Model
- Language(s) (NLP): English
- License: [More Information Needed]
- Finetuned from model [optional]: PaliGemma
Model Sources [optional]
- Repository: [More Information Needed]
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Uses
Direct Use
This model can convert a tabular images into HTML.
Downstream Use [optional]
It can be used in document automation systems using Document AI.
Out-of-Scope Use
This is a fine-tuned model with only the tabular images that exist within the PDF, so you won't get good performance in the tabular images in the wild.
Bias, Risks, and Limitations
This model simply converts table images into HTML. To gain additional analysis or knowledge, you need to learn an NLP model for analysis using HTML or fine-tune the new PaliGemma model by constructing new data.
How to Get Started with the Model
inference : https://www.kaggle.com/code/mldlchoidh/tr-inference
Training Details
Training Data
Pubtables1-1M
- Downloads last month
- 2