Cannot Add Huggingface Models #5376

Closed
opened 2026-02-21 18:10:40 -05:00 by yindo · 3 comments
Owner

Originally created by @taowang1993 on GitHub (Sep 4, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.7.3

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

I cannot add this model. Removed api key for posting the following image.
image

https://huggingface.co/dunzhang/stella_en_1.5B_v5

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @taowang1993 on GitHub (Sep 4, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7.3 ### Cloud or Self Hosted Cloud, Self Hosted (Docker) ### Steps to reproduce I cannot add this model. Removed api key for posting the following image. <img width="1446" alt="image" src="https://github.com/user-attachments/assets/bdf51ac2-7f76-4d36-8c43-c3caca9b85cd"> https://huggingface.co/dunzhang/stella_en_1.5B_v5 ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:10:40 -05:00
yindo closed this issue 2026-02-21 18:10:40 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 4, 2024):

I found a similar issue that might be relevant to your problem:

  1. Support for text-embeddings-inference - This issue is closed and was last updated on August 04, 2024. It has no comments or solution.

  2. Error occurred when adding Doubao TEXT Embedding model - This issue is closed and was last updated on May 24, 2024. The suggested solution was to ensure that the 'tokens' and 'total_tokens' fields are included in the model configuration. The issue was fixed by this PR.

  3. 如何增加其他的embedding model呢? - This issue is closed and was last updated on August 30, 2023. The suggested solution was to use Xinference builtin models as Embedding models.

For your specific issue with adding the Hugging Face model "dunzhang/stella_en_1.5B_v5" for text embedding using the Hosted Inference API in Dify version 0.7.3, follow these steps:

  1. Ensure you have a Hugging Face account and obtain your API key from here.

  2. Verify that the model supports the Hosted Inference API by checking the model details page on Hugging Face. Look for the "Hosted inference API" section on the right side of the page.

  3. Configure the model in Dify:

    • Go to Settings > Model Provider > Hugging Face > Model Type.
    • Select "Hosted Inference API" for the Endpoint Type.
    • Enter your API Token (the API key obtained from Hugging Face).
    • Enter the model name "dunzhang/stella_en_1.5B_v5".

Here is a visual guide from the documentation:

Hosted Inference API Configuration

By following these steps, you should be able to add the "dunzhang/stella_en_1.5B_v5" model for text embedding in Dify using the Hosted Inference API [1][2][3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 4, 2024): <!-- Answer --> I found a similar issue that might be relevant to your problem: 1. [Support for text-embeddings-inference](https://github.com/langgenius/dify/issues/5382) - This issue is closed and was last updated on August 04, 2024. It has no comments or solution. 2. [Error occurred when adding Doubao TEXT Embedding model](https://github.com/langgenius/dify/issues/4550) - This issue is closed and was last updated on May 24, 2024. The suggested solution was to ensure that the 'tokens' and 'total_tokens' fields are included in the model configuration. The issue was fixed by [this PR](https://github.com/langgenius/dify/pull/4431). 3. [如何增加其他的embedding model呢?](https://github.com/langgenius/dify/issues/1051) - This issue is closed and was last updated on August 30, 2023. The suggested solution was to use [Xinference builtin models](https://github.com/xorbitsai/inference/blob/main/README.md#builtin-models) as Embedding models. For your specific issue with adding the Hugging Face model "dunzhang/stella_en_1.5B_v5" for text embedding using the Hosted Inference API in Dify version 0.7.3, follow these steps: 1. **Ensure you have a Hugging Face account** and obtain your API key from [here](https://huggingface.co/settings/tokens). 2. **Verify that the model supports the Hosted Inference API** by checking the model details page on Hugging Face. Look for the "Hosted inference API" section on the right side of the page. 3. **Configure the model in Dify**: - Go to `Settings > Model Provider > Hugging Face > Model Type`. - Select "Hosted Inference API" for the Endpoint Type. - Enter your API Token (the API key obtained from Hugging Face). - Enter the model name "dunzhang/stella_en_1.5B_v5". Here is a visual guide from the documentation: ![Hosted Inference API Configuration](https://docs.dify.ai/en/.gitbook/assets/image%20(23).png) By following these steps, you should be able to add the "dunzhang/stella_en_1.5B_v5" model for text embedding in Dify using the Hosted Inference API <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/model-configuration/hugging-face.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/model-configuration/hugging-face.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/model-configuration/hugging-face.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 6, 2024):

You should use models in this category

@crazywoola commented on GitHub (Sep 6, 2024): You should use models in this [category](https://huggingface.co/models?pipeline_tag=feature-extraction&sort=trending)
Author
Owner

@holyvslin commented on GitHub (Dec 19, 2024):

1.Choose model in Huggingface
https://huggingface.co/models?pipeline_tag=text-generation&sort=trending
image

2.Add Models in Dify
Settings > Model Provider > Hugging Face > Model Type
image

Stuck in adding Huggingface Models, but solved by grant permission of Huggingface Access Tokens:
https://huggingface.co/settings/tokens Edit Access Token Permissions
Repositories -> select all
Inference -> select all
image

  1. Add successfully
    image
@holyvslin commented on GitHub (Dec 19, 2024): 1.Choose model in Huggingface https://huggingface.co/models?pipeline_tag=text-generation&sort=trending ![image](https://github.com/user-attachments/assets/ccc8798e-a226-439d-a980-fb05916bb186) 2.Add Models in Dify Settings > Model Provider > Hugging Face > Model Type ![image](https://github.com/user-attachments/assets/6fcc9055-aa1c-4f43-bf87-918f63c31187) **Stuck in adding Huggingface Models**, but solved by grant permission of Huggingface Access Tokens: https://huggingface.co/settings/tokens Edit Access Token Permissions **Repositories** -> select all **Inference** -> select all ![image](https://github.com/user-attachments/assets/39caf9d6-8607-4b46-a393-599645b683fd) 3. Add successfully ![image](https://github.com/user-attachments/assets/288432cf-d74b-46d5-b28a-9c5106a5c475)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5376