Instructions to use mehmetkeremturkcan/FemtoVLM-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mehmetkeremturkcan/FemtoVLM-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mehmetkeremturkcan/FemtoVLM-Small")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mehmetkeremturkcan/FemtoVLM-Small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mehmetkeremturkcan/FemtoVLM-Small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mehmetkeremturkcan/FemtoVLM-Small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mehmetkeremturkcan/FemtoVLM-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mehmetkeremturkcan/FemtoVLM-Small
- SGLang
How to use mehmetkeremturkcan/FemtoVLM-Small 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 "mehmetkeremturkcan/FemtoVLM-Small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mehmetkeremturkcan/FemtoVLM-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "mehmetkeremturkcan/FemtoVLM-Small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mehmetkeremturkcan/FemtoVLM-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mehmetkeremturkcan/FemtoVLM-Small with Docker Model Runner:
docker model run hf.co/mehmetkeremturkcan/FemtoVLM-Small
mehmetkeremturkcan/FemtoVLM-Small
FemtoVLM: Tiniest Vision Language Models
FemtoVLM is the smallest visual question answering/captioning model in the world. It accepts image and text inputs to produce text outputs. It's designed for efficiency. FemtoVLM can answer questions about images and describe visual content. Its lightweight architecture makes it suitable for on-device applications while maintaining strong performance.
FemtoVLM comes in three sizes: 116M (femto), 143M (tiny), 160M (base), 225M (dino). All models are trained for image captioning and question answering in real-world contexts. FemtoVLM cannot perform optical character recognition (OCR), multi-turn question-answering, or scientific question answering.
Setup
pip install git+https://github.com/facebookresearch/schedule_free.git
pip install peft
git clone https://github.com/mkturkcan/seers.git
cd seers/seers/
git clone https://huggingface.co/mehmetkeremturkcan/FemtoVLM-Small
Test
Run, in the seers/seers folder,
python femtovlm_inference.py
Train
seers training code is public! Run
python femtovlm_train.py
Model tree for mehmetkeremturkcan/FemtoVLM-Small
Base model
HuggingFaceTB/SmolLM2-135M