Skip to content

Invalid model uri when register model #3238

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

Open
1 of 3 tasks
usegitforwhat opened this issue Apr 12, 2025 · 4 comments
Open
1 of 3 tasks

Invalid model uri when register model #3238

usegitforwhat opened this issue Apr 12, 2025 · 4 comments
Labels
Milestone

Comments

@usegitforwhat
Copy link

System Info / 系統信息

windows 11 + docker

Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?

  • docker / docker
  • pip install / 通过 pip install 安装
  • installation from source / 从源码安装

Version info / 版本信息

1.4.1

The command used to start Xinference / 用以启动 xinference 的命令

docker run -e XINFERENCE_MODEL_SRC=modelscope -p 9998:9997 --gpus all xprobe/xinference:latest xinference-local -H 0.0.0.0 --log-level debug

Reproduction / 复现过程

The documentation states that model_uri is a string representing the model's source URI (e.g., 'file:///path/to/your_model'), and that Xinference will attempt to download from Hugging Face using the model ID if no URI is provided.

However, during new embedding model registration, the frontend requires model_uri to be filled. I'm unsure whether this is a bug or if I should input a specific URI to allow downloads from Hugging Face or Modelscope.

Expected behavior / 期待表现

Custom model can auto download from model hub.

@XprobeBot XprobeBot added the gpu label Apr 12, 2025
@XprobeBot XprobeBot added this to the v1.x milestone Apr 12, 2025
@qinxuye
Copy link
Contributor

qinxuye commented Apr 14, 2025

If registered custom model, no download is required, the model uri is required.

@usegitforwhat
Copy link
Author

If registered custom model, no download is required, the model uri is required.

Based on the documentation, if I leave the model URI field empty, it should automatically download from Hub. However, when I leave the "Model Path" box blank, I get the error: "Please fill in valid value for all fields." I assume the "Model Path" means "Model URI".

I then tried entering the path "/root/.xinference/cache/gte_Qwen2-1.5B-instruct", but received a server error: "400 - [address=0.0.0.0:49953, pid=55] Invalid model URI /root/.xinference/cache/gte_Qwen2-1.5B-instruct."

Interestingly, manually creating the directory "/root/.xinference/cache/gte_Qwen2-1.5B-instruct" resolves the path error, but I still can't launch or download the model. When attempting to launch, the logs show: "Unrecognized model in /root/.xinference/cache/gte_Qwen2-1.5B-instruct. Should have a model_type key in its config.json, or contain one of the following strings in its name:..."

It appears the system is attempting to load from local storage despite the documentation suggesting automatic downloads. How can I resolve this? Is manual downloading of the model files required for proper setup?

@qinxuye
Copy link
Contributor

qinxuye commented Apr 15, 2025

It's better to have a model weight already for custom models.

@usegitforwhat
Copy link
Author

Got it. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants