[PR #2910] [CLOSED] Run inference in a subprocess #42246

Closed
opened 2026-04-24 22:02:08 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2910
Author: @jmorganca
Created: 3/4/2024
Status: Closed

Base: mainHead: subprocess


📝 Commits (1)

  • c672e46 Fix numgpu opt miscomparison

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 server/routes.go (+11 -1)

📄 Description

This changes the underlying llama server to run in a subprocess, bringing back code from https://github.com/ollama/ollama/blob/v0.1.17/llm/llama.go while keeping the multi-variant support. This is helpful to make sure resources are freed when a model is unloaded and will help allow concurrent models to be loaded.

Note this should probably go in after https://github.com/ollama/ollama/pull/2885

Remaining

  • Handle crash/exit scenario (api will hang)
  • Surface stderr message as an api error
  • CI

🔄 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/2910 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 3/4/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `subprocess` --- ### 📝 Commits (1) - [`c672e46`](https://github.com/ollama/ollama/commit/c672e465e482ac5dc048afed71dd7fdf37101759) Fix numgpu opt miscomparison ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+11 -1) </details> ### 📄 Description This changes the underlying llama server to run in a subprocess, bringing back code from https://github.com/ollama/ollama/blob/v0.1.17/llm/llama.go while keeping the multi-variant support. This is helpful to make sure resources are freed when a model is unloaded and will help allow concurrent models to be loaded. Note this should probably go in after https://github.com/ollama/ollama/pull/2885 Remaining - [ ] Handle crash/exit scenario (api will hang) - [ ] Surface stderr message as an api error - [ ] CI --- <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-24 22:02:08 -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#42246