Image-Text-to-Text
Transformers
Safetensors
English
visionpsynano
feature-extraction
vision-language-model
nanovlm
chart-understanding
ocr
crypto
launchpad
stable-mainnet
fefer
pegd-fun
conversational
custom_code
Instructions to use feferai/FEFER-AI-460M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use feferai/FEFER-AI-460M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="feferai/FEFER-AI-460M", 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("feferai/FEFER-AI-460M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use feferai/FEFER-AI-460M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "feferai/FEFER-AI-460M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "feferai/FEFER-AI-460M", "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/feferai/FEFER-AI-460M
- SGLang
How to use feferai/FEFER-AI-460M 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 "feferai/FEFER-AI-460M" \ --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": "feferai/FEFER-AI-460M", "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 "feferai/FEFER-AI-460M" \ --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": "feferai/FEFER-AI-460M", "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 feferai/FEFER-AI-460M with Docker Model Runner:
docker model run hf.co/feferai/FEFER-AI-460M
| { | |
| "architectures": [ | |
| "VisionPsyNanoForConditionalGeneration" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_visionpsynano.VisionPsyNanoConfig", | |
| "AutoModel": "modeling_visionpsynano.VisionPsyNanoForConditionalGeneration", | |
| "AutoModelForImageTextToText": "modeling_visionpsynano.VisionPsyNanoForConditionalGeneration", | |
| "AutoProcessor": "processing_visionpsynano.VisionPsyNanoProcessor" | |
| }, | |
| "compile_inference": true, | |
| "compile_inference_mode": "default", | |
| "cuda_graphs_cache_quantum": 128, | |
| "eos_check_interval": 16, | |
| "extra_token_amount": 66, | |
| "hf_repo_name": "qvac/VisionPsy-Nano-460M", | |
| "inference_max_img_size": null, | |
| "is_flash": false, | |
| "lm_attn_scaling": 1.0, | |
| "lm_base_vocab_size": 49152, | |
| "lm_chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}", | |
| "lm_dropout": 0.0, | |
| "lm_hidden_dim": 960, | |
| "lm_inter_dim": 2560, | |
| "lm_max_length": 8192, | |
| "lm_max_position_embeddings": 8192, | |
| "lm_model_type": "HuggingFaceTB/SmolLM2-360M-Instruct", | |
| "lm_n_blocks": 32, | |
| "lm_n_heads": 15, | |
| "lm_n_kv_heads": 5, | |
| "lm_re_base": 100000, | |
| "lm_rms_eps": 1e-05, | |
| "lm_tie_weights": true, | |
| "lm_tokenizer": "HuggingFaceTB/SmolLM2-360M-Instruct", | |
| "lm_use_tokens": false, | |
| "lm_vocab_size": 49218, | |
| "max_img_size": 2048, | |
| "model_type": "visionpsynano", | |
| "mp_image_token_length": 64, | |
| "mp_pixel_shuffle_factor": 4, | |
| "resize_min_side_len": null, | |
| "resize_to_max_side_len": true, | |
| "transformers_version": "5.14.1", | |
| "vit_cls_flag": false, | |
| "vit_dropout": 0.0, | |
| "vit_hidden_dim": 768, | |
| "vit_img_size": 512, | |
| "vit_inter_dim": 3072, | |
| "vit_ln_eps": 1e-06, | |
| "vit_model_type": "google/siglip2-base-patch16-512", | |
| "vit_n_blocks": 12, | |
| "vit_n_heads": 12, | |
| "vit_patch_size": 16, | |
| "vlm_checkpoint_path": null, | |
| "vlm_extra_tokens": { | |
| "global_image_token": "<|global_image|>", | |
| "image_token": "<|image|>", | |
| "r1c1": "<row_1_col_1>", | |
| "r1c2": "<row_1_col_2>", | |
| "r1c3": "<row_1_col_3>", | |
| "r1c4": "<row_1_col_4>", | |
| "r1c5": "<row_1_col_5>", | |
| "r1c6": "<row_1_col_6>", | |
| "r1c7": "<row_1_col_7>", | |
| "r1c8": "<row_1_col_8>", | |
| "r2c1": "<row_2_col_1>", | |
| "r2c2": "<row_2_col_2>", | |
| "r2c3": "<row_2_col_3>", | |
| "r2c4": "<row_2_col_4>", | |
| "r2c5": "<row_2_col_5>", | |
| "r2c6": "<row_2_col_6>", | |
| "r2c7": "<row_2_col_7>", | |
| "r2c8": "<row_2_col_8>", | |
| "r3c1": "<row_3_col_1>", | |
| "r3c2": "<row_3_col_2>", | |
| "r3c3": "<row_3_col_3>", | |
| "r3c4": "<row_3_col_4>", | |
| "r3c5": "<row_3_col_5>", | |
| "r3c6": "<row_3_col_6>", | |
| "r3c7": "<row_3_col_7>", | |
| "r3c8": "<row_3_col_8>", | |
| "r4c1": "<row_4_col_1>", | |
| "r4c2": "<row_4_col_2>", | |
| "r4c3": "<row_4_col_3>", | |
| "r4c4": "<row_4_col_4>", | |
| "r4c5": "<row_4_col_5>", | |
| "r4c6": "<row_4_col_6>", | |
| "r4c7": "<row_4_col_7>", | |
| "r4c8": "<row_4_col_8>", | |
| "r5c1": "<row_5_col_1>", | |
| "r5c2": "<row_5_col_2>", | |
| "r5c3": "<row_5_col_3>", | |
| "r5c4": "<row_5_col_4>", | |
| "r5c5": "<row_5_col_5>", | |
| "r5c6": "<row_5_col_6>", | |
| "r5c7": "<row_5_col_7>", | |
| "r5c8": "<row_5_col_8>", | |
| "r6c1": "<row_6_col_1>", | |
| "r6c2": "<row_6_col_2>", | |
| "r6c3": "<row_6_col_3>", | |
| "r6c4": "<row_6_col_4>", | |
| "r6c5": "<row_6_col_5>", | |
| "r6c6": "<row_6_col_6>", | |
| "r6c7": "<row_6_col_7>", | |
| "r6c8": "<row_6_col_8>", | |
| "r7c1": "<row_7_col_1>", | |
| "r7c2": "<row_7_col_2>", | |
| "r7c3": "<row_7_col_3>", | |
| "r7c4": "<row_7_col_4>", | |
| "r7c5": "<row_7_col_5>", | |
| "r7c6": "<row_7_col_6>", | |
| "r7c7": "<row_7_col_7>", | |
| "r7c8": "<row_7_col_8>", | |
| "r8c1": "<row_8_col_1>", | |
| "r8c2": "<row_8_col_2>", | |
| "r8c3": "<row_8_col_3>", | |
| "r8c4": "<row_8_col_4>", | |
| "r8c5": "<row_8_col_5>", | |
| "r8c6": "<row_8_col_6>", | |
| "r8c7": "<row_8_col_7>", | |
| "r8c8": "<row_8_col_8>" | |
| }, | |
| "vlm_load_backbone_weights": false, | |
| "torch_dtype": "float32" | |
| } | |