[GH-ISSUE #8418] Running OLLAMA_FLASH_ATTENTION=true with LoRA Models Returns: flash_attn is not compatible with LoRA #5407

Open
opened 2026-04-12 16:38:48 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @AXDIGI on GitHub (Jan 14, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8418

What is the issue?

Hello, I use fine tuned LLMs that use LoRA, when activating OLLAMA_FLASH_ATTENTION=true ollama serve the fine tuned models do not work, the error received is:

llama_lora_adapter_set: flash_attn is not compatible with LoRA
panic: error applying lora from file

This error stops the model from running until you flag it false. Then it runs correctly when its turned to false.

I have found on the llama.cpp git that they edited and removed part of their code last week to fix this. Here was the same issue: https://github.com/ggerganov/llama.cpp/discussions/11097

Here is the fix that was added to llama.cpp:

https://github.com/ggerganov/llama.cpp/pull/11104/files

I'm not sure what I've done is correct in providing the above information (first ever report), but I found that Ollama uses Llama.cpp so I thought I'd find the solution directly.

OS

macOS

GPU

No response

CPU

No response

Ollama version

0.5.5

Originally created by @AXDIGI on GitHub (Jan 14, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8418 ### What is the issue? Hello, I use fine tuned LLMs that use LoRA, when activating OLLAMA_FLASH_ATTENTION=true ollama serve the fine tuned models do not work, the error received is: ``` llama_lora_adapter_set: flash_attn is not compatible with LoRA panic: error applying lora from file ``` This error stops the model from running until you flag it false. Then it runs correctly when its turned to false. I have found on the llama.cpp git that they edited and removed part of their code last week to fix this. Here was the same issue: https://github.com/ggerganov/llama.cpp/discussions/11097 Here is the fix that was added to llama.cpp: https://github.com/ggerganov/llama.cpp/pull/11104/files I'm not sure what I've done is correct in providing the above information (first ever report), but I found that Ollama uses Llama.cpp so I thought I'd find the solution directly. ### OS macOS ### GPU _No response_ ### CPU _No response_ ### Ollama version 0.5.5
GiteaMirror added the bug label 2026-04-12 16:38:48 -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#5407