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/plugin.py from sandeeprdy1729/thrisul-parser: direct link, hf CLI and curl.
- Browser
- Download file 3.3 kB
-
https://huggingface.co/sandeeprdy1729/thrisul-parser/resolve/main/vllm_tied_patch/plugin.py
- Command line
-
hf download hf://sandeeprdy1729/thrisul-parser/vllm_tied_patch/plugin.py
-
curl -L -o plugin.py https://huggingface.co/sandeeprdy1729/thrisul-parser/resolve/main/vllm_tied_patch/plugin.py
3.3 kB
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: OpenMDW-1.1 | |
| """vLLM general-plugin entry point for Nemotron 3.5 Parse. | |
| Installing this repository registers the target visual-prefix model and its | |
| one-step MTP proposer in every vLLM process. This replaces the implicit | |
| ``sitecustomize``/``PYTHONPATH`` startup hook with vLLM's documented plugin | |
| lifecycle while preserving the validated vLLM 0.26 compatibility patches. | |
| """ | |
| from __future__ import annotations | |
| from importlib.metadata import PackageNotFoundError, version | |
| from packaging.specifiers import SpecifierSet | |
| _SUPPORTED_RUNTIME = { | |
| "vllm": ">=0.25.0,<0.33", | |
| "transformers": ">=5.14.1,<5.20", | |
| "huggingface-hub": ">=1.24.0,<2", | |
| } | |
| def _validate_runtime_versions() -> None: | |
| """Reject unsupported serving versions before applying internal hooks.""" | |
| mismatches = [] | |
| for package, expected in _SUPPORTED_RUNTIME.items(): | |
| try: | |
| actual = version(package) | |
| except PackageNotFoundError: | |
| actual = "not installed" | |
| if actual == "not installed" or not SpecifierSet(expected).contains(actual, prereleases=False): | |
| mismatches.append(f"{package}=={actual} (requires {expected})") | |
| if mismatches: | |
| raise RuntimeError( | |
| "Nemotron 3.5 Parse vLLM plugin requires a supported runtime: " | |
| + ", ".join(f"{name}{value}" for name, value in _SUPPORTED_RUNTIME.items()) | |
| + ". Found: " | |
| + ", ".join(mismatches) | |
| ) | |
| def _register_mtp() -> None: | |
| from vllm.config.speculative import SpeculativeConfig | |
| from vllm.model_executor.models import ModelRegistry | |
| if "ParseAuxMTPModel" not in ModelRegistry.get_supported_archs(): | |
| ModelRegistry.register_model( | |
| "ParseAuxMTPModel", | |
| "vllm_tied_patch.vllm_radio_mbart_mtp:ParseAuxMTPModel", | |
| ) | |
| original_override = SpeculativeConfig.hf_config_override | |
| if getattr(original_override, "_np_parse_aux_mtp", False): | |
| return | |
| def parse_mtp_override(hf_config): | |
| architectures = getattr(hf_config, "architectures", []) or [] | |
| if "RadioMBartPrefixForCausalLM" in architectures: | |
| hf_config.model_type = "mtp" | |
| hf_config.update( | |
| { | |
| "architectures": ["ParseAuxMTPModel"], | |
| "n_predict": 1, | |
| "num_nextn_predict_layers": 1, | |
| } | |
| ) | |
| return hf_config | |
| return original_override(hf_config) | |
| parse_mtp_override._np_parse_aux_mtp = True | |
| SpeculativeConfig.hf_config_override = staticmethod(parse_mtp_override) | |
| def register() -> None: | |
| """Register 3.5 Parse target and draft models in the current process.""" | |
| _validate_runtime_versions() | |
| # Importing the compatibility module applies the pinned vLLM 0.26 SO400M, | |
| # NaViT, GQA, target-model registration, and optional FA3 compatibility | |
| # hooks. Unlike top-level sitecustomize discovery, this is invoked by | |
| # vLLM's explicit general-plugin loader in every process. | |
| from . import compatibility as _compat # noqa: F401 | |
| _register_mtp() | |
| from .defaults import register_serving_defaults | |
| register_serving_defaults() | |