[PR #5004] [MERGED] fix: multiple templates when creating from model #11639

Closed
opened 2026-04-12 23:34:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5004
Author: @mxyng
Created: 6/12/2024
Status: Merged
Merged: 6/12/2024
Merged by: @mxyng

Base: mainHead: mxyng/fix-templates


📝 Commits (1)

  • c16f8af fix: multiple templates when creating from model

📊 Changes

3 files changed (+33 additions, -26 deletions)

View changed files

📝 server/images.go (+1 -16)
📝 server/model.go (+31 -9)
📝 server/routes_create_test.go (+1 -1)

📄 Description

multiple templates may appear in a model if a model is created from another model that 1) has an autodetected template and 2) defines a custom template

this fixes the bug by not detecting chat template when inheriting from another model


🔄 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/5004 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 6/12/2024 **Status:** ✅ Merged **Merged:** 6/12/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/fix-templates` --- ### 📝 Commits (1) - [`c16f8af`](https://github.com/ollama/ollama/commit/c16f8af91150febf705cefe28d48c90979cece30) fix: multiple templates when creating from model ### 📊 Changes **3 files changed** (+33 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+1 -16) 📝 `server/model.go` (+31 -9) 📝 `server/routes_create_test.go` (+1 -1) </details> ### 📄 Description multiple templates may appear in a model if a model is created from another model that 1) has an autodetected template and 2) defines a custom template this fixes the bug by not detecting chat template when inheriting from another model --- <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-12 23:34:21 -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#11639