AI SeedbankHelp preserve open and free AI for humanity's future

← All models

microsoft_Phi-3.5-vision-instruct

microsoft · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: mit license_link: https://huggingface.co/microsoft/Phi-3.5-vision-instruct/resolve/main/LICENSE language:

  • multilingual pipeline_tag: image-text-to-text tags:
  • nlp
  • code
  • vision inference: parameters: temperature: 0.7 widget:
  • messages:
    • role: user content: <|image_1|>Can you describe what you see in the image? library_name: transformers

Model Summary

Phi-3.5-vision is a lightweight, state-of-the-art open multimodal model built upon datasets which include - synthetic data and filtered publicly available websites - with a focus on very high-quality, reasoning dense data both on text and vision. The model belongs to the Phi-3 model family, and the multimodal version comes with 128K context length (in tokens) it can support. The model underwent a rigorous enhancement process, incorporating both supervised fine-tuning and direct preference optimization to ensure precise instruction adherence and robust safety measures.

🏡 Phi-3 Portal
📰 Phi-3 Microsoft Blog
📖 Phi-3 Technical Report
👩‍🍳 Phi-3 Cookbook
🖥️ Try It

Phi-3.5: [mini-instruct]; [MoE-instruct] ; [vision-instruct]

Intended Uses

Primary Use Cases

The model is intended for broad commercial and research use in English. The model provides uses for general purpose AI systems and applications with visual and text input capabilities which require:

  1. Memory/compute constrained environments
  2. Latency bound scenarios
  3. General image understanding
  4. Optical character recognition
  5. Chart and table understanding
  6. Multiple image comparison
  7. Multi-image or video clip summarization

Our model is designed to accelerate research on language and multimodal models, for use as a building block for generative AI powered features.

Use Case Considerations

Our models are not specifically designed or evaluated for all downstream purposes. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fariness before using within a specific downstream use case, particularly for high risk scenarios. Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case.

Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under.

Release Notes

In this release, the model enables multi-frame image understanding and reasoning which is based on valuable customer feedback. The hero example multi-frame capabilities include detailed image comparison, multi-image summarization/storytelling and video summarization, which have broad applications in Office scenarios. We also observed performance improvement on most single image benchmarks, e.g., boost MMMU performance from 40.2 to 43.0, MMBench performance from 80.5 to 81.9, document understanding benchmark TextVQA from 70.9 to 72.0. We believe most use cases will benefit from this release, but we encourage users to test the new model in their AI applications. We appreciate the enthusiastic adoption of the Phi-3 model family and continue to welcome all the feedback from the community.

Below are the comparison results on existing multi-image benchmarks. On average, our model outperforms competitor models on the same size and competitive with much bigger models on multi-frame capabilities and video summarization.

BLINK: a benchmark with 14 visual tasks that humans can solve very quickly but are still hard for current multimodal LLMs.

Benchmark Phi-3.5-vision-instruct LlaVA-Interleave-Qwen-7B InternVL-2-4B InternVL-2-8B Gemini-1.5-Flash GPT-4o-mini Claude-3.5-Sonnet Gemini-1.5-Pro GPT-4o
Art Style 87.2 62.4 55.6 52.1 64.1 70.1 59.8 70.9 73.3
Counting 54.2 56.7 54.2 66.7 51.7 55.0 59.2 65.0 65.0
Forensic Detection 92.4 31.1 40.9 34.1 54.5 38.6 67.4 60.6 75.8
Functional Correspondence 29.2 34.6 24.6 24.6 33.1 26.9 33.8 31.5 43.8
IQ Test 25.3 26.7 26.0 30.7 25.3 29.3 26.0 34.0 19.3
Jigsaw 68.0 86.0 55.3 52.7 71.3 72.7 57.3 68.0 67.3
Multi-View Reasoning 54.1 44.4 48.9 42.9 48.9 48.1 55.6 49.6 46.6
Object Localization 49.2 54.9 53.3 54.1 44.3 57.4 62.3 65.6 68.0
Relative Depth 69.4 77.4 63.7 67.7 57.3 58.1 71.8 76.6 71.0
Relative Reflectance 37.3 34.3 32.8 38.8 32.8 27.6 36.6 38.8 40.3
Semantic Correspondence 36.7 31.7 31.7 22.3 32.4 31.7 45.3 48.9 54.0
Spatial Relation 65.7 75.5 78.3 78.3 55.9 81.1 60.1 79.0 84.6
Visual Correspondence 53.5 40.7 34.9 33.1 29.7 52.9 72.1 81.4 86.0
Visual Similarity 83.0 91.9 48.1 45.2 47.4 77.8 84.4 81.5 88.1
Overall 57.0 53.1 45.9 45.4 45.8 51.9 56.5 61.0 63.2

