Android inference: add Phi-4-mini-reasoning on LiteRT-LM - #583
Open
Daisuke Majima (MLBoy) (john-rocky) wants to merge 1 commit into
Open
Android inference: add Phi-4-mini-reasoning on LiteRT-LM#583Daisuke Majima (MLBoy) (john-rocky) wants to merge 1 commit into
Daisuke Majima (MLBoy) (john-rocky) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for keeping the per-platform inference pages. This adds one section to
md/01.Introduction/03/Android_Inference.mdfor LiteRT-LM, Google AI Edge's on-device LLM runtime, next to the existing Ollama, LlamaEdge and MLC Chat options. The linked bundle is my int4 conversion of Phi-4-mini-reasoning, hosted in Google's litert-community org.litert-lm benchmarkon an Apple M4 Max: 19.8 tok/s decode on CPU, 82.8 tok/s on the Metal GPU; Raspberry Pi 5 CPU rows are on the card.translations/is left to the localization bot.Card: https://huggingface.co/litert-community/Phi-4-mini-reasoning — runtime: https://github.com/google-ai-edge/LiteRT-LM
Happy to reword or move the section wherever it fits the cookbook. Thanks again.
One data point behind this section, in case it's useful.
In a small test I ran, coding agents building on-device apps shortlisted Phi in 6 of 12 runs and chose it in none, for one reason each time: at 3.8B it was too big for the speed they wanted. What none of the six notes had was a phone speed for a 3.8B model.
Their own notes: “viable but larger download and less commonly used in the MLX ecosystem; skipped to keep the comparison space small” (Sonnet, on Phi-3.5-mini); the other five said the same in terms of decode speed or download size. The setup: three agents (Claude Fable 5.1, Claude Sonnet 5, Codex with GPT-5.5), ten on-device app tasks each, no hint about which model or runtime to use, and each agent wrote down its choice and reason before coding. I ran it to see how agents treat the models I convert.
The card this section links has that number now: 13.1 tok/s decode on a Galaxy S26, GPU backend (8.4 tok/s on its CPU), and 6.8 tok/s on a Pixel 8a, both over a 511-token prompt and 256 generated tokens. Whether a cookbook section changes a shortlist, I don't know from 30 runs.
I repeat the run monthly. If this lands, I'll post here what the agents pick next time, whichever way it goes. Nothing is needed from you for that. Thanks again.