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 config.json from sandeeprdy1729/thrisul-parser: direct link, hf CLI and curl.
- Browser
- Download file 5.74 kB
-
https://huggingface.co/sandeeprdy1729/thrisul-parser/resolve/main/config.json
- Command line
-
hf download hf://sandeeprdy1729/thrisul-parser/config.json
-
curl -L -o config.json https://huggingface.co/sandeeprdy1729/thrisul-parser/resolve/main/config.json
5.74 kB
| { | |
| "architectures": [ | |
| "RadioMBartPrefixForCausalLM" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "hf_nemotron_parse_config.NemotronParseConfig", | |
| "AutoModel": "hf_nemotron_parse_modeling.NemotronParseForConditionalGeneration", | |
| "AutoImageProcessor": "hf_nemotron_parse_processor.NemotronParseImageProcessor", | |
| "AutoProcessor": "hf_nemotron_parse_processor.NemotronParseProcessor" | |
| }, | |
| "bos_token_id": 0, | |
| "decoder": { | |
| "_attn_implementation": "sdpa", | |
| "_name_or_path": "", | |
| "activation_dropout": 0.0, | |
| "activation_function": "gelu", | |
| "add_cross_attention": false, | |
| "add_final_layer_norm": true, | |
| "architectures": null, | |
| "attention_dropout": 0.0, | |
| "bad_words_ids": null, | |
| "begin_suppress_tokens": null, | |
| "bos_token_id": 0, | |
| "chunk_size_feed_forward": 0, | |
| "classifier_dropout": 0.0, | |
| "cross_attention_hidden_size": null, | |
| "d_model": 1024, | |
| "decoder_attention_heads": 16, | |
| "decoder_ffn_dim": 4096, | |
| "decoder_layerdrop": 0.0, | |
| "decoder_layers": 10, | |
| "decoder_start_token_id": null, | |
| "diversity_penalty": 0.0, | |
| "do_sample": false, | |
| "dropout": 0.1, | |
| "early_stopping": false, | |
| "encoder_attention_heads": 16, | |
| "encoder_ffn_dim": 4096, | |
| "encoder_layerdrop": 0.0, | |
| "encoder_layers": 12, | |
| "encoder_no_repeat_ngram_size": 0, | |
| "eos_token_id": 2, | |
| "exponential_decay_length_penalty": null, | |
| "finetuning_task": null, | |
| "forced_bos_token_id": null, | |
| "forced_eos_token_id": 2, | |
| "hidden_size": 1024, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1", | |
| "2": "LABEL_2" | |
| }, | |
| "init_std": 0.02, | |
| "is_decoder": true, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1, | |
| "LABEL_2": 2 | |
| }, | |
| "length_penalty": 1.0, | |
| "max_length": 20, | |
| "min_length": 0, | |
| "model_type": "nemotron_parse_text", | |
| "no_repeat_ngram_size": 0, | |
| "num_beam_groups": 1, | |
| "num_beams": 1, | |
| "num_hidden_layers": 10, | |
| "num_return_sequences": 1, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "output_scores": false, | |
| "pad_token_id": 1, | |
| "prefix": null, | |
| "problem_type": null, | |
| "pruned_heads": {}, | |
| "remove_invalid_values": false, | |
| "repetition_penalty": 1.0, | |
| "return_dict": true, | |
| "return_dict_in_generate": false, | |
| "scale_embedding": true, | |
| "sep_token_id": null, | |
| "suppress_tokens": null, | |
| "task_specific_params": null, | |
| "temperature": 1.0, | |
| "tf_legacy_loss": false, | |
| "tie_encoder_decoder": false, | |
| "tie_word_embeddings": true, | |
| "tokenizer_class": null, | |
| "top_k": 50, | |
| "top_p": 1.0, | |
| "torch_dtype": "bfloat16", | |
| "torchscript": false, | |
| "transformers_version": "5.6.1", | |
| "typical_p": 1.0, | |
| "use_bfloat16": true, | |
| "use_cache": true, | |
| "vocab_size": 72512, | |
| "self_attention_kv_heads": 8, | |
| "cross_attention_kv_heads": 0, | |
| "causal_vision_prefix": true | |
| }, | |
| "decoder_start_token_id": 2, | |
| "encoder": { | |
| "_name_or_path": "nvidia/C-RADIOv4-SO400M", | |
| "adaptor_configs": {}, | |
| "adaptor_names": null, | |
| "architectures": [ | |
| "RADIOModel" | |
| ], | |
| "args": { | |
| "cls_token_per_teacher": true, | |
| "cpe_max_size": 2048, | |
| "model": "vit_so400m_patch16_224", | |
| "register_multiple": 10, | |
| "teachers": [ | |
| { | |
| "name": "siglip2-g", | |
| "use_summary": true | |
| }, | |
| { | |
| "name": "dino_v3_7b", | |
| "use_summary": true | |
| }, | |
| { | |
| "name": "sam3", | |
| "use_summary": false | |
| } | |
| ] | |
| }, | |
| "auto_map": { | |
| "AutoConfig": "nvidia/C-RADIOv4-SO400M--hf_model.RADIOConfig", | |
| "AutoModel": "nvidia/C-RADIOv4-SO400M--hf_model.RADIOModel" | |
| }, | |
| "chunk_size_feed_forward": 0, | |
| "dtype": "float32", | |
| "feature_normalizer_config": null, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "inter_feature_normalizer_config": null, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "max_resolution": 2048, | |
| "model_type": "", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "patch_size": 16, | |
| "preferred_resolution": [ | |
| 512, | |
| 512 | |
| ], | |
| "problem_type": null, | |
| "return_dict": true, | |
| "version": "c-radio_v4-so400m", | |
| "vitdet_window_size": null, | |
| "code_revision": "c0457f5dc26ca145f954cd4fc5bb6114e5705ad8" | |
| }, | |
| "eos_token_id": 2, | |
| "image_size": [ | |
| 2048, | |
| 1664 | |
| ], | |
| "is_encoder_decoder": false, | |
| "max_sequence_length": 16384, | |
| "model_type": "nemotron_parse", | |
| "pad_token_id": 1, | |
| "tie_word_embeddings": true, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "5.6.1", | |
| "vocab_size": 72512, | |
| "class_token_start_idx": 52315, | |
| "legacy_use_hf_vision_model": true, | |
| "vision_backbone_name": "nvidia/C-RADIOv4-SO400M", | |
| "vision_spatial_dim": 1152, | |
| "vision_summary_dim": 2304, | |
| "architecture_benchmark": { | |
| "backbone": "nvidia/C-RADIOv4-SO400M", | |
| "attention_mode": "global", | |
| "spatial_dim": 1152, | |
| "summary_dim": 2304 | |
| }, | |
| "navit_disable_cpe_augmentation": true, | |
| "self_attention_kv_heads": 8, | |
| "cross_attention_kv_heads": 0, | |
| "legacy_causal_vision_prefix": true, | |
| "legacy_causal_prefix_context_limit": 16384, | |
| "image_token_index": 1, | |
| "num_hidden_layers": 10, | |
| "decoder_layers": 10, | |
| "hidden_size": 1024, | |
| "intermediate_size": 4096, | |
| "num_attention_heads": 16, | |
| "num_key_value_heads": 8, | |
| "max_position_embeddings": 16384, | |
| "navit_position_embedding_mode": "content_normalized_2d_interpolate", | |
| "navit_packing": true, | |
| "navit_coordinate_frame": "content_normalized", | |
| "virtual_canvas_width": 1664, | |
| "virtual_canvas_height": 2048, | |
| "virtual_canvas_placement": "aligned_center", | |
| "num_extra_heads": 1 | |
| } | |