Image-Text-to-Text
Transformers
Safetensors
Chinese
English
lfm2_titans
custom_code
lfm2
multimodal
persistent-memory
titans
differentiable-neural-computer
male-cns
conversational
Instructions to use win10/LFM-MD-V1-VL-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use win10/LFM-MD-V1-VL-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="win10/LFM-MD-V1-VL-3B", 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("win10/LFM-MD-V1-VL-3B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use win10/LFM-MD-V1-VL-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "win10/LFM-MD-V1-VL-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "win10/LFM-MD-V1-VL-3B", "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/win10/LFM-MD-V1-VL-3B
- SGLang
How to use win10/LFM-MD-V1-VL-3B 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 "win10/LFM-MD-V1-VL-3B" \ --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": "win10/LFM-MD-V1-VL-3B", "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 "win10/LFM-MD-V1-VL-3B" \ --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": "win10/LFM-MD-V1-VL-3B", "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 win10/LFM-MD-V1-VL-3B with Docker Model Runner:
docker model run hf.co/win10/LFM-MD-V1-VL-3B
Ctrl+K
- 1.57 kB
- 10.6 kB
- 16.4 kB
- 3.97 kB
- 19.8 kB
- 14.5 kB
- 3.86 kB
- 3.18 kB
- 5.44 kB
- 4.73 kB
- 1.38 kB
- 429 kB
- 4.58 kB
- 4.72 kB
- 1.42 MB xet
- 9.41 kB
- 25.2 kB
- 327 Bytes
- 7.34 kB
- 991 Bytes
- 50.3 MB xet
- 15.9 MB xet
- 528 Bytes
- 832 Bytes
- 27 kB
- 3.97 GB xet
- 3.38 GB xet
- 86.6 kB
- 33.4 kB
- 32.2 kB
- 14.6 kB
- 14.8 kB
- 12.6 kB
- 1.78 kB
- 15.1 kB
- 19.6 kB
- 824 Bytes
- 5.7 kB
- 10.1 kB
- 15.3 kB
- 3.37 kB
- 17.9 MB xet
- 506 Bytes