litert-community/Phi-4-mini-instruct

This model provides a few variants of microsoft/Phi-4-mini-instruct that are ready for deployment on Android using the LiteRT stack and MediaPipe LLM Inference API.

Use the models

Colab

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.

Open In Colab

Android

  • Download and install the apk.
  • Follow the instructions in the app.

To build the demo app from source, please follow the instructions from the GitHub repository.

Performance

Android

Note that all benchmark stats are from a Samsung S24 Ultra with 1280 KV cache size, 512 tokens prefill, 128 tokens decode on CPU.

Prefill (tokens/sec) Decode (tokens/sec) Time-to-first-token (sec) Memory (RSS in MB) Model size (MB)

dynamic_int8

80

23

2

6,884

3,940

  • Model Size: measured by the size of the .tflite flatbuffer (serialization format for LiteRT models)
  • Memory: indicator of peak RAM usage
  • The inference is run on CPU is accelerated via the LiteRT XNNPACK delegate with 4 threads
  • Benchmark is done assuming XNNPACK cache is enabled
  • dynamic_int8: quantized model with int8 weights and float activations.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for litert-community/Phi-4-mini-instruct

Finetuned
(8)
this model