Video-MME: comprehensively assess the capabilities of MLLMs in processing video data, covering a wide range of visual domains, temporal durations, and data modalities.

Benchmark Phi-3.5-vision-instruct LlaVA-Interleave-Qwen-7B InternVL-2-4B InternVL-2-8B Gemini-1.5-Flash GPT-4o-mini Claude-3.5-Sonnet Gemini-1.5-Pro GPT-4o
short (<2min) 60.8 62.3 60.7 61.7 72.2 70.1 66.3 73.3 77.7
medium (4-15min) 47.7 47.1 46.4 49.6 62.7 59.6 54.7 61.2 68.0
long (30-60min) 43.8 41.2 42.6 46.6 52.1 53.9 46.6 53.2 59.6
Overall 50.8 50.2 49.9 52.6 62.3 61.2 55.9 62.6 68.4

Usage

Requirements

The current transformers version can be verified with: pip list | grep transformers.

Examples of required packages:

flash_attn==2.5.8
numpy==1.24.4
Pillow==10.3.0
Requests==2.31.0
torch==2.3.0
torchvision==0.18.0
transformers==4.43.0
accelerate==0.30.0

Phi-3.5-vision-Instruct is also available in Azure AI Studio.

Input Formats

Given the nature of the training data, the Phi-3.5-vision model is best suited for prompts using the chat format as follows:

Single image:

<|user|>\n<|image_1|>\n{prompt}<|end|>\n<|assistant|>\n

Multi-turn conversations:

<|user|>\n<|image_1|>\n{prompt_1}<|end|>\n<|assistant|>\n{response_1}<|end|>\n<|user|>\n{prompt_2}<|end|>\n<|assistant|>\n

For multi-image usage, add multiple image placeholders in the front of the prompts. <|image_{}|> index should start from 1. One example of prompt is shown as follows:

<|user|>\n<|image_1|>\n<|image_2|>\n<|image_3|>\n<|image_4|>\n{prompt}<|end|>\n<|assistant|>\n 

Loading the model locally

After obtaining the Phi-3.5-vision-instruct model checkpoints, users can use this sample code for inference.

from PIL import Image 
import requests 
from transformers import AutoModelForCausalLM 
from transformers import AutoProcessor 

model_id = "microsoft/Phi-3.5-vision-instruct" 

# Note: set _attn_implementation='eager' if you don't have flash_attn installed
model = AutoModelForCausalLM.from_pretrained(
  model_id, 
  device_map="cuda", 
  trust_remote_code=True, 
  torch_dtype="auto", 
  _attn_implementation='flash_attention_2'    
)

# for best performance, use num_crops=4 for multi-frame, num_crops=16 for single-frame.
processor = AutoProcessor.from_pretrained(model_id, 
  trust_remote_code=True, 
  num_crops=4
) 

images = []
placeholder = ""

# Note: if OOM, you might consider reduce number of frames in this example.
for i in range(1,20):
    url = f"https://image.slidesharecdn.com/azureintroduction-191206101932/75/Introduction-to-Microsoft-Azure-Cloud-{i}-2048.jpg" 
    images.append(Image.open(requests.get(url, stream=True).raw))
    placeholder += f"<|image_{i}|>\n"

messages = [
    {"role": "user", "content": placeholder+"Summarize the deck of slides."},
]

prompt = processor.tokenizer.apply_chat_template(
  messages, 
  tokenize=False, 
  add_generation_prompt=True
)

inputs = processor(prompt, images, return_tensors="pt").to("cuda:0") 

generation_args = { 
    "max_new_tokens": 1000, 
    "temperature": 0.0, 
    "do_sample": False, 
} 

generate_ids = model.generate(**inputs, 
  eos_token_id=processor.tokenizer.eos_token_id, 
  **generation_args
)

# remove input tokens 
generate_ids = generate_ids[:, inputs['input_ids'].shape[1]:]
response = processor.batch_decode(generate_ids, 
  skip_special_tokens=True, 
  clean_up_tokenization_spaces=False)[0] 

