Run this model with HF Jobs
Run laicsiifes/phi3-vision-flickr30k_pt_human_generated 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/laicsiifes/phi3-vision-flickr30k_pt_human_generated. 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/laicsiifes/phi3-vision-flickr30k_pt_human_generated 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/laicsiifes/phi3-vision-flickr30k_pt_human_generated. 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/laicsiifes/phi3-vision-flickr30k_pt_human_generated. 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 laicsiifes/phi3-vision-flickr30k_pt_human_generated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use laicsiifes/phi3-vision-flickr30k_pt_human_generated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="laicsiifes/phi3-vision-flickr30k_pt_human_generated") 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 AutoModel model = AutoModel.from_pretrained("laicsiifes/phi3-vision-flickr30k_pt_human_generated", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use laicsiifes/phi3-vision-flickr30k_pt_human_generated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "laicsiifes/phi3-vision-flickr30k_pt_human_generated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "laicsiifes/phi3-vision-flickr30k_pt_human_generated", "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/laicsiifes/phi3-vision-flickr30k_pt_human_generated
- SGLang
How to use laicsiifes/phi3-vision-flickr30k_pt_human_generated 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 "laicsiifes/phi3-vision-flickr30k_pt_human_generated" \ --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": "laicsiifes/phi3-vision-flickr30k_pt_human_generated", "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 "laicsiifes/phi3-vision-flickr30k_pt_human_generated" \ --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": "laicsiifes/phi3-vision-flickr30k_pt_human_generated", "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 laicsiifes/phi3-vision-flickr30k_pt_human_generated with Docker Model Runner:
docker model run hf.co/laicsiifes/phi3-vision-flickr30k_pt_human_generated
Upload processor
Browse filesFiles changed (5)
- chat_template.jsonAdded+3
- preprocessor_config.jsonAdded+21
- special_tokens_map.jsonAdded+36
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+410
123{ "chat_template": "{% for message in messages %}{{'<|' + message['role'] + '|>' + '\n' + message['content'] + '<|end|>\n' }}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}{{- '<|assistant|>\n' -}}{% endif %}"}123456789101112131415161718192021{ "auto_map": { "AutoImageProcessor": "microsoft/Phi-3-vision-128k-instruct--image_processing_phi3_v.Phi3VImageProcessor", "AutoProcessor": "microsoft/Phi-3-vision-128k-instruct--processing_phi3_v.Phi3VProcessor" }, "do_convert_rgb": true, "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "Phi3VImageProcessor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "num_crops": 16, "num_img_tokens": 144, "processor_class": "Phi3VProcessor"}123456789101112131415161718192021222324252627282930313233343536{ "additional_special_tokens": [ "<|system|>", "<|end|>", "<|user|>", "<|end|>" ], "bos_token": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410{ "add_bos_token": true, "add_eos_token": false, "add_prefix_space": null, "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": false }, "32000": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32001": { "content": "<|assistant|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32002": { "content": "<|placeholder1|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32003": { "content": "<|placeholder2|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32004": { "content": "<|placeholder3|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32005": { "content": "<|placeholder4|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32006": { "content": "<|system|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32007": { "content": "<|end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32008": { "content": "<|placeholder5|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32009": { "content": "<|placeholder6|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32010": { "content": "<|user|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32011": { "content": "<|placeholder7|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32012": { "content": "<|placeholder8|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32013": { "content": "<|placeholder9|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32014": { "content": "<|placeholder10|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32015": { "content": "<|placeholder11|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32016": { "content": "<|placeholder12|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32017": { "content": "<|placeholder13|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32018": { "content": "<|placeholder14|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32019": { "content": "<|placeholder15|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32020": { "content": "<|placeholder16|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32021": { "content": "<|placeholder17|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32022": { "content": "<|placeholder18|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32023": { "content": "<|placeholder19|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32024": { "content": "<|placeholder20|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32025": { "content": "<|placeholder21|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32026": { "content": "<|placeholder22|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32027": { "content": "<|placeholder23|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32028": { "content": "<|placeholder24|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32029": { "content": "<|placeholder25|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32030": { "content": "<|placeholder26|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32031": { "content": "<|placeholder27|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32032": { "content": "<|placeholder28|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32033": { "content": "<|placeholder29|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32034": { "content": "<|placeholder30|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32035": { "content": "<|placeholder31|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32036": { "content": "<|placeholder32|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32037": { "content": "<|placeholder33|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32038": { "content": "<|placeholder34|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32039": { "content": "<|placeholder35|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32040": { "content": "<|placeholder36|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32041": { "content": "<|placeholder37|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32042": { "content": "<|placeholder38|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32043": { "content": "<|placeholder39|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32044": { "content": "<|image|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true } }, "additional_special_tokens": [ "<|system|>", "<|end|>", "<|user|>", "<|end|>" ], "bos_token": "<s>", "chat_template": "{% for message in messages %}{{'<|' + message['role'] + '|>' + '\n' + message['content'] + '<|end|>\n' }}{% endfor %}{% if add_generation_prompt and messages[-1]['role'] != 'assistant' %}{{- '<|assistant|>\n' -}}{% endif %}", "clean_up_tokenization_spaces": false, "eos_token": "<|endoftext|>", "legacy": false, "model_max_length": 131072, "pad_token": "<|endoftext|>", "padding_side": "right", "processor_class": "Phi3VProcessor", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": false}chat_template.jsonAdded+3
preprocessor_config.jsonAdded+21
special_tokens_map.jsonAdded+36
tokenizer.jsonAdded
tokenizer_config.jsonAdded+410