Instructions to use santiagoperezs/comunicacion-aviso-pix2struct-cord with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use santiagoperezs/comunicacion-aviso-pix2struct-cord with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="santiagoperezs/comunicacion-aviso-pix2struct-cord")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("santiagoperezs/comunicacion-aviso-pix2struct-cord") model = AutoModelForMultimodalLM.from_pretrained("santiagoperezs/comunicacion-aviso-pix2struct-cord", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use santiagoperezs/comunicacion-aviso-pix2struct-cord with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "santiagoperezs/comunicacion-aviso-pix2struct-cord" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "santiagoperezs/comunicacion-aviso-pix2struct-cord", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/santiagoperezs/comunicacion-aviso-pix2struct-cord
- SGLang
How to use santiagoperezs/comunicacion-aviso-pix2struct-cord 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 "santiagoperezs/comunicacion-aviso-pix2struct-cord" \ --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": "santiagoperezs/comunicacion-aviso-pix2struct-cord", "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 "santiagoperezs/comunicacion-aviso-pix2struct-cord" \ --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": "santiagoperezs/comunicacion-aviso-pix2struct-cord", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use santiagoperezs/comunicacion-aviso-pix2struct-cord with Docker Model Runner:
docker model run hf.co/santiagoperezs/comunicacion-aviso-pix2struct-cord
| { | |
| "</s_anio>": 50349, | |
| "</s_ciudad>": 50371, | |
| "</s_dia>": 50345, | |
| "</s_direccion>": 50359, | |
| "</s_direccion_despacho>": 50365, | |
| "</s_fecha_citacion>": 50367, | |
| "</s_juzgado_letras>": 50353, | |
| "</s_mes>": 50347, | |
| "</s_n_consecutivo>": 50351, | |
| "</s_n_radicado>": 50361, | |
| "</s_naturaleza_proceso>": 50363, | |
| "</s_nombre_demandado>": 50355, | |
| "</s_nombre_demandante>": 50357, | |
| "</s_nombre_juez>": 50369, | |
| "</s_telefono_juez>": 50373, | |
| "<s_anio>": 50348, | |
| "<s_ciudad>": 50370, | |
| "<s_comunicacion-aviso-donut-dataset>": 50374, | |
| "<s_dia>": 50344, | |
| "<s_direccion>": 50358, | |
| "<s_direccion_despacho>": 50364, | |
| "<s_fecha_citacion>": 50366, | |
| "<s_juzgado_letras>": 50352, | |
| "<s_mes>": 50346, | |
| "<s_n_consecutivo>": 50350, | |
| "<s_n_radicado>": 50360, | |
| "<s_naturaleza_proceso>": 50362, | |
| "<s_nombre_demandado>": 50354, | |
| "<s_nombre_demandante>": 50356, | |
| "<s_nombre_juez>": 50368, | |
| "<s_telefono_juez>": 50372 | |
| } | |