[PR #12473] [MERGED] llm: Allow overriding flash attention setting #39705

Closed
opened 2026-04-23 00:42:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12473
Author: @jessegross
Created: 10/1/2025
Status: Merged
Merged: 10/2/2025
Merged by: @jessegross

Base: mainHead: jessegross/flash


📝 Commits (1)

  • 198e7a0 llm: Allow overriding flash attention setting

📊 Changes

3 files changed (+15 additions, -12 deletions)

View changed files

📝 envconfig/config.go (+12 -5)
📝 llm/memory.go (+1 -1)
📝 llm/server.go (+2 -6)

📄 Description

As we automatically enable flash attention for more models, there are likely some cases where we get it wrong. This allows setting OLLAMA_FLASH_ATTENTION=0 to disable it, even for models that usually have flash attention.


🔄 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/12473 **Author:** [@jessegross](https://github.com/jessegross) **Created:** 10/1/2025 **Status:** ✅ Merged **Merged:** 10/2/2025 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `jessegross/flash` --- ### 📝 Commits (1) - [`198e7a0`](https://github.com/ollama/ollama/commit/198e7a02d618c23b25a85e270c2403e92d0f66d4) llm: Allow overriding flash attention setting ### 📊 Changes **3 files changed** (+15 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `envconfig/config.go` (+12 -5) 📝 `llm/memory.go` (+1 -1) 📝 `llm/server.go` (+2 -6) </details> ### 📄 Description As we automatically enable flash attention for more models, there are likely some cases where we get it wrong. This allows setting OLLAMA_FLASH_ATTENTION=0 to disable it, even for models that usually have flash attention. --- <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 00:42:05 -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#39705