[GH-ISSUE #5430] Unable to load model because of incorrect model path #65436

Closed
opened 2026-05-03 21:16:55 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @whichxjy on GitHub (Jul 2, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5430

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

After downloading model with ollama pull llama3, calling API POST /api/chat with ollama serve running would get this error:

model 'llama3' not found, try pulling it first

related issue: #3876

Problem:

  • When I run ollama pull llama3, the OLLAMA_MODELS env is not set. Then this model path is /usr/share/ollama/.ollama/models.

  • But when I run ollama serve, the OLLAMA_MODELS env would be ~/.ollama/models. Because of that, calling POST /api/chat could not find the model downloaded before.

I solved it when I set OLLAMA_MODELS to /usr/share/ollama/.ollama/models when running ollama serve.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.1.48

Originally created by @whichxjy on GitHub (Jul 2, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5430 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? After downloading model with `ollama pull llama3`, calling API `POST /api/chat` with `ollama serve` running would get this error: `model 'llama3' not found, try pulling it first` > related issue: #3876 Problem: - When I run `ollama pull llama3`, the `OLLAMA_MODELS` env is not set. Then this model path is `/usr/share/ollama/.ollama/models`. - But when I run `ollama serve`, the `OLLAMA_MODELS` env would be `~/.ollama/models`. Because of that, calling `POST /api/chat` could not find the model downloaded before. I solved it when I set `OLLAMA_MODELS` to `/usr/share/ollama/.ollama/models` when running `ollama serve`. ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.1.48
GiteaMirror added the needs more info label 2026-05-03 21:16:55 -05:00
Author
Owner

@dhiltgen commented on GitHub (Jul 2, 2024):

I'm not sure what you're trying to do. Mixing ollama serve running manually and the systemd service with inconsistent configuration isn't going to work since the systemd service uses a different user account. If you're using the systemd service, you shouldn't run ollama serve manually with a different account.

<!-- gh-comment-id:2204409263 --> @dhiltgen commented on GitHub (Jul 2, 2024): I'm not sure what you're trying to do. Mixing `ollama serve` running manually and the systemd service with inconsistent configuration isn't going to work since the systemd service uses a different user account. If you're using the systemd service, you shouldn't run `ollama serve` manually with a different account.
Author
Owner

@whichxjy commented on GitHub (Jul 3, 2024):

I just follow the docs step by step and it doesn't work when running ollama serve. Maybe adding more info about that (like #3936 ?) would be better.

<!-- gh-comment-id:2204986481 --> @whichxjy commented on GitHub (Jul 3, 2024): I just follow the [docs](https://github.com/ollama/ollama/blob/main/README.md#cli-reference) step by step and it doesn't work when running `ollama serve`. Maybe adding more info about that (like #3936 ?) would be better.
Author
Owner

@dhiltgen commented on GitHub (Jul 5, 2024):

Those docs are a reference to the various CLI commands, not a step-by-step tutorial meant to be run in sequence.

My best guess is you're trying to learn how to set up an alternative location for storing the models. If that's the case, then the following two sections of our FAQ will be helpful:

  1. How to configure the ollama server
  2. Where are models stored

If that wasn't what you were trying to do, please explain what your goal was and I'll try to point you in the right direction.

<!-- gh-comment-id:2211493364 --> @dhiltgen commented on GitHub (Jul 5, 2024): Those docs are a reference to the various CLI commands, not a step-by-step tutorial meant to be run in sequence. My best guess is you're trying to learn how to set up an alternative location for storing the models. If that's the case, then the following two sections of our FAQ will be helpful: 1. [How to configure the ollama server](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server) 2. [Where are models stored ](https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored) If that wasn't what you were trying to do, please explain what your goal was and I'll try to point you in the right direction.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#65436