Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
multimodal
scientific
protein
rna
dna
molecule
weather
medical-imaging
conversational
Instructions to use sais-org/Polaris_Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sais-org/Polaris_Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sais-org/Polaris_Pro") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("sais-org/Polaris_Pro") model = AutoModelForMultimodalLM.from_pretrained("sais-org/Polaris_Pro") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sais-org/Polaris_Pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sais-org/Polaris_Pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sais-org/Polaris_Pro", "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/sais-org/Polaris_Pro
- SGLang
How to use sais-org/Polaris_Pro 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 "sais-org/Polaris_Pro" \ --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": "sais-org/Polaris_Pro", "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 "sais-org/Polaris_Pro" \ --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": "sais-org/Polaris_Pro", "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 sais-org/Polaris_Pro with Docker Model Runner:
docker model run hf.co/sais-org/Polaris_Pro
| { | |
| "architectures": [ | |
| "Qwen3VLForConditionalGeneration" | |
| ], | |
| "bio_token_ids": { | |
| "_bio_seq_output_pad": { | |
| "pad": 151687 | |
| }, | |
| "contact_map": { | |
| "end": 151682, | |
| "pad": 151683, | |
| "start": 151681 | |
| }, | |
| "dna": { | |
| "end": 151673, | |
| "pad": 151674, | |
| "start": 151672 | |
| }, | |
| "mol": { | |
| "end": 151679, | |
| "pad": 151680, | |
| "start": 151678 | |
| }, | |
| "protein": { | |
| "end": 151676, | |
| "pad": 151677, | |
| "start": 151675 | |
| }, | |
| "rna": { | |
| "end": 151670, | |
| "pad": 151671, | |
| "start": 151669 | |
| }, | |
| "weather": { | |
| "end": 151685, | |
| "pad": 151686, | |
| "start": 151684 | |
| } | |
| }, | |
| "bos_token_id": null, | |
| "dna_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "chunk_size_feed_forward": 0, | |
| "conv_kernel_size": 7, | |
| "dna_encoder_hidden_size": 512, | |
| "dna_encoder_path": "dna", | |
| "dna_max_seq_length": 2048, | |
| "dna_projector_hidden_size": 2048, | |
| "dna_vocab_size": 8, | |
| "dropout": 0.1, | |
| "dtype": null, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_type": "qwen3_vl_dna", | |
| "num_attention_heads": 8, | |
| "num_encoder_layers": 8, | |
| "num_latent_tokens": 64, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "problem_type": null, | |
| "return_dict": true | |
| }, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151645, | |
| "epi_ohem_enable": false, | |
| "epi_ohem_hard_fraction": 0.5, | |
| "epi_ohem_weight": 2.0, | |
| "image_token_id": 151655, | |
| "med_seg_config": { | |
| "cost_bbox": 5.0, | |
| "cost_class": 2.0, | |
| "cost_dice": 5.0, | |
| "cost_giou": 2.0, | |
| "cost_mask": 5.0, | |
| "focal_alpha": 0.25, | |
| "focal_gamma": 2.0, | |
| "freeze_sam3": true, | |
| "freeze_sam3_vision": false, | |
| "loss_w_bbox_giou": 0.5, | |
| "loss_w_bbox_l1": 0.5, | |
| "loss_w_cls": 1.0, | |
| "loss_w_mask_dice": 5.0, | |
| "loss_w_mask_dice_high": 0.0, | |
| "loss_w_mask_focal": 2.0, | |
| "loss_w_mask_semantic": 0.5, | |
| "loss_w_meta_ce": 0.2, | |
| "mask_cost_res": 128, | |
| "mask_h": 576, | |
| "mask_loss_target_res": null, | |
| "mask_w": 576, | |
| "med_query_end_id": null, | |
| "med_query_start_id": null, | |
| "meta_num_classes": 15, | |
| "proj_hidden_mult": 2, | |
| "proj_mlp": true, | |
| "sam3_model_path": null, | |
| "sam3_text_dim": 256, | |
| "system_prompt": "You are a medical imaging assistant specialized in image understanding for segmentation.\nYou will be provided with (1) a medical image and (2) a text query that specifies a target region to segment.\nYour goal is to produce a detailed, clinically plausible description that helps delineate the target region precisely.\nPlease describe:\n 1) The imaging modality/type if it is evident (e.g., CT, MRI, ultrasound, X-ray, endoscopy, dermoscopy, histopathology). If uncertain, explicitly say it is unknown.\n 2) The overall field of view and orientation (e.g., axial/sagittal/coronal for cross-sectional images, or a general view if not applicable).\n 3) The main anatomical structures/organs visible, and for each one provide approximate location using spatial terms. (left/right, superior/inferior, anterior/posterior, central/peripheral) and relative relationships between organs.\n 4) Most importantly, focus on the structure mentioned in the text query: describe its approximate position, boundaries, shape, size, and its appearance (intensity/color, texture, homogeneity, and contrast to surrounding tissues).\n Be concise but detailed, use precise spatial language, and emphasize features helpful for pixel-accurate segmentation.", | |
| "upsample_mask_loss": false, | |
| "use_query_special_tokens": false | |
| }, | |
| "med_seg_freeze_qwen": true, | |
| "med_seg_visual_fp32": false, | |
| "modality_configs": {}, | |
| "model_type": "qwen3_vl", | |
| "mol_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "chunk_size_feed_forward": 0, | |
| "dropout": 0.1, | |
| "dtype": null, | |
| "freeze_gnn": true, | |
| "freeze_mol_gnn": true, | |
| "gnn_drop_ratio": 0.0, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_type": "qwen3_vl_mol", | |
| "mol_decoder_hidden_size": 768, | |
| "mol_decoder_max_seq_length": 512, | |
| "mol_decoder_num_heads": 12, | |
| "mol_decoder_num_layers": 6, | |
| "mol_encoder_hidden_size": 256, | |
| "mol_encoder_path": "mol", | |
| "mol_projector_hidden_size": 1024, | |
| "mol_vocab_size": 226, | |
| "num_gnn_layers": 12, | |
| "num_latent_tokens": 64, | |
| "num_resampler_heads": 8, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "problem_type": null, | |
| "return_dict": true | |
| }, | |
| "pad_token_id": 151643, | |
| "protein_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "chunk_size_feed_forward": 0, | |
| "conv_kernel_size": 7, | |
| "dropout": 0.1, | |
| "dtype": null, | |
| "esmc_model_name": "esm2_t30_150M_UR50D", | |
| "freeze_backbone": true, | |
| "freeze_esmc": true, | |
| "freeze_protein_backbone": true, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_type": "qwen3_vl_protein", | |
| "num_attention_heads": 8, | |
| "num_encoder_layers": 12, | |
| "num_latent_tokens": 64, | |
| "num_resampler_layers": 2, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "problem_type": null, | |
| "protein_backbone_name": "esm2_t30_150M_UR50D", | |
| "protein_convformer_vocab_size": 33, | |
| "protein_encoder_hidden_size": 640, | |
| "protein_encoder_path": "protein", | |
| "protein_max_seq_length": 8192, | |
| "protein_projector_hidden_size": 2560, | |
| "protein_vocab_size": 31, | |
| "return_dict": true, | |
| "use_physicochemical_embed": true | |
| }, | |
| "rna_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "chunk_size_feed_forward": 0, | |
| "conv_kernel_size": 7, | |
| "dropout": 0.1, | |
| "dtype": null, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "model_type": "qwen3_vl_rna", | |
| "num_attention_heads": 8, | |
| "num_encoder_layers": 8, | |
| "num_latent_tokens": 64, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "problem_type": null, | |
| "return_dict": true, | |
| "rna_encoder_hidden_size": 512, | |
| "rna_encoder_path": "rna", | |
| "rna_max_seq_length": 4096, | |
| "rna_projector_hidden_size": 2048, | |
| "rna_vocab_size": 8 | |
| }, | |
| "text_config": { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151645, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 12288, | |
| "max_position_embeddings": 262144, | |
| "model_type": "qwen3_vl_text", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 36, | |
| "num_key_value_heads": 8, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "mrope_interleaved": true, | |
| "mrope_section": [ | |
| 24, | |
| 20, | |
| 20 | |
| ], | |
| "rope_theta": 5000000, | |
| "rope_type": "default" | |
| }, | |
| "rope_theta": 5000000, | |
| "tie_word_embeddings": false, | |
| "use_cache": true, | |
| "vocab_size": 151936 | |
| }, | |
| "text_loss_weight": 1.0, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.0.0", | |
| "use_cache": false, | |
| "video_token_id": 151656, | |
| "vision_config": { | |
| "deepstack_visual_indexes": [ | |
| 8, | |
| 16, | |
| 24 | |
| ], | |
| "depth": 27, | |
| "dtype": "bfloat16", | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "in_channels": 3, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4304, | |
| "model_type": "qwen3_vl", | |
| "num_heads": 16, | |
| "num_position_embeddings": 2304, | |
| "out_hidden_size": 4096, | |
| "patch_size": 16, | |
| "spatial_merge_size": 2, | |
| "temporal_patch_size": 2 | |
| }, | |
| "vision_end_token_id": 151653, | |
| "vision_start_token_id": 151652, | |
| "weather_config": { | |
| "_name_or_path": "", | |
| "architectures": null, | |
| "attn_type": "flash", | |
| "chunk_size_feed_forward": 0, | |
| "const_chans": 6, | |
| "decoder_depth": 12, | |
| "dtype": null, | |
| "embed_freq": 256, | |
| "embed_mode": "add", | |
| "embed_types": [ | |
| "step", | |
| "hour", | |
| "doy", | |
| "lead_hour" | |
| ], | |
| "encoder_depth": 12, | |
| "ffn_type": "geglu_ffn", | |
| "frame_interval": "6h", | |
| "hidden_size": 2048, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "image_size": [ | |
| 721, | |
| 1440 | |
| ], | |
| "in_chans": 70, | |
| "in_frames": 1, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "lead_hour_scaling": true, | |
| "lower_chans": 0, | |
| "mask_type": "h", | |
| "max_rollout_steps": 200, | |
| "meteo_data_path": null, | |
| "meteo_loss_coef": 1.0, | |
| "meteo_loss_type": "l1_channel", | |
| "meteo_loss_weight": 1.0, | |
| "meteo_out_channels": 70, | |
| "meteo_output_size": [ | |
| 721, | |
| 1440 | |
| ], | |
| "meteo_token_id": 151655, | |
| "mlp_ratio": 4.0, | |
| "model_type": "qwen3_vl_weather", | |
| "n_kv_heads": null, | |
| "norm_type": "adarms", | |
| "num_heads": 32, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "patch_size": 6, | |
| "pl_chans": null, | |
| "problem_type": null, | |
| "qwenvl_dim": 4096, | |
| "return_dict": true, | |
| "time_embed_dropout": 0.0, | |
| "upper_chans": 70, | |
| "window_size": 20 | |
| } | |
| } |