Phi-3.5-mini-instruct: Optimized for Mobile Deployment
State-of-the-art large language model useful on a variety of language understanding and generation tasks
Phi-3.5-mini is a lightweight, state-of-the-art open model built upon datasets used for Phi-3 - synthetic data and filtered publicly available websites - with a focus on very high-quality, reasoning dense data. The model belongs to the Phi-3 model family and supports 128K token context length. The model underwent a rigorous enhancement process, incorporating both supervised fine-tuning, proximal policy optimization, and direct preference optimization to ensure precise instruction adherence and robust safety measures.
This model is an implementation of Phi-3.5-mini-instruct found here.
More details on model performance across various devices, can be found here.
Model Details
- Model Type: Text generation
- Model Stats:
- Input sequence length for Prompt Processor: 128
- Context length: 4096
- Number of parameters: None
- Precision: w4a16 + w8a16 (few layers)
- Num of key-value heads: 8
- Information about the model parts: Prompt Processor and Token Generator are split into 4 parts each. Each corresponding Prompt Processor and Token Generator part share weights.
- Prompt processor model size: 2.16 GB
- Token generator model size: 2.16 GB
- Use: Initiate conversation with prompt-processor and then token generator for subsequent iterations.
- Supported languages: English, Arabic, Chinese, Dutch, French, German, Italian, Russian, Spanish, Ukranian
- Minimum QNN SDK version required: 2.28.2
- TTFT: Time To First Token is the time it takes to generate the first response token. This is expressed as a range because it varies based on the length of the prompt. The lower bound is for a short prompt (up to 128 tokens, i.e., one iteration of the prompt processor) and the upper bound is for a prompt using the full context length (4096 tokens).
- Response Rate: Rate of response generation after the first response token.
Model | Device | Chipset | Target Runtime | Response Rate (tokens per second) | Time To First Token (range, seconds) |
---|---|---|---|---|---|
Phi-3.5-mini-instruct | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 | QNN | 13.01 | 0.1469056 - 4.7009792 |
Phi-3.5-mini-instruct | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 6.2 | 0.185833 - 5.946656 |
Phi-3.5-mini-instruct | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite | QNN | 14.73 | 0.1195948 - 3.8270336 |
Deploying Phi-3.5-mini-instruct on-device
Please follow the LLM on-device deployment tutorial.
License
- The license for the original implementation of Phi-3.5-mini-instruct can be found here.
- The license for the compiled assets for on-device deployment can be found here
References
- Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone
- Source Model Implementation
Community
- Join our AI Hub Slack community to collaborate, post questions and learn more about on-device AI.
- For questions or feedback please reach out to us.
Usage and Limitations
Model may not be used for or in connection with any of the following applications:
- Accessing essential private and public services and benefits;
- Administration of justice and democratic processes;
- Assessing or recognizing the emotional state of a person;
- Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
- Education and vocational training;
- Employment and workers management;
- Exploitation of the vulnerabilities of persons resulting in harmful behavior;
- General purpose social scoring;
- Law enforcement;
- Management and operation of critical infrastructure;
- Migration, asylum and border control management;
- Predictive policing;
- Real-time remote biometric identification in public spaces;
- Recommender systems of social media platforms;
- Scraping of facial images (from the internet or otherwise); and/or
- Subliminal manipulation