Instructions to use HuggingFaceM4/tiny-random-idefics with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceM4/tiny-random-idefics with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="HuggingFaceM4/tiny-random-idefics")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("HuggingFaceM4/tiny-random-idefics") model = AutoModelForMultimodalLM.from_pretrained("HuggingFaceM4/tiny-random-idefics", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceM4/tiny-random-idefics with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceM4/tiny-random-idefics" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceM4/tiny-random-idefics", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceM4/tiny-random-idefics
- SGLang
How to use HuggingFaceM4/tiny-random-idefics 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 "HuggingFaceM4/tiny-random-idefics" \ --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": "HuggingFaceM4/tiny-random-idefics", "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 "HuggingFaceM4/tiny-random-idefics" \ --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": "HuggingFaceM4/tiny-random-idefics", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceM4/tiny-random-idefics with Docker Model Runner:
docker model run hf.co/HuggingFaceM4/tiny-random-idefics
Commit History
-
Upload tokenizer
b08e9ee
-
set the correct vision_config.hidden_act (#4)
- set the correct vision_config.hidden_act (8b0de4df9d774ebf816db0555f86953103316e41) Co-authored-by: Stas Bekman <stas@users.noreply.huggingface.co>a3b6c1d
-
enable legacy=True
02753f3
-
Update config.json (#3)
- Update config.json (dcb406270317fd493324903e3a5b303f135b64ac) - Update config.json (9b0ea887479d408f0eec6ef2ae1ff179afa6ff58) - Update config.json (9d135aa7ce1c475399351bad15ca9eb8ec99ff82) Co-authored-by: Younes Belkada <ybelkada@users.noreply.huggingface.co>0dd4705 -
sync
c6c0e72
-
s|IdeficsForCausalLM|IdeficsForVisionText2Text|g
53ca0df -
add image_num_channels
884e26e -
cleanup
fbbdd26 -
Update config.json (#2)
- Update config.json (fe0f9974e02c40f9acbadb82b45c15c2ba3382a1) - Update config.json (69874138fb46e9dc902325f968d71f8a377bd935) - Update config.json (14f552a695651301afcecf000c8115605080aa93) - Update config.json (7f8395b1b3ac8b02c4d2dba9efcb69e01e2e9f46) - Update config.json (d95f7c5167dcde24c26f145c80885d1be557eaf8) - Update config.json (b241ecfb8901a490053ef2b685aef9ccd420f7a5) - Update config.json (e8ba4420192d66437f48e874203cff45b32ab353) Co-authored-by: Younes Belkada <ybelkada@users.noreply.huggingface.co>bb3e860
-
Update config.json (#1)
- Update config.json (6f9f7c1646eb36080c398c4ff7032d309ade303c) Co-authored-by: Younes Belkada <ybelkada@users.noreply.huggingface.co>1ad887a
-
processor config
7a370ca
-
tokenizer
0968114 -
Update config.json
af110e6
-
fix
51ef8da -
clone HuggingFaceM4/tiny-random-LlamaForCausalLM and rename
5a73ed1 -
initial commit
Stas Bekman2496b33