Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Extension Proposal] Huggingface Downloader extension #45278

Open
lordofthejars opened this issue Dec 24, 2024 · 7 comments
Open

[Extension Proposal] Huggingface Downloader extension #45278

lordofthejars opened this issue Dec 24, 2024 · 7 comments
Labels
area/quarkiverse This issue/PR is part of the Quarkiverse organization kind/extension-proposal Discuss and Propose new extensions

Comments

@lordofthejars
Copy link
Contributor

Description

I am unsure if this should be an extension, but the idea is to create an extension based on jgit that lets Quarkus users download models either programmatically or declaratively.

This is useful for projects like DJL that expect the model to be locally downloaded.

Repository name

quarkus-huggingface-downloader

Short description

Quarkusextension to download huggingface models

Repository Homepage URL

https://docs.quarkiverse.io/quarkus-huggingface-downloader/dev/

Repository Topics

  • quarkus-extension
  • huggingface
  • ai

Team Members

Additional context

No response

@lordofthejars lordofthejars added area/quarkiverse This issue/PR is part of the Quarkiverse organization kind/extension-proposal Discuss and Propose new extensions labels Dec 24, 2024
Copy link

quarkus-bot bot commented Dec 24, 2024

/cc @aloubyansky (extension-proposal), @gastaldi (extension-proposal), @gsmet (extension-proposal), @maxandersen (extension-proposal)

@gastaldi
Copy link
Contributor

Sounds like it could be a CLI extension (or a JBang script)? Not sure how useful would that be for a standalone Quarkiverse extension

@lordofthejars
Copy link
Contributor Author

Well, the thing is that a user might need to do this programmatically. I know it is not the same but think like Flyway for DBs. You bootup the app and check if you want to apply a DB migration, this would be something similar, you bootup the app, check if the local model is there/updated, and update if necessary.

While I write this, I see that it can be a more complex extension that I though as we could control the versions, tags and so on, and update the model accordantly following some kind of name convention as in Flyway.

Well again, I don't know if this could have the entity of an extension, for this reason I raised the question :)

@geoand
Copy link
Contributor

geoand commented Dec 31, 2024

I am not opposed to this, but I think we need to answer the following questions:

  • Does it really need to be an extension? If so, why?
  • If it does make sense to have an extension, should it be standalone, or could it be part of Quarkus LangChain4j?

@lordofthejars
Copy link
Contributor Author

Hi, yes, I don't know where it should be; I have seen that it is not as simple as I thought because of LFS. In theory jgit supports LFS natively in Java or using git lfs. Using the git lfs support works, but when trying to use the native LFS in Java, it is not working, there is no documentation at all, and what I do all the time is find tests to try to make it work, now without much success. So, long story short, it seems that it would be interesting to have this code somewhere.

@maxandersen
Copy link
Member

Huggingface has a rest API - can't that be used?

Btw. Just downloading it is just part of it - other is having it put a place where tbe LLM runtime will read it from...ollama, Jlama, podman ai currently read from different locations.

What's your thoughts there ?

@lordofthejars
Copy link
Contributor Author

I know I can query a repo using a Rest API but what I have not found is downloading the repo using a Rest API from HuggingFace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quarkiverse This issue/PR is part of the Quarkiverse organization kind/extension-proposal Discuss and Propose new extensions
Projects
None yet
Development

No branches or pull requests

4 participants