Run this model with HF Jobs
Run HuggingFaceM4/tiny-random-idefics on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/HuggingFaceM4/tiny-random-idefics. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/HuggingFaceM4/tiny-random-idefics on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/HuggingFaceM4/tiny-random-idefics. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/HuggingFaceM4/tiny-random-idefics. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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
Update config.json
#3
by ybelkada HF Staff - opened
27 unmodified lines282930313233343536373839404142434445464748495027 unmodified lines"num_hidden_layers": 2,"pad_token_id": 0,"qk_layer_norms": false,"qk_layer_norms_perceiver": false,"resampler_depth": 2,"resampler_head_dim": 8,"resampler_n_heads": 2,"resampler_n_latents": 16,"rms_norm_eps": 1e-06,"tie_word_embeddings": false,"torch_dtype": "float16","transformers_version": "4.27.0.dev0","use_cache": true,"use_resampler": true,"vision_embed_dim": 32,"vision_image_size": 30,"vision_intermediate_size": 37,"vision_patch_size": 2,"vision_num_attention_heads": 4,"vision_num_hidden_layers": 5,"vocab_size": 32000,"word_embed_proj_dim": 16}27 unmodified lines28293031323334353637383940414243444546474849505152535427 unmodified lines"num_hidden_layers": 2,"pad_token_id": 0,"qk_layer_norms": false,"rms_norm_eps": 1e-06,"tie_word_embeddings": false,"torch_dtype": "float16","transformers_version": "4.27.0.dev0","use_cache": true,"use_resampler": true,"vocab_size": 32000,"word_embed_proj_dim": 16,"vision_config": {"embed_dim": 32,"image_size": 30,"intermediate_size": 37,"patch_size": 2,"num_attention_heads": 4,"num_hidden_layers": 5},"perceiver_config": {"qk_layer_norms_perceiver": false,"resampler_depth": 2,"resampler_head_dim": 8,"resampler_n_heads": 2,"resampler_n_latents": 16}}
config.json+16-12