Image-Text-to-Text
Transformers
PyTorch
andesvl-aimv2-qwen3
feature-extraction
conversational
custom_code
Instructions to use OPPOer/AndesVL-1B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OPPOer/AndesVL-1B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OPPOer/AndesVL-1B-Instruct", 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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OPPOer/AndesVL-1B-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OPPOer/AndesVL-1B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OPPOer/AndesVL-1B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OPPOer/AndesVL-1B-Instruct", "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/OPPOer/AndesVL-1B-Instruct
- SGLang
How to use OPPOer/AndesVL-1B-Instruct 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 "OPPOer/AndesVL-1B-Instruct" \ --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": "OPPOer/AndesVL-1B-Instruct", "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 "OPPOer/AndesVL-1B-Instruct" \ --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": "OPPOer/AndesVL-1B-Instruct", "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 OPPOer/AndesVL-1B-Instruct with Docker Model Runner:
docker model run hf.co/OPPOer/AndesVL-1B-Instruct
| { | |
| "architectures": [ | |
| "AndesVLForConditionalGeneration" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_andesvl.AndesVLConfig", | |
| "AutoModel": "modeling_andesvl.AndesVLForConditionalGeneration", | |
| "AutoModelForCausalLM": "modeling_andesvl.AndesVLForConditionalGeneration" | |
| }, | |
| "model_type": "andesvl-aimv2-qwen3", | |
| "text_config": { | |
| "vocab_size": 151936, | |
| "max_position_embeddings": 40960, | |
| "hidden_size": 1024, | |
| "intermediate_size": 3072, | |
| "num_hidden_layers": 28, | |
| "num_attention_heads": 16, | |
| "use_sliding_window": false, | |
| "sliding_window": null, | |
| "max_window_layers": 28, | |
| "num_key_value_heads": 8, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "initializer_range": 0.02, | |
| "rms_norm_eps": 1e-06, | |
| "use_cache": true, | |
| "rope_theta": 1000000, | |
| "rope_scaling": null, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "tie_word_embeddings": true, | |
| "architectures": [ | |
| "Qwen3ForCausalLM" | |
| ], | |
| "bos_token_id": 151643, | |
| "eos_token_id": 151645, | |
| "model_type": "qwen3" | |
| }, | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "disable_rope": false, | |
| "fullatt_block_indexes": null, | |
| "hidden_size": 1024, | |
| "hidden_stride": 2, | |
| "image_size": 448, | |
| "intermediate_size": 2816, | |
| "interpolate_pe_method": "two_dim", | |
| "model_type": "aimv2", | |
| "num_attention_heads": 8, | |
| "num_channels": 3, | |
| "num_hidden_layers": 24, | |
| "patch_size": 14, | |
| "preserve_original_pe": true, | |
| "projection_dropout": 0.0, | |
| "qkv_bias": false, | |
| "rms_norm_eps": 1e-05, | |
| "temporal_patch_size": 1, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.51.0", | |
| "use_bias": false, | |
| "window_size": 112 | |
| }, | |
| "tie_word_embeddings": true, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.51.0" | |
| } |