Skip to content

can we convert existing quantized tflite files to LiteRT AOT ones? #1147

Open

Description

@freedomtan

FYI, as May 29th, 2026 Taiwan Time.

model name compiled
Mobilenet V4 only works for Q SoCs
MobileDET works for G, Q, and most of M (except MT6893 and MT6895)
Mobile Segmenter works for G, Q, and most of M
Mobile BERT works for G and Q
EDSR G (except G6) and Q

Nope, I didn't try to run them. Only tried to convert/compile them.

Colab notebook I used, https://colab.research.google.com/drive/1aJCNhaq5QS-UTb5nXaWnkUueXFRNR7Ow?usp=sharing

Activity

  1. changed the title [-]can we convert existing tflite files to LiteRT AOT ones?[/-] [+]can we convert existing quantized tflite files to LiteRT AOT ones?[/+] on Jun 2, 2026
  2. freedomtan commented on Jun 16, 2026

    @freedomtan
    ContributorAuthor

    I did try the converted models on Pixel 10 Pro. They work to some extent (I won't say great, because performance numbers are much lower than I expected).

  3. freedomtan commented on Jun 16, 2026

    @freedomtan
    ContributorAuthor

    all ops will be wrapped into a single op called DISPATCH op.

    @freedomtan to share numbers on Pixel 10 Pro.

  4. freedomtan commented on Jun 17, 2026

    @freedomtan
    ContributorAuthor

    the 6.0 app on Pixel 9 and 10 Po.

    Pixel 9 Pixel 10
    Image Image

    As you can see, Pixel 10 numbers are clear worse than Pixel 10. It's clear that he MobilerBERT on Pixel 10 fell back to CPU.

    With benchmark_model for tflite and benchmark_model for litert, we can get

    unit: ms

    api mobilenetv4 mobiledet mobilebert mosaic edsr
    tflite NNAPI delegate 5.03 8.04 N/A 14.13 22.38
    litert CompiledModel N/A 31.02 9.10 10.84 81.98

    LiteRT numbers on Pixel 10 are not better than TFLite + NNAPI.

  5. Mostelk commented on Jun 18, 2026

    @Mostelk
    Contributor

    @freedomtan can you point us to the CL apk you are testing with

  6. freedomtan commented on Jun 18, 2026

    @freedomtan
    ContributorAuthor

    @freedomtan can you point us to the CL apk you are testing with

    I usedbenchmark_model.

  7. freedomtan commented on Jun 23, 2026

    @freedomtan
    ContributorAuthor

    unit: ms

    api mobilenetv4 mobiledet mobilebert mosaic edsr
    tflite NNAPI delegate 5.03 8.04 N/A 14.13 22.38
    litert CompiledModel N/A 31.02 9.10 10.84 81.98
    litert CompilerModel JIT N/A 8.79 11.24 2.43 24.06

    Google provided Android 17 for Pixel devices, with that, we can have JIT work.

  8. freedomtan commented on Jun 23, 2026

    @freedomtan
    ContributorAuthor

    @freedomtan to try if we can make Samsung's AOT work with samsung pip wheel.

    !pip install ai-edge-litert-sdk-samsung-nightly
    
  9. freedomtan commented on Jun 29, 2026

    @freedomtan
    ContributorAuthor

    @freedomtan to try if we can make Samsung's AOT work with samsung pip wheel.

    !pip install ai-edge-litert-sdk-samsung-nightly
    

    With this, I could compile/convert the MOSAIC (all others failed).

  10. freedomtan commented on Aug 18, 2026

    @freedomtan
    ContributorAuthor
  11. freedomtan commented on Oct 22, 2026

    @freedomtan
    ContributorAuthor

    I revisited model conversion just now, https://colab.research.google.com/drive/1XV39i6LhaDktMyie8HOQLLu38UgLCpW6?usp=sharing

    with ai-edge-litert-nightly and ai-edge-litert-sdk-*-nightly

    model name compiled
    Mobilenet V4 works for Q and most of M
    MobileDET works for G, Q, and most of M
    Mobile Segmenter works for G, Q, and most of M
    Mobile BERT works for G, Q, and most of M
    EDSR works for G, Q, and most of M

    Both Google's and MediaTek's supports for compiled_model are improved.

    @Mostelk for your reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions