[PR #13714] [CLOSED] Add LFM2 and LFM2MOE Support to Ollama Engine #45608

Closed
opened 2026-04-25 01:16:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13714
Author: @TommyBoiss
Created: 1/14/2026
Status: Closed

Base: mainHead: lfm2


📝 Commits (7)

📊 Changes

8 files changed (+1377 additions, -0 deletions)

View changed files

📝 ml/backend.go (+1 -0)
📝 ml/backend/ggml/ggml.go (+7 -0)
model/models/lfm2/cache.go (+316 -0)
model/models/lfm2/model.go (+282 -0)
model/models/lfm2/shortconv.go (+47 -0)
model/models/lfm2moe/cache.go (+316 -0)
model/models/lfm2moe/model.go (+406 -0)
📝 model/models/models.go (+2 -0)

📄 Description

Hello I've written this PR to implement LFM2 support into Ollama, let me know if anything needs improving. But I've tried it and it works quite well!

image

🔄 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/13714 **Author:** [@TommyBoiss](https://github.com/TommyBoiss) **Created:** 1/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `lfm2` --- ### 📝 Commits (7) - [`1c59cda`](https://github.com/ollama/ollama/commit/1c59cdaf4f1f2ced2b3a1474253024ce36a10616) Add LFM2 into ollama - [`8708f80`](https://github.com/ollama/ollama/commit/8708f80a3cc8672fef551686549921b6fc49574a) Cleaned up some comments - [`ae98a06`](https://github.com/ollama/ollama/commit/ae98a067409ea047ceee14a5bd7ad8240040a0e5) Run Gofmt on it - [`e0da762`](https://github.com/ollama/ollama/commit/e0da7629912bb650de4a2628e88947c605472ef6) Run Gofmt on models.go - [`659db6f`](https://github.com/ollama/ollama/commit/659db6f5dda209acc316fe0e6556a339e6b277af) Add LFM2 Moe and optimize the original implementation - [`cf04d4c`](https://github.com/ollama/ollama/commit/cf04d4cd5291f7706850156e5b19ae1c2fab176d) Reorganize - [`f59d94c`](https://github.com/ollama/ollama/commit/f59d94c381b654ab00070f7d951e79eaae8186ce) Run GoFMT on it ### 📊 Changes **8 files changed** (+1377 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `ml/backend.go` (+1 -0) 📝 `ml/backend/ggml/ggml.go` (+7 -0) ➕ `model/models/lfm2/cache.go` (+316 -0) ➕ `model/models/lfm2/model.go` (+282 -0) ➕ `model/models/lfm2/shortconv.go` (+47 -0) ➕ `model/models/lfm2moe/cache.go` (+316 -0) ➕ `model/models/lfm2moe/model.go` (+406 -0) 📝 `model/models/models.go` (+2 -0) </details> ### 📄 Description Hello I've written this PR to implement LFM2 support into Ollama, let me know if anything needs improving. But I've tried it and it works quite well! <img width="1048" height="292" alt="image" src="https://github.com/user-attachments/assets/f6ad7c23-0773-4ebe-bc3e-7949b79a5ee1" /> --- <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-25 01:16:39 -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#45608