print(response)

Notes:

  • to achieve best performances we suggest to set num_crops=4 for multi-frame and num_crops=16 for single-frame.
  • to turn off flash_attention users can set _attn_implementation='eager'

Responsible AI Considerations

Like other models, the Phi family of models can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include:

  • Quality of Service: The Phi models are trained primarily on English text. Languages other than English will experience worse performance. English language varieties with less representation in the training data might experience worse performance than standard American English.
  • Representation of Harms & Perpetuation of Stereotypes: These models can over- or under-represent groups of people, erase representation of some groups, or reinforce demeaning or negative stereotypes. Despite safety post-training, these limitations may still be present due to differing levels of representation of different groups or prevalence of examples of negative stereotypes in training data that reflect real-world patterns and societal biases.
  • Inappropriate or Offensive Content: These models may produce other types of inappropriate or offensive content, which may make it inappropriate to deploy for sensitive contexts without additional mitigations that are specific to the use case.
  • Information Reliability: Language models can generate nonsensical content or fabricate content that might sound reasonable but is inaccurate or outdated.
  • Limited Scope for Code: Majority of Phi-3 training data is based in Python and use common packages such as "typing, math, random, collections, datetime, itertools". If the model generates Python scripts that utilize other packages or scripts in other languages, we strongly recommend users manually verify all API uses.

Developers should apply responsible AI best practices and are responsible for ensuring that a specific use case complies with relevant laws and regulations (e.g. privacy, trade, etc.). Important areas for consideration include:

  • Allocation: Models may not be suitable for scenarios that could have consequential impact on legal status or the allocation of resources or life opportunities (ex: housing, employment, credit, etc.) without further assessments and additional debiasing techniques.
  • High-Risk Scenarios: Developers should assess suitability of using models in high-risk scenarios where unfair, unreliable or offensive outputs might be extremely costly or lead to harm. This includes providing advice in sensitive or expert domains where accuracy and reliability are critical (ex: legal or health advice). Additional safeguards should be implemented at the application level according to the deployment context.
  • Misinformation: Models may produce inaccurate information. Developers should follow transparency best practices and inform end-users they are interacting with an AI system. At the application level, developers can build feedback mechanisms and pipelines to ground responses in use-case specific, contextual information, a technique known as Retrieval Augmented Generation (RAG).
  • Generation of Harmful Content: Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case.
  • Misuse: Other forms of misuse such as fraud, spam, or malware production may be possible, and developers should ensure that their applications do not violate applicable laws and regulations.
  • Identification of individuals: models with vision capabilities may have the potential to uniquely identify individuals in images. Safety post-training steers the model to refuse such requests, but developers should consider and implement, as appropriate, additional mitigations or user consent flows as required in their respective jurisdiction, (e.g., building measures to blur faces in image inputs before processing).

Training

Models

Architecture: Phi-3.5-vision has 4.2B parameters and contains image encoder, connector, projector, and Phi-3 Mini language model.
Inputs: Text and Image. It’s best suited for prompts using the chat format.
Context length: 128K tokens
GPUs: 256 A100-80G
Training time: 6 days
Training data: 500B tokens (vision tokens + text tokens)
Outputs: Generated text in response to the input
Dates: Trained between July and August 2024
Status: This is a static model trained on an offline text dataset with cutoff date March 15, 2024. Future versions of the tuned models may be released as we improve models.
Release date: August 2024

Data Overview

Our training data includes a wide variety of sources, and is a combination of

  1. publicly available documents filtered rigorously for quality, selected high-quality educational data and code;
  2. selected high-quality image-text interleave data;
  3. newly created synthetic, “textbook-like” data for the purpose of teaching math, coding, common sense reasoning, general knowledge of the world (science, daily activities, theory of mind, etc.), newly created image data, e.g., chart/table/diagram/slides, newly created multi-image and video data, e.g., short video clips/pair of two similar images;
  4. high quality chat format supervised data covering various topics to reflect human preferences on different aspects such as instruct-following, truthfulness, honesty and helpfulness.

The data collection process involved sourcing information from publicly available documents, with a meticulous approach to filtering out undesirable documents and images. To safeguard privacy, we carefully filtered various image and text data sources to remove or scrub any potentially personal data from the training data. More details about data can be found in the Phi-3 Technical Report.

