[PR #13792] [MERGED] model: add lfm2 #14392

Closed
opened 2026-04-13 00:52:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13792
Author: @jmorganca
Created: 1/20/2026
Status: Merged
Merged: 1/20/2026
Merged by: @jmorganca

Base: mainHead: jmorganca/lfm2


📝 Commits (10+)

  • f56fd84 model: add lfm2
  • 3f3987c lfm2: enable flash attention and fix lint issues
  • bd21c0e lfm2: improve conversion and quantization
  • 8bdcf4e lfm2: use scalar head_count in conversion
  • ae064ea lfm2: clean up renderer test names and comments
  • 33472e7 lfm2: fix HybridCache reserve handling and add interface assertion
  • 7d6578a lfm2: fix HybridCache stale state and SetRows F32 requirement
  • 2bec80e remove redundant tests
  • fc1e9e8 fix gofmt formatting
  • 65124c3 remove unnecessary bf16 to f32 conversion

📊 Changes

18 files changed (+3441 additions, -2 deletions)

View changed files

📝 convert/convert.go (+2 -0)
convert/convert_lfm2.go (+100 -0)
📝 convert/reader.go (+1 -0)
📝 fs/ggml/ggml.go (+2 -0)
📝 ml/backend.go (+1 -0)
📝 ml/backend/ggml/ggml.go (+7 -0)
model/models/lfm2/cache.go (+410 -0)
model/models/lfm2/cache_test.go (+444 -0)
model/models/lfm2/model.go (+253 -0)
model/models/lfm2/shortconv.go (+50 -0)
📝 model/models/models.go (+1 -0)
model/parsers/lfm2.go (+498 -0)
model/parsers/lfm2_test.go (+1088 -0)
📝 model/parsers/parsers.go (+4 -0)
model/renderers/lfm2.go (+144 -0)
model/renderers/lfm2_test.go (+427 -0)
📝 model/renderers/renderer.go (+4 -0)
📝 server/quantization.go (+5 -2)

📄 Description

Carries the dense model in https://github.com/ollama/ollama/pull/13714


🔄 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/13792 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/20/2026 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/lfm2` --- ### 📝 Commits (10+) - [`f56fd84`](https://github.com/ollama/ollama/commit/f56fd8498b76a025e5b69e99e6875fc4e951b6c0) model: add lfm2 - [`3f3987c`](https://github.com/ollama/ollama/commit/3f3987c1085b2a27b8878432a055c50954b2c417) lfm2: enable flash attention and fix lint issues - [`bd21c0e`](https://github.com/ollama/ollama/commit/bd21c0eb00b476f03d73b1016091b4a9f69ad24f) lfm2: improve conversion and quantization - [`8bdcf4e`](https://github.com/ollama/ollama/commit/8bdcf4e678c00afd826858fd653408b48f8cf270) lfm2: use scalar head_count in conversion - [`ae064ea`](https://github.com/ollama/ollama/commit/ae064ea8d88b2e70785759cd41a4d0d5a648435f) lfm2: clean up renderer test names and comments - [`33472e7`](https://github.com/ollama/ollama/commit/33472e712504937b096b83d67584a93af917e336) lfm2: fix HybridCache reserve handling and add interface assertion - [`7d6578a`](https://github.com/ollama/ollama/commit/7d6578a5a7c367ac5d5d3a0653ccbf1c81c7825a) lfm2: fix HybridCache stale state and SetRows F32 requirement - [`2bec80e`](https://github.com/ollama/ollama/commit/2bec80eff394b7769e4ddc562dc9e44467806e03) remove redundant tests - [`fc1e9e8`](https://github.com/ollama/ollama/commit/fc1e9e89a1364efca2f6ce489f02340bda96bd96) fix gofmt formatting - [`65124c3`](https://github.com/ollama/ollama/commit/65124c36ff50de4a4b827f87e38e0178ffee75ef) remove unnecessary bf16 to f32 conversion ### 📊 Changes **18 files changed** (+3441 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert.go` (+2 -0) ➕ `convert/convert_lfm2.go` (+100 -0) 📝 `convert/reader.go` (+1 -0) 📝 `fs/ggml/ggml.go` (+2 -0) 📝 `ml/backend.go` (+1 -0) 📝 `ml/backend/ggml/ggml.go` (+7 -0) ➕ `model/models/lfm2/cache.go` (+410 -0) ➕ `model/models/lfm2/cache_test.go` (+444 -0) ➕ `model/models/lfm2/model.go` (+253 -0) ➕ `model/models/lfm2/shortconv.go` (+50 -0) 📝 `model/models/models.go` (+1 -0) ➕ `model/parsers/lfm2.go` (+498 -0) ➕ `model/parsers/lfm2_test.go` (+1088 -0) 📝 `model/parsers/parsers.go` (+4 -0) ➕ `model/renderers/lfm2.go` (+144 -0) ➕ `model/renderers/lfm2_test.go` (+427 -0) 📝 `model/renderers/renderer.go` (+4 -0) 📝 `server/quantization.go` (+5 -2) </details> ### 📄 Description Carries the dense model in https://github.com/ollama/ollama/pull/13714 --- <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-13 00:52:37 -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#14392