Skip to content

refactor : move LFM2 shortconv and FFN blocks into a shared LFM base - #30874

Merged
CISC merged 2 commits into
ggml-org:masterfrom
tdakhran:tarek/refactor/02-lfm-base
Oct 20, 2026
Merged

CISC merged 2 commits into
ggml-org:masterfrom
tdakhran:tarek/refactor/02-lfm-base

Conversation

@tdakhran

@tdakhran tdakhran commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Move LFM2 shortconv and FFN blocks into a shared LFM base for future reuse.

Additional information

Will be reused by future models.

llama-perplexity (-c 512 --chunks 8) before/after, identical per-chunk values:

model before after
LFM2-1.2B Q5_K_M 8.5091 8.5091
LFM2-8B-A1B Q4_0 8.5240 8.5240

Requirements

@github-actions github-actions Bot added model Model specific testing Everything test related ggml changes relating to the ggml tensor library for machine learning CUDA Related to the CUDA backend labels Oct 20, 2026
@ngxson
ngxson marked this pull request as ready for review October 20, 2026 15:17
@ngxson
ngxson requested review from a team, CISC and ggerganov as code owners October 20, 2026 15:17
@tdakhran
tdakhran force-pushed the tarek/refactor/02-lfm-base branch from 0eb44ec to 44c6aad Compare October 20, 2026 16:11
@tdakhran

Copy link
Copy Markdown
Contributor Author

rebased, ready for review!

Comment thread src/models/lfm-base.cpp Resolved
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@CISC
CISC merged commit 84e66d0 into ggml-org:master Oct 20, 2026
18 of 19 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
…gml-org#30874)

* llama : move LFM2 shortconv and FFN blocks into a shared LFM base

* Update src/models/lfm-base.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
…gml-org#30874)

* llama : move LFM2 shortconv and FFN blocks into a shared LFM base

* Update src/models/lfm-base.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@tdakhran
tdakhran deleted the tarek/refactor/02-lfm-base branch October 29, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA Related to the CUDA backend ggml changes relating to the ggml tensor library for machine learning model Model specific testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants