SuperAPI AI Directory

Phi-3.5 - Microsoft's new generation of AI models, mini, MoE hybrid, and vision models

Author: AI小集 · Original source: AI工具集

What is Phi-3.5

Phi-3.5 is a new generation AI model series released by Microsoft, including three versions: Phi-3.5-mini-instruct, Phi-3.5-MoE-instruct, and Phi-3.5-vision-instruct, designed respectively for lightweight inference, mixture-of-experts systems, and multimodal tasks. Phi-3.5 uses the MIT open-source license, has different parameter scales, supports a 128k context length, optimizes multilingual processing and multi-turn dialogue capabilities, and outperforms similar models such as GPT4o, Llama 3.1, and Gemini Flash in benchmark tests.

Performance evaluation and feature highlights of the Phi-3.5 series models

  • Phi-3.5-mini-instruct 
    • Parameter count: Phi-3.5-mini-instruct has approximately 3.82 billion parameters.
    • Design purpose: This model is designed to follow instructions and supports fast inference tasks.
    • Context support: Supports a context length of 128k tokens, suitable for processing long text data.
    • Use cases: Suitable for environments with limited memory or computing resources, and can perform tasks such as code generation, mathematical problem solving, and logic-based reasoning.
    • Performance: Performs excellently in multilingual and multi-turn dialogue tasks, and in the RepoQA benchmark, its performance in measuring "long-context code understanding" surpasses other similar-sized models, such as Llama-3.1-8B-instruct and Mistral-7B-instruct.
    • Training details: Used 512 H100-80G GPUs, trained on 3.4 trillion tokens in 10 days.
  • Phi-3.5-MoE-instruct
    • Parameter count: Phi-3.5-MoE-instruct has approximately 41.9 billion parameters.
    • Architecture features: This model adopts a mixture-of-experts architecture, combining multiple different types of models into one, with each model specializing in different tasks.
    • Context support: Supports a context length of 128k tokens, suitable for handling complex multilingual and multi-task scenarios.
    • Performance: Performs excellently in code, mathematics, and multilingual understanding, and in specific benchmark tests usually outperforms large models, including excellent performance in the RepoQA benchmark.
    • Multi-task capability: In the 5-shot MMLU (Massive Multitask Language Understanding) benchmark, it surpasses GPT-40 mini at different levels across multiple disciplines such as STEM, humanities, and social sciences.
    • Training details: Used 512 H100-80G GPUs, trained on 4.9 trillion tokens in 23 days.
  • Phi-3.5-vision-instruct
    • Parameter count: Phi-3.5-vision-instruct has approximately 4.15 billion parameters.
    • Feature integration: This model integrates text and image processing capabilities, enabling it to handle multimodal data.
    • Applicable tasks: Particularly suitable for tasks such as general image understanding, optical character recognition (OCR), chart and table understanding, and video summarization.
    • Context support: Supports a context length of 128k tokens, allowing the model to manage complex multi-frame visual tasks.
    • Training data: The model is trained using synthetic datasets and filtered public datasets, with a focus on high-quality, reasoning-intensive data.
    • Training details: Used 256 A100-80G GPUs and trained 500 billion tokens in 6 days.

Phi-3.5 project address

How to use Phi-3.5

  • Environment preparation: Ensure that the development environment meets the hardware and software requirements needed to run the model, such as the Python environment, necessary libraries, and frameworks.
  • Obtain the model: Visit the Hugging Face model library for the Phi-3.5 model and download the model code.
  • Install dependencies: According to the model documentation, install the required dependency libraries, such as the Transformers library, PyTorch, or TensorFlow.
  • Load the model: Use an API or code snippet to load the Phi-3.5 model. For example, if using Hugging Face's Transformers library, you can use the model's name or path to load the model.
  • Data processing: Prepare the input data and preprocess it according to the model's requirements, such as tokenization and encoding.
  • Model configuration: Configure model parameters according to the application scenario, such as setting the context length and selecting a specific task configuration.
  • Execute tasks: Use the model to perform the required tasks, such as text generation, question answering, text classification, etc.

Application scenarios of Phi-3.5

  • Phi-3.5-mini-instruct: A compact and efficient AI model, suitable for fast text processing and code generation in embedded systems and mobile applications.
  • Phi-3.5-MoE-instruct: A mixture-of-experts model that provides deep reasoning for data analysis and multilingual text, suitable for interdisciplinary research and professional fields.
  • Phi-3.5-vision-instruct: Advanced multimodal processing capabilities, suitable for automatic image annotation, video surveillance, and in-depth analysis of complex visual data.