[PR #3065] [MERGED] relay load model errors to the client #21589

Closed
opened 2026-04-19 15:44:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3065
Author: @BruceMacD
Created: 3/11/2024
Status: Merged
Merged: 3/11/2024
Merged by: @BruceMacD

Base: mainHead: brucemacd/load-errors


📝 Commits (1)

  • df3ad30 relay load model errors to the client

📊 Changes

3 files changed (+51 additions, -11 deletions)

View changed files

📝 llm/dyn_ext_server.go (+1 -1)
📝 llm/ext_server/ext_server.cpp (+6 -10)
llm/patches/03-load_exception.diff (+44 -0)

📄 Description

Relay errors on model load, this is needed to help people troubleshoot the specific problem they are experiencing when running a model. This function is a bottle-neck where many different errors can occur. As seen in #2753, there are many issues when the generic "failed to load model" error being reported.

In order to effectively identify and fix issues we need to relay more information to the client.

This change:

  • Re-throws load errors, so that the client can output the problem

This change does not:

  • Provide enhanced information to user's about how to resolve their problem. We will have to add these as we see the issues people face, if they can't be fixed on the Ollama side.

Errors will be relayed like this:

ollama run bad-model
Error: exception invalid model dimensions

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/3065 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 3/11/2024 **Status:** ✅ Merged **Merged:** 3/11/2024 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/load-errors` --- ### 📝 Commits (1) - [`df3ad30`](https://github.com/ollama/ollama/commit/df3ad304c8c53af1da11fcd9235a9c85cfb50e37) relay load model errors to the client ### 📊 Changes **3 files changed** (+51 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `llm/dyn_ext_server.go` (+1 -1) 📝 `llm/ext_server/ext_server.cpp` (+6 -10) ➕ `llm/patches/03-load_exception.diff` (+44 -0) </details> ### 📄 Description Relay errors on model load, this is needed to help people troubleshoot the specific problem they are experiencing when running a model. This function is a bottle-neck where many different errors can occur. As seen in #2753, there are many issues when the generic "failed to load model" error being reported. In order to effectively identify and fix issues we need to relay more information to the client. This change: - Re-throws load errors, so that the client can output the problem This change does not: - Provide enhanced information to user's about how to resolve their problem. We will have to add these as we see the issues people face, if they can't be fixed on the Ollama side. Errors will be relayed like this: ``` ollama run bad-model Error: exception invalid model dimensions ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 15:44:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#21589