How to finetune?

We recommend user to take a look at the Phi-3 CookBook finetuning recipe for Vision

Benchmarks

To understand the capabilities, we compare Phi-3.5-vision with a set of models over a variety of zero-shot benchmarks using our internal benchmark platform. At the high-level overview of the model quality on representative benchmarks:

Category Benchmark Phi-3.5-vision-instruct Intern-VL-2-4B Intern-VL-2-8B Gemini-1.5-Flash GPT-4o-mini 2024-7-18 Claude-3.5-Sonnet Gemini-1.5-Pro GPT-4o 2024-5-13
Popular aggregated benchmark MMMU (val) 43.0 44.22 46.33 49.33 52.1 52.67 54.11 61.78
MMBench (dev-en) 81.9 83.4 87.0 85.7 83.8 82.3 87.9 88.4
Visual scientific knowledge reasoning ScienceQA (img-test) 91.3 94.9 95.9 84.5 84.0 73.8 86.0 88.5
Visual math reasoning MathVista (testmini) 43.9 53.7 51.1 55.3 38.8 54.0 57.4 54.4
InterGPS (test) 36.3 45.6 53.2 39.4 39.9 45.6 58.2 46.9
Chart reasoning AI2D (test) 78.1 77.3 81.4 78.4 75.2 68.9 75.6 82.8
ChartQA (test) 81.8 78.8 80.4 57.6 54.5 73.2 68.2 64.0
Document Intelligence TextVQA (val) 72.0 66.2 68.8 67.4 70.9 70.5 64.5 75.6
Object visual presence verification POPE (test) 86.1 83.3 84.2 86.1 83.6 76.6 89.3 87.0

Safety Evaluation and Red-Teaming

Approach The Phi-3 family of models has adopted a robust safety post-training approach. This approach leverages a variety of both open-source and in-house generated datasets. The overall technique employed to do the safety alignment is a combination of SFT (Supervised Fine-Tuning) and RLHF (Reinforcement Learning from Human Feedback) approaches by utilizing human-labeled and synthetic English-language datasets, including publicly available datasets focusing on helpfulness and harmlessness as well as various questions and answers targeted to multiple safety categories.

Safety Evaluation We leveraged various evaluation techniques including red teaming, adversarial conversation simulations, and safety evaluation benchmark datasets to evaluate Phi-3.5 models' propensity to produce undesirable outputs across multiple risk categories. Several approaches were used to compensate for the limitations of one approach alone. Please refer to the technical report for more details of our safety alignment.

Software

  • PyTorch
  • Transformers
  • Flash-Attention

Hardware

Note that by default, the Phi-3.5-Mini-Instruct model uses flash attention, which requires certain types of GPU hardware to run. We have tested on the following GPU types:

  • NVIDIA A100
  • NVIDIA A6000
  • NVIDIA H100

License

The model is licensed under the MIT license.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

Data Summary

https://huggingface.co/microsoft/Phi-3.5-vision-instruct/blob/main/data_summary_card.md

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:9276fb5e999411697e65605f27de5d36ede664fb&dn=microsoft_Phi-3.5-vision-instruct

Open magnet in torrent client · infohash 9276fb5e999411697e65605f27de5d36ede664fb

Files & hashes

