Skip to content

Conversation

tf-marissaw
Copy link
Contributor

Track LiteRT files (.tflite) and add an additional supported LiteRT LM format for tracking as well.

@Wauplin
Copy link
Contributor

Wauplin commented Sep 23, 2025

Hi @tf-marissaw, from what I understood from previous discussions, .task files are the legacy file extension for LiteRT-LM, correct? I prefer not to add custom rules for them as the filename is very generic compared to the more recent .litertlm.

Regarding tracking .tflite files, this is already done with a server-side custom logic. In practice, all repos with a .tflite file is automatically tagged as tflite and download are correctly tracked (see https://huggingface.co/models?library=tflite). Having server-side custom logic is not something we want to encourage in the future, but we kept this one for historical reasons.

Therefore I don't think there is anything to change here regarding tflite / litert-lm. Hope that finds you well and let me know if you have any questions :)

@tf-marissaw
Copy link
Contributor Author

Thank for your quick response! Our previous HuggingFace maintainer left so I have some catching up to do. I apologize if you have answered these questions previously.

For the .task files, we believe that they are still actively used so we would like them to be tracked. We don't expect to publish new models with .task but it is the main file format for an older API: MediaPipe LLM Inference API. LiteRT LM is an open source successor to this older API. Would it be appropriate for us instead to add a "MediaPipe LLM Inference API" that tracks .task instead?

It is great to hear that .tflite is already tracked! It is of course used by our classical TFLite Runtime but also by our newer LiteRT runtime. We don't want to disrupt any existing .tflite models for other users. However, we would like the ability to show on our litert-community page a "Use this model" > "Library" option for LiteRT. We have it for LiteRT LM presumably from updating "packages/tasks/src/model-libraries.ts". How do you recommend we achieve this for LiteRT given that .tflite is tracked differently?

@lu-wang-g
Copy link

Gentle ping. Any updates, @Wauplin?

@tf-marissaw
Copy link
Contributor Author

Any advice @Wauplin ?

@Wauplin
Copy link
Contributor

Wauplin commented Oct 14, 2025

Hey there 👋 Sorry for the very long delay. So now that I'm getting back to it I have a few questions:

For the .task files, we believe that they are still actively used so we would like them to be tracked. We don't expect to publish new models with .task but it is the main file format for an older API: MediaPipe LLM Inference API.

Do you have a example of such repos for which you think the .task is actively used? Would it be possible to upgrade them to the newer version?

. However, we would like the ability to show on our litert-community page a "Use this model" > "Library" option for LiteRT. We have it for LiteRT LM presumably from updating "packages/tasks/src/model-libraries.ts". How do you recommend we achieve this for LiteRT given that .tflite is tracked differently?

Ok so indeed this is correct and will lead to the same result as what it is now.
So if I understand correctly, the goal of this PR is to add litert as a library on the Hub (which is a subpart of the repos containing a tflite file) and then in a follow-up PR you'll add the code snippets for the "use this model" section? If that's the case, then I definitely agree with this PR! :)

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get it merged! Sorry again for the delay.

I should expect a follow up PR to update the snippets section next, right? 🤗

repoUrl: "https://github.com/google-ai-edge/LiteRT-LM",
filter: false,
countDownloads: `path_extension:"litertlm"`,
countDownloads: `path_extension:"litertlm"` OR `path_extension:"task"`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found an example: https://huggingface.co/litert-community/Gemma3-1B-IT/tree/main

Ok so in that case I believe it's fine to count .task files as well. We won't auto-tag repos based on that file but it's ok to track downloads using it.

Track LiteRT files (.tflite) and add an additional supported
LiteRT LM format for tracking as well.
@tf-marissaw
Copy link
Contributor Author

tf-marissaw commented Oct 14, 2025

Ok so indeed this is correct and will lead to the same result as what it is now.
So if I understand correctly, the goal of this PR is to add litert as a library on the Hub (which is a subpart of the repos containing a tflite file) and then in a follow-up PR you'll add the code snippets for the "use this model" section? If that's the case, then I definitely agree with this PR! :)

I should expect a follow up PR to update the snippets section next

Yes! For LiteRT (with .tflite files) and LiteRT LM (with .literlm and .task files).

Let's get it merged!

I've rebased my cl. Is there anything else that I need to do from my side? This is my first time submitting here so my apologies if I have forgotten anything else that is important.

@Wauplin Wauplin merged commit d24115c into huggingface:main Oct 15, 2025
4 checks passed
@Wauplin
Copy link
Contributor

Wauplin commented Oct 15, 2025

Few lints errors to fix but we're all good now. Expect it to be live on the Hub in the next days 🤗

Looking forward for the PR to update snippets :) Let me know if you need any pointers

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants