-
Notifications
You must be signed in to change notification settings - Fork 239
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
Refine model file download for python backend #526
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
I'm sorry but I do not understand, how does it downloads 2 models ? I cannot reproduce on my side. Can you provide steps to reproduce, it seems the candle backend properly downloads only 1 model. Propagating |
Steps to re-produce on CPU:
|
I can now reproduce. The trust-remote-code behavior of this model is suprising to me, looking into what's going on. |
Thanks for surfacing this, discussing internally we figured there are some security implications of this behavior, which we're most likely going to close, so this behavior will go away (and force every repo to own their own remote code, so that trust_remote_code cannot be abused as much). Before we're going through with this, we're trying to figure out the implications, are you aware of other models with that behavior ? |
I found out that https://huggingface.co/mims-harvard/ToolRAG-T1-GTE-Qwen2-1.5B uses the The following filter may not be fully accurate, but may help https://huggingface.co/models?other=custom_code,text-embeddings-inference&sort=trending |
I have not met other models with this unexpected behavior. But these three I listed above are in TEI README part. Our customers are asking support for these 3 models: |
For models like jinaai/jina-embeddings-v2-base-code, Rust side will download 2 separate directories
models--jinaai--jina-embeddings-v2-base-code/
andmodels--jinaai--jina-bert-v2-qk-post-norm/
, while existing implementation only pass 1 Path to python backend. This PR refines model file download so that we can run models below using python backend: