Image-Text-to-Text
Transformers
Safetensors
English
multilingual
tiny_aya_vision
text-generation
conversational
Instructions to use TrishanuDas/tayavision-alignment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TrishanuDas/tayavision-alignment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="TrishanuDas/tayavision-alignment") 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 AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("TrishanuDas/tayavision-alignment", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TrishanuDas/tayavision-alignment with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TrishanuDas/tayavision-alignment" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TrishanuDas/tayavision-alignment", "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/TrishanuDas/tayavision-alignment
- SGLang
How to use TrishanuDas/tayavision-alignment 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 "TrishanuDas/tayavision-alignment" \ --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": "TrishanuDas/tayavision-alignment", "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 "TrishanuDas/tayavision-alignment" \ --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": "TrishanuDas/tayavision-alignment", "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 TrishanuDas/tayavision-alignment with Docker Model Runner:
docker model run hf.co/TrishanuDas/tayavision-alignment
| { | |
| "_text_config_obj": { | |
| "_name_or_path": "CohereLabs/tiny-aya-global", | |
| "_sliding_window_pattern": 4, | |
| "architectures": [ | |
| "Cohere2ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 2, | |
| "cache_implementation": "hybrid", | |
| "chunk_size_feed_forward": 0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 3, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 11008, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "layer_switch": 4, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "logit_scale": 1.0, | |
| "max_position_embeddings": 500000, | |
| "model_type": "cohere2", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 36, | |
| "num_key_value_heads": 4, | |
| "order_of_interleaved_layers": "local_attn_first", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "rope_gptj", | |
| "problem_type": null, | |
| "return_dict": true, | |
| "rope_parameters": { | |
| "rope_theta": 50000, | |
| "rope_type": "default" | |
| }, | |
| "rotary_pct": 1.0, | |
| "sliding_window": 4096, | |
| "sliding_window_pattern": 4, | |
| "tie_word_embeddings": true, | |
| "use_cache": true, | |
| "use_embedding_sharing": true, | |
| "use_gated_activation": true, | |
| "use_parallel_block": true, | |
| "use_parallel_embedding": false, | |
| "use_qk_norm": false, | |
| "vocab_size": 262144 | |
| }, | |
| "adapter_layer_norm_eps": 1e-06, | |
| "architectures": [ | |
| "TinyAyaVisionForConditionalGeneration" | |
| ], | |
| "cache_dir": null, | |
| "connector_intermediate_size": 2048, | |
| "connector_type": "pixel_shuffle", | |
| "downsample_factor": 2, | |
| "dtype": "bfloat16", | |
| "image_size": 384, | |
| "image_token": "<image>", | |
| "image_token_id": 261010, | |
| "in_token_limit": 1024, | |
| "llm_hidden_size": 2048, | |
| "llm_model_name": "CohereLabs/tiny-aya-global", | |
| "llm_vocab_size": 262144, | |
| "model_type": "tiny_aya_vision", | |
| "num_llm_layers": 36, | |
| "num_tokens_after_shuffle": 196, | |
| "num_vision_tokens": 729, | |
| "padded_grid_size": 28, | |
| "patch_size": 14, | |
| "pixel_shuffle_embed_dim": 4608, | |
| "post_projector_rms_norm": false, | |
| "text_config": { | |
| "_name_or_path": "CohereLabs/tiny-aya-global", | |
| "_sliding_window_pattern": 4, | |
| "architectures": [ | |
| "Cohere2ForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 2, | |
| "cache_implementation": "hybrid", | |
| "chunk_size_feed_forward": 0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 3, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 11008, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "layer_switch": 4, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention" | |
| ], | |
| "logit_scale": 1.0, | |
| "max_position_embeddings": 500000, | |
| "model_type": "cohere2", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 36, | |
| "num_key_value_heads": 4, | |
| "order_of_interleaved_layers": "local_attn_first", | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "rope_gptj", | |
| "problem_type": null, | |
| "return_dict": true, | |
| "rope_parameters": { | |
| "rope_theta": 50000, | |
| "rope_type": "default" | |
| }, | |
| "rotary_pct": 1.0, | |
| "sliding_window": 4096, | |
| "sliding_window_pattern": 4, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.5.3", | |
| "use_cache": true, | |
| "use_embedding_sharing": true, | |
| "use_gated_activation": true, | |
| "use_parallel_block": true, | |
| "use_parallel_embedding": false, | |
| "use_qk_norm": false, | |
| "vocab_size": 262144 | |
| }, | |
| "tokens_per_tile": 4, | |
| "transformers_version": "5.5.3", | |
| "trust_remote_code": false, | |
| "vision_encoder_type": "siglip", | |
| "vision_feature_layer": -1, | |
| "vision_feature_select_strategy": "full", | |
| "vision_grid_size": 27, | |
| "vision_hidden_size": 1152, | |
| "vision_model_name": "google/siglip2-so400m-patch14-384", | |
| "vision_tower_config": { | |
| "_name_or_path": "google/siglip2-so400m-patch14-384", | |
| "architectures": null, | |
| "attention_dropout": 0.0, | |
| "chunk_size_feed_forward": 0, | |
| "dtype": "bfloat16", | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "image_size": 384, | |
| "intermediate_size": 4304, | |
| "is_encoder_decoder": false, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "layer_norm_eps": 1e-06, | |
| "model_type": "siglip_vision_model", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 27, | |
| "output_attentions": false, | |
| "output_hidden_states": false, | |
| "patch_size": 14, | |
| "problem_type": null, | |
| "return_dict": true, | |
| "transformers_version": "5.5.3" | |
| } | |
| } | |