PathSizesha1sha256
CODE_OF_CONDUCT.md444 B (444 B)f9ba8cf65f3e3104dd061c178066ec8247811f339daeae709a0bd71bcfd1c96dc5822ecec5210327eff929da64b0ae7f8faf1444
LICENSE1.1 KB (1,141 B)9e841e7a26e4eb057b24511e7b92d42b257a80e5c2cfccb812fe482101a8f04597dfc5a9991a6b2748266c47ac91b6a5aae15383
README.md18.4 KB (18,872 B)a72823aea78389863489cb9bbde9c5e0acbfca1d7df8e9b5ef76dbef1474b5c7ff81d5dcd420c287b71cb6c592d18f6e483fff29
SECURITY.md2.6 KB (2,656 B)b3c89efc852e22f71eabf5dfbc6ac62493425eb67b6976eec43edfa68b79a459dd089c56b7a395916dbf1a01bd11e6d86e12128f
SUPPORT.md1.2 KB (1,244 B)291d4d43733f4c15a81ff598ec1c99fd6c18f64c149773411caf2c59cb1a6bfb2c6f070d1d054f1f018e7a80be319a8c384eeaf5
config.json3.7 KB (3,778 B)d17800328ba8d16688e87fd95a3d6a6f851cc7db567e28c638a3e41aba1a304ae58b283845ad07e1c60e970643b0ad8fc229b382
configuration_phi3_v.py10.5 KB (10,712 B)e3affcbfa11f737f840d7f0f4b34153fd041509818ff44c5c1f9a6523184fb2e580e03ebf722a65f37b9cc57cd1a6d620a0f2666
data_summary_card.md4.3 KB (4,419 B)e4a09b73c45f9994f7a69d9d53c5f814a904386a032ef6f50fd7bc98b696a4778a46ea8ba09773031a7a5f591fd7280b0c476701
generation_config.json136 B (136 B)4db2e1bb076bed5ceb0ba1b5fc1a7b2d5c2329aebf86d2cd9250f89f09563b7f80e25e34663f673b836f531dc207362165051dc9
model-00001-of-00002.safetensors4.60 GB (4,944,122,112 B)c0ee902154b05703022358922e3f407592a011a2be7bdee601478b3560aeb7122fe87a7d68445bb21b5f1ca88a764e8530b3aab8
model-00002-of-00002.safetensors3.12 GB (3,349,208,776 B)783dc277eee259ae68d6a7ceec47a6f757c1f70a94621eca6936d7a2fb94bd90f37edb0e28850235e7ba2c5e20445d2fc56bcaed
model.safetensors.index.json67.3 KB (68,901 B)6b0eab0c79547e71df1cce9ffce0570a4e3e76a772d628080d85b3a0e96eac71a47f7a04a666aabf8a91269100c99a8d543f345c
modeling_phi3_v.py86.8 KB (88,866 B)f08fb1649b5d530c8a0ed1c74d8f379ddc50c096b223be7d7e9f01903dd8704e5da45c6030824134441aa2734c40c36597c3b41c
preprocessor_config.json442 B (442 B)5559abc31e77a754d6c876fc86878f7b6c6799860f3d920fcec587bb425312d30b0660e1fabaf46a75961f2b75ddbb1ff92de01c
processing_phi3_v.py21.5 KB (22,045 B)4a4109dd1c20e257e9fdc1e16071a0a9d66051de990ef3d1f6b5cc61b44cf8ec8e8886b19721b7e01e8bae3ebea32781b0fcf598
processor_config.json119 B (119 B)b9cdc63dde1bec3027ff85f7ea884603bb4fff50286a9e7fb58a489eae6825b79be69f62068c2028435c29ee52c3a485d071707b
sample_inference.py6.6 KB (6,778 B)1c8631abfdd72465afc08be3f989334f2b2b24c449b1246f2a18d9b4a1e12892e50d19929e550263075d4c80cedeac2246546da4
special_tokens_map.json670 B (670 B)0616f20a3af0830d0991f72c15c4f5e6d5dc02faf9535fada19315e0d8eb89521cebe111c008fee98d16e7c6744acfb50505d8c3
tokenizer.json1.8 MB (1,851,360 B)6a0986c7e1b01a58ff8cc31fc2d64ddd230fec7e493f8ad437be806d5ccdc57e91479bdbb0c656448c1b89ff70f7653530d78518
tokenizer_config.json9.3 KB (9,519 B)3c7b5bda28936460312aa5161c8ad08d583829fc581d4654c018fbcef2504b57a805dcad37126038137b5d25d22b5a02abc1ef29

Cite this release

Canonical URL
https://aiseedbank.org/models/microsoft_Phi-3.5-vision-instruct/
Slug
microsoft_Phi-3.5-vision-instruct
Infohash
9276fb5e999411697e65605f27de5d36ede664fb
License
mit
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: microsoft_Phi-3.5-vision-instruct.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositorymicrosoft/Phi-3.5-vision-instruct
Revision (pinned)12b77fb40b63a2c73c68243d3f767aab688a1b2a
Fetched at2026-09-04T02:16:00Z
License at fetchmit
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-04T02:17:18Z

mit7.73 GB (8,295,422,990 bytes)transformerssafetensorsphi3_vtext-generationnlpcodevisionimage-text-to-textconversationalcustom_codemultilingualpaper: 2404.14219