Image-Text-to-Text
Transformers
Joblib
Safetensors
nemotron_parse
text-generation
document-parsing
ocr
tables
charts
ground-truth-sft
grpo
verifiable-rewards
routed-refinement
thrisul
conversational
custom_code
Instructions to use sandeeprdy1729/thrisul-parser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sandeeprdy1729/thrisul-parser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sandeeprdy1729/thrisul-parser", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("sandeeprdy1729/thrisul-parser", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sandeeprdy1729/thrisul-parser with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sandeeprdy1729/thrisul-parser" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sandeeprdy1729/thrisul-parser", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/sandeeprdy1729/thrisul-parser
- SGLang
How to use sandeeprdy1729/thrisul-parser 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 "sandeeprdy1729/thrisul-parser" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sandeeprdy1729/thrisul-parser", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "sandeeprdy1729/thrisul-parser" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sandeeprdy1729/thrisul-parser", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use sandeeprdy1729/thrisul-parser with Docker Model Runner:
docker model run hf.co/sandeeprdy1729/thrisul-parser
Download vllm_tied_patch/defaults.py from sandeeprdy1729/thrisul-parser: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/sandeeprdy1729/thrisul-parser/resolve/main/vllm_tied_patch/defaults.py
- Command line
-
hf download hf://sandeeprdy1729/thrisul-parser/vllm_tied_patch/defaults.py
-
curl -L -o defaults.py https://huggingface.co/sandeeprdy1729/thrisul-parser/resolve/main/vllm_tied_patch/defaults.py
1.97 kB
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: OpenMDW-1.1 | |
| """Model-scoped serving defaults for Nemotron 3.5 Parse.""" | |
| from __future__ import annotations | |
| import os | |
| def is_parse_config(config) -> bool: | |
| return bool( | |
| {"RadioMBartPrefixForCausalLM", "ParseAuxMTPModel"} | |
| & set(getattr(config, "architectures", []) or []) | |
| ) | |
| def disable_fa3_aot(model_config) -> bool: | |
| """Use the validated FA3 schedule for this model and its MTP proposer.""" | |
| return is_parse_config(getattr(model_config, "hf_config", None)) and ( | |
| os.environ.get("NP_VLLM_FA3_DISABLE_AOT_SCHEDULER", "1") == "1" | |
| ) | |
| def default_mtp(engine_args, model_config) -> bool: | |
| """Supply one-token MTP only when no speculative options were specified.""" | |
| config = getattr(model_config, "hf_config", None) | |
| return ( | |
| is_parse_config(config) | |
| and int(getattr(config, "num_extra_heads", 0) or 0) > 0 | |
| and os.environ.get("NP_VLLM_MTP", "1") == "1" | |
| and engine_args.speculative_config is None | |
| and all(getattr(engine_args, name, None) is None | |
| for name in ("spec_method", "spec_model", "spec_tokens")) | |
| ) | |
| def register_serving_defaults() -> None: | |
| from vllm.engine.arg_utils import EngineArgs | |
| original = EngineArgs.create_speculative_config | |
| if getattr(original, "_np_parse_default_mtp", False): | |
| return | |
| def create_speculative_config(self, target_model_config, target_parallel_config): | |
| if default_mtp(self, target_model_config): | |
| self.speculative_config = {"method": "mtp", "num_speculative_tokens": 1} | |
| print("[nemotron-parse] one-token MTP enabled by default", flush=True) | |
| return original(self, target_model_config, target_parallel_config) | |
| create_speculative_config._np_parse_default_mtp = True | |
| EngineArgs.create_speculative_config = create_speculative_config | |