-
Notifications
You must be signed in to change notification settings - Fork 119
QVAC-22629 feat: run an advisory llama.cpp fit check before loadModel #4010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
simon-iribarren
merged 30 commits into
main
from
feat/qvac-22629-advisory-fit-supervisor
Sep 9, 2026
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
09deda4
QVAC-22629 feat: run an opt-in advisory llama.cpp fit check before loβ¦
simon-iribarren 2d70d39
QVAC-22629 feat: adopt model-fit 0.8.0 and drop the advisory fit flag
simon-iribarren 300ba6b
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 468aef1
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 1704bce
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 7c1d0ee
QVAC-22629 fix: classify completion flash-attn as fit evidence
simon-iribarren df306ef
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 92986d7
QVAC-22629 mod: align the example with review feedback
simon-iribarren eb2aa7c
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren c6bccf6
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren adfa94f
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren e0fa806
QVAC-22629 fix: address review β opt-out, margin, log level, stderr tβ¦
simon-iribarren e507376
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 23d57c9
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren bea852b
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 11c187d
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren d782a9e
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 0f047a6
QVAC-22629 fix: classify projection_model_src as unsupported for the β¦
simon-iribarren 7f7ecc1
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 7c42a61
QVAC-22629 feat[api]: return the advisory fit verdict on getLoadedModβ¦
simon-iribarren a654641
QVAC-22629 chore: export the fitProbe contract artifact
simon-iribarren 12c5cd5
QVAC-22629 chore: regenerate the Python client for fitProbe
simon-iribarren 9196c5d
QVAC-22629 mod: keep the fit probe outcome internal
simon-iribarren 319f7a0
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 1905a08
QVAC-22629 chore: regenerate the Python client after dropping fitProbe
simon-iribarren 15c535a
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 1bfc933
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 34e10c9
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren 51c6914
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren b4cb5f6
Merge branch 'main' into feat/qvac-22629-advisory-fit-supervisor
simon-iribarren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
packages/inference/src/plugins/builtin/llamacpp-embedding/transform.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import type { GGMLConfig } from '@qvac/embed-llamacpp' | ||
| import { type EmbedConfig } from '@/schemas/index' | ||
|
|
||
| /** | ||
| * Converts an EmbedConfig into the flat string-keyed map the C++ addon expects. | ||
| * | ||
| * Extracted from the plugin so the advisory fit check can build its request | ||
| * from the same transform the real embedding load uses. | ||
| */ | ||
| export function transformEmbedConfig(embedConfig: EmbedConfig): GGMLConfig { | ||
| const config: GGMLConfig = { | ||
| device: embedConfig.device as 'gpu' | 'cpu', | ||
| gpu_layers: `${embedConfig.gpuLayers}` as `${number}`, | ||
| batch_size: `${embedConfig.batchSize}` as `${number}` | ||
| } | ||
|
|
||
| if (embedConfig.flashAttention) { | ||
| config.flash_attn = embedConfig.flashAttention | ||
| } | ||
|
|
||
| if (embedConfig.pooling) { | ||
| config.pooling = embedConfig.pooling | ||
| } | ||
|
|
||
| if (embedConfig.attention) { | ||
| config.attention = embedConfig.attention | ||
| } | ||
|
|
||
| if (typeof embedConfig.embdNormalize === 'number') { | ||
| config.embd_normalize = `${embedConfig.embdNormalize}` | ||
| } | ||
|
|
||
| if (embedConfig.mainGpu !== undefined) { | ||
| config['main-gpu'] = | ||
| typeof embedConfig.mainGpu === 'number' ? `${embedConfig.mainGpu}` : embedConfig.mainGpu | ||
| } | ||
|
|
||
| if (embedConfig.splitMode) { | ||
| config['split-mode'] = embedConfig.splitMode | ||
| } | ||
|
|
||
| if (embedConfig.tensorSplit) { | ||
| config['tensor-split'] = embedConfig.tensorSplit | ||
| } | ||
|
|
||
| if (typeof embedConfig.verbosity === 'number') { | ||
| config.verbosity = `${embedConfig.verbosity}` | ||
| } | ||
|
|
||
| if (embedConfig.openclCacheDir) { | ||
| config.openclCacheDir = embedConfig.openclCacheDir | ||
| } | ||
|
|
||
| return config | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.