Downloads · 30 days
15K
11% of all-time downloads
litert-community/Phi-4-mini-instruct
Phi-4-mini-instruct is a text generation model from litert-community. Use it when you need the model to write or continue text. It is set up for litert-lm. The card lists the license as mit.
This model provides a few variants of microsoft/Phi-4-mini-instruct that are ready for deployment on Android using the LiteRT (fka TFLite) stack, MediaPipe LLM Inference API and
Downloads · 30 days
15K
11% of all-time downloads
All-time downloads
135K
Public
Repo size
31.3 GB
Likes
20
Public
Click a slice to open those files.
.task11.8 GB · 43%
From the Hugging Face model README
This model provides a few variants of microsoft/Phi-4-mini-instruct that are ready for deployment on Android using the LiteRT (fka TFLite) stack, MediaPipe LLM Inference API and LiteRT-LM.
Disclaimer: The target deployment surface for the LiteRT models is Android/iOS/Web and the stack has been optimized for performance on these targets. Trying out the system in Colab is an easier way to familiarize yourself with the LiteRT stack, with the caveat that the performance (memory and latency) on Colab could be much worse than on a local device.
Download or build the app from GitHub.
Install the app from Google Play.
Follow the instructions in the app.
To build the demo app from source, please follow the instructions from the GitHub repository.
Note that all benchmark stats are from a Samsung S24 Ultra with 1280 KV cache size with multiple prefill signatures enabled.
<table border="1"> <tr> <th>Backend</th> <th>Quantization scheme</th> <th>Context length</th> <th>Prefill (tokens/sec)</th> <th>Decode (tokens/sec)</th> <th>Time-to-first-token (sec)</th> <th>Model size (MB)</th> <th>Peak RSS Memory (MB)</th> <th>GPU Memory (MB)</th> </tr> <tr> <td><p style="text-align: right">CPU</td> <td><p style="text-align: right">dynamic_int8</td> <td><p style="text-align: right">4096</td> <td><p style="text-align: right">66.53 tk/s</p></td> <td><p style="text-align: right">7.28 tk/s</p></td> <td><p style="text-align: right">15.90 s</p></td> <td><p style="text-align: right">3906 MB</p></td> <td><p style="text-align: right">5308 MB</p></td> <td><p style="text-align: right">N/A</p></td> </tr> <tr> <td><p style="text-align: right">GPU</td> <td><p style="text-align: right">dynamic_int8</td> <td><p style="text-align: right">4096</td> <td><p style="text-align: right">314.01 tk/s</p></td> <td><p style="text-align: right">10.39 tk/s</p></td> <td><p style="text-align: right">10.32 s</p></td> <td><p style="text-align: right">3906 MB</p></td> <td><p style="text-align: right">4107 MB</p></td> <td><p style="text-align: right">4608 MB</p></td> </tr> </table>