[PR #15524] docs: restore num_gpu as a valid Modelfile parameter #41059

Open
opened 2026-04-23 01:48:03 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15524
Author: @samrusani
Created: 4/12/2026
Status: 🔄 Open

Base: mainHead: docs/restore-num-gpu-modelfile-param


📝 Commits (1)

  • 6f7f475 docs: restore num_gpu as a valid Modelfile parameter

📊 Changes

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

View changed files

📝 docs/modelfile.mdx (+1 -0)

📄 Description

Summary

  • Restores the num_gpu parameter to the Modelfile documentation's valid parameters table
  • This parameter was removed in e54a3c7 but remains fully functional in the codebase (api/types.go:605, api.md)
  • num_gpu is the only way to force CPU-only execution for a specific model via the Modelfile (by setting num_gpu 0) without modifying API requests

Fixes #13986

Verification

Confirmed num_gpu is still active:

  • Defined as NumGPU int in api/types.go with default -1 (automatically determined)
  • Documented in docs/api.md as a valid option
  • Used in llm/server.go and server/sched.go

🤖 Generated with Claude Code


🔄 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/15524 **Author:** [@samrusani](https://github.com/samrusani) **Created:** 4/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/restore-num-gpu-modelfile-param` --- ### 📝 Commits (1) - [`6f7f475`](https://github.com/ollama/ollama/commit/6f7f475a6e3d40f31ce969a73ab6067a47d6d432) docs: restore num_gpu as a valid Modelfile parameter ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/modelfile.mdx` (+1 -0) </details> ### 📄 Description ## Summary - Restores the `num_gpu` parameter to the Modelfile documentation's valid parameters table - This parameter was removed in e54a3c7 but remains fully functional in the codebase (`api/types.go:605`, `api.md`) - `num_gpu` is the only way to force CPU-only execution for a specific model via the Modelfile (by setting `num_gpu 0`) without modifying API requests Fixes #13986 ## Verification Confirmed `num_gpu` is still active: - Defined as `NumGPU int` in `api/types.go` with default `-1` (automatically determined) - Documented in `docs/api.md` as a valid option - Used in `llm/server.go` and `server/sched.go` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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-23 01:48: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#41059