Image-Text-to-Text
Transformers
Safetensors
English
llava
document-understanding
key-information-extraction
machine-unlearning
privacy
idnet
docprivacybench
Instructions to use Stanley11/Beyond-Visual-Evidence-IDNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Stanley11/Beyond-Visual-Evidence-IDNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Stanley11/Beyond-Visual-Evidence-IDNet")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Stanley11/Beyond-Visual-Evidence-IDNet", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Stanley11/Beyond-Visual-Evidence-IDNet with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Stanley11/Beyond-Visual-Evidence-IDNet" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Stanley11/Beyond-Visual-Evidence-IDNet", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Stanley11/Beyond-Visual-Evidence-IDNet
- SGLang
How to use Stanley11/Beyond-Visual-Evidence-IDNet 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 "Stanley11/Beyond-Visual-Evidence-IDNet" \ --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": "Stanley11/Beyond-Visual-Evidence-IDNet", "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 "Stanley11/Beyond-Visual-Evidence-IDNet" \ --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": "Stanley11/Beyond-Visual-Evidence-IDNet", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Stanley11/Beyond-Visual-Evidence-IDNet with Docker Model Runner:
docker model run hf.co/Stanley11/Beyond-Visual-Evidence-IDNet
Download RF-Entangle/chat_template.jinja from Stanley11/Beyond-Visual-Evidence-IDNet: direct link, hf CLI and curl.
- Browser
- Download file 674 Bytes
-
https://huggingface.co/Stanley11/Beyond-Visual-Evidence-IDNet/resolve/main/RF-Entangle/chat_template.jinja
- Command line
-
hf download hf://Stanley11/Beyond-Visual-Evidence-IDNet/RF-Entangle/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/Stanley11/Beyond-Visual-Evidence-IDNet/resolve/main/RF-Entangle/chat_template.jinja
674 Bytes
| {% for message in messages %}{% if message['role'] != 'system' %}{{ message['role'].upper() + ': '}}{% endif %}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image> | |
| ' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] + ' '}}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ content['text'] + ' '}}{% endgeneration %}{% endfor %}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ 'ASSISTANT:' }}{% endif %} |