[GH-ISSUE #9178] Using local models with huggingface autotokenizer #52488

Closed
opened 2026-04-28 23:26:15 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Bgfreek on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9178

Hi everyone,

I am trying to run vanilj/phi-4-unsloth:latest which I downloaded using ollama via "ollama run (model name)".

I am running ollama on a Ubuntu distribution via WSL. I also mapped the network to a drive so now the drive that Ubuntu is running on is "Z:"

When I call the models I do it:

  1. LOCAL_MODEL_BASE_PATH = r"Z:/usr/....../manfests/registry.ollama.ai/" (I do this to provide the default path to all the models)

  2. DEFAULT_SUMMARIZATION_MODEL_ID = r"vanilj/phi-4-unsloth/latest" (I duse different models for different tasks by adding only the endigs to access models where needed)

Now I am trying to access the local models but I get two errors:

  1. Incorrect path_or_model_id: 'vanilj/phi-4-unsloth:latest'. Please provide either the path to a local folder or the repo_id of a model on the Hub.

  2. huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'vanilj/phi-4-unsloth:latest'.

Thank you for your time in advance!

Originally created by @Bgfreek on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9178 Hi everyone, I am trying to run vanilj/phi-4-unsloth:latest which I downloaded using ollama via "ollama run (model name)". I am running ollama on a Ubuntu distribution via WSL. I also mapped the network to a drive so now the drive that Ubuntu is running on is "Z:" When I call the models I do it: 1. LOCAL_MODEL_BASE_PATH = r"Z:/usr/....../manfests/registry.ollama.ai/" (I do this to provide the default path to all the models) 2. DEFAULT_SUMMARIZATION_MODEL_ID = r"vanilj/phi-4-unsloth/latest" (I duse different models for different tasks by adding only the endigs to access models where needed) Now I am trying to access the local models but I get two errors: 1. Incorrect path_or_model_id: 'vanilj/phi-4-unsloth:latest'. Please provide either the path to a local folder or the repo_id of a model on the Hub. 2. huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'vanilj/phi-4-unsloth:latest'. Thank you for your time in advance!
Author
Owner

@rick-github commented on GitHub (Feb 17, 2025):

ollama doesn't save the models in the same format as HF. If you examine the manifest (.../manfests/registry.ollama.ai/vanilj/phi-4-unsloth/latest) you will see the blob identifier. If it was going to work, you need to use the path to that file (.../blobs/sha256-xxxxxxxxxxx). I don't know if that will be enough because the model will be quantized and your framework may not accept it.

<!-- gh-comment-id:2663976087 --> @rick-github commented on GitHub (Feb 17, 2025): ollama doesn't save the models in the same format as HF. If you examine the manifest (`.../manfests/registry.ollama.ai/vanilj/phi-4-unsloth/latest`) you will see the blob identifier. If it was going to work, you need to use the path to that file (`.../blobs/sha256-xxxxxxxxxxx`). I don't know if that will be enough because the model will be quantized and your framework may not accept it.
Author
Owner

@Bgfreek commented on GitHub (Feb 18, 2025):

Thank you very much for your reply!

Indeed, agreed. I was wondering if there was any way to do this but it seems that the only way to accomplish the goal is to host a model from huggingface locally and only call the llm for text/prompt based work.

<!-- gh-comment-id:2665710013 --> @Bgfreek commented on GitHub (Feb 18, 2025): Thank you very much for your reply! Indeed, agreed. I was wondering if there was any way to do this but it seems that the only way to accomplish the goal is to host a model from huggingface locally and only call the llm for text/prompt based work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52488