Skip to content

feat: add (experimental) fine-tuning support with TRL#9088

Merged
mudler merged 6 commits intomasterfrom
feat/fine-tuning
Mar 21, 2026
Merged

feat: add (experimental) fine-tuning support with TRL#9088
mudler merged 6 commits intomasterfrom
feat/fine-tuning

Conversation

@mudler
Copy link
Owner

@mudler mudler commented Mar 20, 2026

Description

This PR adds initial fine-tuning support to LocalAI, by adding a backend based on TRL.

It also supports to automatically quantize with llama.cpp and importing directly in LocalAI after fine-tune has finished.

This is experimental, and has to be enabled with the LOCALAI_ENABLE_FINETUNING variable. (been tested on functiongemma with a SFT fine-tune, but didn't tested all RTL combinations on GPU)

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

mudler added 2 commits March 20, 2026 17:09
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This changeset defines new GRPC signatues for Fine tuning backends, and
add TRL backend as initial fine-tuning engine. This implementation also
supports exporting to GGUF and automatically importing it to LocalAI
after fine-tuning.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@netlify
Copy link

netlify bot commented Mar 20, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 8997ff6
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69bdef5a2850a60007d2f58f
😎 Deploy Preview https://deploy-preview-9088--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler changed the title feat: add fine-tuning support feat: add (experimental) fine-tuning support Mar 20, 2026
@mudler mudler changed the title feat: add (experimental) fine-tuning support feat: add (experimental) fine-tuning support with TRL Mar 20, 2026
@mudler mudler added the enhancement New feature or request label Mar 20, 2026
mudler added 3 commits March 20, 2026 23:44
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler force-pushed the feat/fine-tuning branch from 6d5aa7a to 8997ff6 Compare March 21, 2026 01:07
@mudler mudler merged commit d9c1db2 into master Mar 21, 2026
39 of 40 checks passed
@mudler mudler deleted the feat/fine-tuning branch March 21, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant