@qvac/inference 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +50 -25
- package/README.md +44 -1
- package/dist/api/assess-model-fit.d.ts +4 -4
- package/dist/api/assess-model-fit.js +4 -4
- package/dist/api/audio-gen.d.ts +4 -1
- package/dist/api/audio-gen.js +4 -1
- package/dist/api/batch-completion.js +1 -1
- package/dist/api/completion-stream.js +1 -1
- package/dist/api/decide.d.ts +26 -0
- package/dist/api/decide.js +26 -0
- package/dist/api/get-model-info.d.ts +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/text-to-speech.d.ts +1 -0
- package/dist/api/text-to-speech.js +15 -19
- package/dist/api/transcribe.js +5 -2
- package/dist/api/video-request.d.ts +5 -5
- package/dist/api/video.d.ts +5 -4
- package/dist/api/video.js +5 -4
- package/dist/errors/index.d.ts +3 -0
- package/dist/errors/index.js +5 -0
- package/dist/handlers/assess-model-fit.d.ts +5 -3
- package/dist/handlers/assess-model-fit.js +80 -28
- package/dist/handlers/get-loaded-model-info.js +1 -2
- package/dist/handlers/load-model/safe-fetch.js +5 -6
- package/dist/handlers/registry.d.ts +3 -1
- package/dist/handlers/registry.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/logging/logger.js +1 -1
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +563 -816
- package/dist/models/registry/models.js +2873 -3110
- package/dist/models/registry/resource-profiles.d.ts +1 -2
- package/dist/models/registry/resource-profiles.js +203 -2
- package/dist/plugins/builtin/asr-ggml/config.d.ts +7 -1
- package/dist/plugins/builtin/asr-ggml/config.js +6 -0
- package/dist/plugins/builtin/asr-ggml/logging.d.ts +1 -1
- package/dist/plugins/builtin/audiogen-ggml/config.d.ts +1 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +28 -10
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.d.ts +27 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.js +23 -0
- package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +6 -27
- package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +147 -60
- package/dist/plugins/builtin/audiogen-ggml/plugin.js +1 -0
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +40 -24
- package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +1 -1
- package/dist/plugins/builtin/ggml-classification/plugin.d.ts +4 -4
- package/dist/plugins/builtin/ggml-ocr/params.d.ts +18 -0
- package/dist/plugins/builtin/ggml-ocr/params.js +37 -0
- package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +18 -10
- package/dist/plugins/builtin/ggml-ocr/plugin.js +16 -38
- package/dist/plugins/builtin/ggml-vla/plugin.d.ts +21 -14
- package/dist/plugins/builtin/ggml-vla/plugin.js +1 -1
- package/dist/plugins/builtin/index.d.ts +2 -0
- package/dist/plugins/builtin/index.js +2 -0
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +9 -7
- package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +109 -189
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +32 -90
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +60 -211
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.d.ts +2 -49
- package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.js +2 -46
- package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +185 -87
- package/dist/plugins/builtin/llamacpp-completion/plugin.js +4 -5
- package/dist/plugins/builtin/llamacpp-completion/transform.js +1 -1
- package/dist/plugins/builtin/llamacpp-decision/helpers.d.ts +6 -0
- package/dist/plugins/builtin/llamacpp-decision/helpers.js +97 -0
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.d.ts +91 -0
- package/dist/plugins/builtin/llamacpp-decision/ops/decide.js +129 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.d.ts +216 -0
- package/dist/plugins/builtin/llamacpp-decision/plugin.js +43 -0
- package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +12 -5
- package/dist/plugins/builtin/llamacpp-embedding/plugin.js +1 -1
- package/dist/plugins/builtin/llamacpp-embedding/transform.js +3 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.d.ts +143 -0
- package/dist/plugins/builtin/moss-transcribe/plugin.js +96 -0
- package/dist/plugins/builtin/nmtcpp-translation/load-files.d.ts +6 -0
- package/dist/plugins/builtin/nmtcpp-translation/load-files.js +70 -0
- package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +25 -13
- package/dist/plugins/builtin/nmtcpp-translation/plugin.js +9 -73
- package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +52 -31
- package/dist/plugins/builtin/parakeet-transcription/plugin.js +18 -3
- package/dist/plugins/builtin/sdcpp-generation/ops/video.js +10 -6
- package/dist/plugins/builtin/sdcpp-generation/ops/world.d.ts +2 -2
- package/dist/plugins/builtin/sdcpp-generation/ops/world.js +1 -1
- package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +59 -33
- package/dist/plugins/builtin/sdcpp-generation/plugin.js +12 -9
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.d.ts +22 -0
- package/dist/plugins/builtin/tts-ggml/ops/moss-options.js +79 -0
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +4 -1
- package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +17 -5
- package/dist/plugins/builtin/tts-ggml/plugin.d.ts +164 -29
- package/dist/plugins/builtin/tts-ggml/plugin.js +38 -1
- package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +58 -35
- package/dist/plugins/builtin/whispercpp-transcription/plugin.js +6 -2
- package/dist/plugins/ops/kv-cache-utils.d.ts +1 -1
- package/dist/plugins/ops/kv-cache-utils.js +10 -25
- package/dist/plugins/ops/load-model.js +21 -16
- package/dist/plugins/ops/transcribe.js +17 -1
- package/dist/registry.js +1 -0
- package/dist/resources/model-fit/assess.d.ts +15 -23
- package/dist/resources/model-fit/assess.js +207 -271
- package/dist/resources/model-fit/fit-stub/fetch-fit-stub.d.ts +3 -1
- package/dist/resources/model-fit/fit-stub/fetch-fit-stub.js +6 -1
- package/dist/resources/model-fit/fit-stub/project-fit-from-load.js +2 -0
- package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.d.ts +5 -3
- package/dist/resources/model-fit/fit-stub/resolve-load-from-stubs.js +9 -1
- package/dist/resources/model-fit/floor.d.ts +10 -10
- package/dist/resources/model-fit/floor.js +13 -13
- package/dist/resources/model-fit/kv-cache.d.ts +23 -0
- package/dist/resources/model-fit/kv-cache.js +85 -0
- package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +11 -6
- package/dist/resources/model-fit/native-probe/advisory-fit.js +12 -27
- package/dist/resources/model-fit/native-probe/child-engine-fit.js +8 -0
- package/dist/resources/model-fit/native-probe/classify-fit.js +32 -1
- package/dist/resources/model-fit/native-probe/create-fit-request.d.ts +4 -1
- package/dist/resources/model-fit/native-probe/create-fit-request.js +24 -14
- package/dist/resources/model-fit/native-probe/engine-fit.d.ts +14 -0
- package/dist/resources/model-fit/native-probe/engine-fit.js +1 -1
- package/dist/resources/model-fit/native-probe/engines/asr.d.ts +4 -0
- package/dist/resources/model-fit/native-probe/engines/asr.js +23 -0
- package/dist/resources/model-fit/native-probe/engines/audiogen.js +29 -1
- package/dist/resources/model-fit/native-probe/engines/diffusion.js +16 -6
- package/dist/resources/model-fit/native-probe/engines/llama.d.ts +0 -1
- package/dist/resources/model-fit/native-probe/engines/llama.js +19 -123
- package/dist/resources/model-fit/native-probe/engines/nmt.d.ts +8 -0
- package/dist/resources/model-fit/native-probe/engines/nmt.js +11 -0
- package/dist/resources/model-fit/native-probe/engines/ocr.d.ts +9 -0
- package/dist/resources/model-fit/native-probe/engines/ocr.js +13 -0
- package/dist/resources/model-fit/native-probe/engines/tts.d.ts +2 -0
- package/dist/resources/model-fit/native-probe/engines/tts.js +49 -3
- package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +5 -3
- package/dist/resources/model-fit/native-probe/run-in-process-fit.js +38 -23
- package/dist/resources/model-fit/platform.d.ts +4 -4
- package/dist/resources/model-fit/platform.js +6 -8
- package/dist/resources/model-fit/types.d.ts +3 -117
- package/dist/rpc/inventory.js +5 -7
- package/dist/runtime/env.d.ts +0 -2
- package/dist/runtime/env.js +2 -9
- package/dist/runtime/model-config-utils.js +6 -1
- package/dist/runtime/request-context.d.ts +1 -1
- package/dist/runtime/request-context.js +8 -0
- package/dist/runtime/state.js +5 -0
- package/dist/schemas/assess-model-fit.d.ts +100 -43
- package/dist/schemas/assess-model-fit.js +66 -29
- package/dist/schemas/audio-gen.d.ts +186 -18
- package/dist/schemas/audio-gen.js +180 -48
- package/dist/schemas/batch-completion-stream.d.ts +202 -34
- package/dist/schemas/bci-config.d.ts +2 -0
- package/dist/schemas/bci.d.ts +23 -2
- package/dist/schemas/cancel.d.ts +5 -0
- package/dist/schemas/cancel.js +1 -0
- package/dist/schemas/common.d.ts +1083 -158
- package/dist/schemas/common.js +5 -2
- package/dist/schemas/completion-stream.d.ts +232 -37
- package/dist/schemas/completion-stream.js +64 -20
- package/dist/schemas/config.d.ts +477 -12
- package/dist/schemas/config.js +21 -1
- package/dist/schemas/decision.d.ts +602 -0
- package/dist/schemas/decision.js +205 -0
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/engine-addon-map.d.ts +7 -0
- package/dist/schemas/engine-addon-map.js +23 -3
- package/dist/schemas/errors.d.ts +1 -0
- package/dist/schemas/errors.js +5 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/llamacpp-config.d.ts +42 -2
- package/dist/schemas/llamacpp-config.js +27 -0
- package/dist/schemas/load-model.d.ts +5247 -1309
- package/dist/schemas/load-model.js +88 -9
- package/dist/schemas/model-config-schemas.d.ts +233 -8
- package/dist/schemas/model-config-schemas.js +4 -1
- package/dist/schemas/model-fit-policy.d.ts +17 -0
- package/dist/schemas/model-fit-policy.js +17 -0
- package/dist/schemas/model-info.d.ts +20 -2
- package/dist/schemas/model-info.js +2 -1
- package/dist/schemas/model-resource-profile.d.ts +3 -4
- package/dist/schemas/model-resource-profile.js +1 -4
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +10 -1
- package/dist/schemas/model-types.js +3 -0
- package/dist/schemas/ocr.d.ts +74 -0
- package/dist/schemas/ocr.js +42 -0
- package/dist/schemas/plugin.d.ts +8 -2
- package/dist/schemas/plugin.js +6 -0
- package/dist/schemas/profiling.d.ts +4 -4
- package/dist/schemas/registry.d.ts +26 -0
- package/dist/schemas/registry.js +3 -0
- package/dist/schemas/reload-config.d.ts +10 -2
- package/dist/schemas/rpc-server.js +3 -3
- package/dist/schemas/sdcpp-config.d.ts +26 -0
- package/dist/schemas/sdcpp-config.js +8 -7
- package/dist/schemas/system-resources.d.ts +4 -4
- package/dist/schemas/text-to-speech.d.ts +402 -3
- package/dist/schemas/text-to-speech.js +129 -11
- package/dist/schemas/tools.d.ts +13 -4
- package/dist/schemas/tools.js +18 -6
- package/dist/schemas/transcription-config.d.ts +15 -0
- package/dist/schemas/transcription-config.js +38 -3
- package/dist/schemas/transcription.d.ts +46 -4
- package/dist/schemas/transcription.js +51 -4
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/schemas/vla.d.ts +9 -2
- package/dist/schemas/vla.js +9 -5
- package/dist/surface.d.ts +1 -1
- package/dist/surface.js +1 -1
- package/dist/utils/addon-responses.d.ts +1 -0
- package/dist/utils/asr-events.d.ts +1 -0
- package/dist/utils/asr-events.js +2 -1
- package/dist/utils/cache/types.d.ts +7 -0
- package/dist/utils/mcp-adapter.js +12 -8
- package/dist/utils/tool-helpers.d.ts +1 -1
- package/dist/utils/tool-helpers.js +20 -52
- package/dist/utils/tools/parsers/dsml.js +8 -5
- package/dist/utils/tools/parsers/qwen35.js +7 -4
- package/dist/utils/tools/shared.d.ts +3 -0
- package/dist/utils/tools/shared.js +62 -0
- package/dist/utils/transcribe-metadata.d.ts +8 -1
- package/dist/utils/transcribe-metadata.js +13 -3
- package/dist/utils/tts-stats.d.ts +1 -0
- package/package.json +41 -32
- package/dist/resources/model-fit/calibration/darwin-arm64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/darwin-arm64.js +0 -36
- package/dist/resources/model-fit/calibration/darwin-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/darwin-x64.js +0 -38
- package/dist/resources/model-fit/calibration/fit.d.ts +0 -73
- package/dist/resources/model-fit/calibration/fit.js +0 -152
- package/dist/resources/model-fit/calibration/index.d.ts +0 -37
- package/dist/resources/model-fit/calibration/index.js +0 -75
- package/dist/resources/model-fit/calibration/linux-arm64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-arm64.js +0 -38
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-x64-vulkan.js +0 -39
- package/dist/resources/model-fit/calibration/linux-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/linux-x64.js +0 -38
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64-vulkan-shared.js +0 -39
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64-vulkan.js +0 -36
- package/dist/resources/model-fit/calibration/win32-x64.d.ts +0 -8
- package/dist/resources/model-fit/calibration/win32-x64.js +0 -38
- package/dist/resources/model-fit/estimators/llm.d.ts +0 -46
- package/dist/resources/model-fit/estimators/llm.js +0 -222
- package/dist/resources/model-fit/estimators/whisper.d.ts +0 -10
- package/dist/resources/model-fit/estimators/whisper.js +0 -76
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { llmConfigBaseSchema, embedConfigBaseSchema } from './llamacpp-config.js';
|
|
2
|
-
import { whisperConfigSchema, parakeetRuntimeConfigSchema } from './transcription-config.js';
|
|
2
|
+
import { whisperConfigSchema, parakeetRuntimeConfigSchema, mossTranscribeConfigSchema } from './transcription-config.js';
|
|
3
3
|
import { bciConfigSchema } from './bci-config.js';
|
|
4
4
|
import { nmtConfigBaseSchema } from './translation-config.js';
|
|
5
5
|
import { ttsLoadConfigSchema } from './text-to-speech.js';
|
|
@@ -7,6 +7,7 @@ import { ocrConfigSchema } from './ocr.js';
|
|
|
7
7
|
import { sdcppConfigSchema } from './sdcpp-config.js';
|
|
8
8
|
import { audioGenConfigSchema } from './audio-gen.js';
|
|
9
9
|
import { vlaConfigSchema } from './vla.js';
|
|
10
|
+
import { decisionConfigBaseSchema } from './decision.js';
|
|
10
11
|
import { classificationConfigSchema } from './classification.js';
|
|
11
12
|
import { ModelType, normalizeModelType } from './model-types.js';
|
|
12
13
|
// Canonical model type -> the `modelConfig` schema whose fields a user
|
|
@@ -25,10 +26,12 @@ export const MODEL_CONFIG_SCHEMA_BY_TYPE = {
|
|
|
25
26
|
[ModelType.llamacppCompletion]: llmConfigBaseSchema,
|
|
26
27
|
[ModelType.whispercppTranscription]: whisperConfigSchema,
|
|
27
28
|
[ModelType.bciWhispercppTranscription]: bciConfigSchema,
|
|
29
|
+
[ModelType.llamacppDecision]: decisionConfigBaseSchema,
|
|
28
30
|
[ModelType.llamacppEmbedding]: embedConfigBaseSchema,
|
|
29
31
|
[ModelType.nmtcppTranslation]: nmtConfigBaseSchema,
|
|
30
32
|
[ModelType.ttsGgml]: ttsLoadConfigSchema,
|
|
31
33
|
[ModelType.parakeetTranscription]: parakeetRuntimeConfigSchema,
|
|
34
|
+
[ModelType.mossTranscribe]: mossTranscribeConfigSchema,
|
|
32
35
|
[ModelType.ggmlOcr]: ocrConfigSchema,
|
|
33
36
|
[ModelType.sdcppGeneration]: sdcppConfigSchema,
|
|
34
37
|
[ModelType.audiogenGgml]: audioGenConfigSchema,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { NativeProbeVerdict } from './assess-model-fit.js';
|
|
3
|
+
/**
|
|
4
|
+
* What the engine fitter's verdict does to a load. Only `does-not-fit` blocks
|
|
5
|
+
* under `refuse`: `unknown` is what an engine with no fitter, an unresolved
|
|
6
|
+
* companion set and a host reporting no memory all answer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const modelFitPolicySchema: z.ZodEnum<{
|
|
9
|
+
off: "off";
|
|
10
|
+
log: "log";
|
|
11
|
+
refuse: "refuse";
|
|
12
|
+
}>;
|
|
13
|
+
export type ModelFitPolicy = z.infer<typeof modelFitPolicySchema>;
|
|
14
|
+
export declare const DEFAULT_MODEL_FIT_POLICY: ModelFitPolicy;
|
|
15
|
+
export declare function resolveModelFitPolicy(perCall: ModelFitPolicy | undefined, configured: ModelFitPolicy | undefined): ModelFitPolicy;
|
|
16
|
+
export declare function runsProbe(policy: ModelFitPolicy): boolean;
|
|
17
|
+
export declare function refusesLoad(policy: ModelFitPolicy, verdict: NativeProbeVerdict | undefined): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What the engine fitter's verdict does to a load. Only `does-not-fit` blocks
|
|
4
|
+
* under `refuse`: `unknown` is what an engine with no fitter, an unresolved
|
|
5
|
+
* companion set and a host reporting no memory all answer.
|
|
6
|
+
*/
|
|
7
|
+
export const modelFitPolicySchema = z.enum(['log', 'refuse', 'off']);
|
|
8
|
+
export const DEFAULT_MODEL_FIT_POLICY = 'log';
|
|
9
|
+
export function resolveModelFitPolicy(perCall, configured) {
|
|
10
|
+
return perCall ?? configured ?? DEFAULT_MODEL_FIT_POLICY;
|
|
11
|
+
}
|
|
12
|
+
export function runsProbe(policy) {
|
|
13
|
+
return policy !== 'off';
|
|
14
|
+
}
|
|
15
|
+
export function refusesLoad(policy, verdict) {
|
|
16
|
+
return policy === 'refuse' && verdict === 'does-not-fit';
|
|
17
|
+
}
|
|
@@ -41,6 +41,7 @@ export declare const modelInfoSchema: z.ZodObject<{
|
|
|
41
41
|
tts: "tts";
|
|
42
42
|
ocr: "ocr";
|
|
43
43
|
vla: "vla";
|
|
44
|
+
"moss-transcribe": "moss-transcribe";
|
|
44
45
|
llm: "llm";
|
|
45
46
|
whisper: "whisper";
|
|
46
47
|
bci: "bci";
|
|
@@ -92,6 +93,7 @@ export declare const getModelInfoResponseSchema: z.ZodObject<{
|
|
|
92
93
|
tts: "tts";
|
|
93
94
|
ocr: "ocr";
|
|
94
95
|
vla: "vla";
|
|
96
|
+
"moss-transcribe": "moss-transcribe";
|
|
95
97
|
llm: "llm";
|
|
96
98
|
whisper: "whisper";
|
|
97
99
|
bci: "bci";
|
|
@@ -150,9 +152,9 @@ export declare const loadedModelInfoSchema: z.ZodObject<{
|
|
|
150
152
|
name: z.ZodOptional<z.ZodString>;
|
|
151
153
|
path: z.ZodOptional<z.ZodString>;
|
|
152
154
|
toolDialect: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
json: "json";
|
|
153
156
|
hermes: "hermes";
|
|
154
157
|
pythonic: "pythonic";
|
|
155
|
-
json: "json";
|
|
156
158
|
harmony: "harmony";
|
|
157
159
|
qwen35: "qwen35";
|
|
158
160
|
gemma4: "gemma4";
|
|
@@ -183,6 +185,14 @@ export declare const loadedModelInfoSchema: z.ZodObject<{
|
|
|
183
185
|
computeBytes: z.ZodOptional<z.ZodNumber>;
|
|
184
186
|
deviceFreeBytes: z.ZodOptional<z.ZodNumber>;
|
|
185
187
|
deviceTotalBytes: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
189
|
+
name: z.ZodString;
|
|
190
|
+
totalBytes: z.ZodNumber;
|
|
191
|
+
freeBytes: z.ZodNumber;
|
|
192
|
+
weightsBytes: z.ZodNumber;
|
|
193
|
+
contextBytes: z.ZodNumber;
|
|
194
|
+
computeBytes: z.ZodNumber;
|
|
195
|
+
}, z.core.$strip>>>;
|
|
186
196
|
report: z.ZodOptional<z.ZodString>;
|
|
187
197
|
}, z.core.$strip>>;
|
|
188
198
|
}, z.core.$strip>>;
|
|
@@ -199,9 +209,9 @@ export declare const getLoadedModelInfoResponseSchema: z.ZodObject<{
|
|
|
199
209
|
name: z.ZodOptional<z.ZodString>;
|
|
200
210
|
path: z.ZodOptional<z.ZodString>;
|
|
201
211
|
toolDialect: z.ZodOptional<z.ZodEnum<{
|
|
212
|
+
json: "json";
|
|
202
213
|
hermes: "hermes";
|
|
203
214
|
pythonic: "pythonic";
|
|
204
|
-
json: "json";
|
|
205
215
|
harmony: "harmony";
|
|
206
216
|
qwen35: "qwen35";
|
|
207
217
|
gemma4: "gemma4";
|
|
@@ -232,6 +242,14 @@ export declare const getLoadedModelInfoResponseSchema: z.ZodObject<{
|
|
|
232
242
|
computeBytes: z.ZodOptional<z.ZodNumber>;
|
|
233
243
|
deviceFreeBytes: z.ZodOptional<z.ZodNumber>;
|
|
234
244
|
deviceTotalBytes: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
totalBytes: z.ZodNumber;
|
|
248
|
+
freeBytes: z.ZodNumber;
|
|
249
|
+
weightsBytes: z.ZodNumber;
|
|
250
|
+
contextBytes: z.ZodNumber;
|
|
251
|
+
computeBytes: z.ZodNumber;
|
|
252
|
+
}, z.core.$strip>>>;
|
|
235
253
|
report: z.ZodOptional<z.ZodString>;
|
|
236
254
|
}, z.core.$strip>>;
|
|
237
255
|
}, z.core.$strip>>;
|
|
@@ -61,6 +61,7 @@ export const modelInfoSchema = z.object({
|
|
|
61
61
|
'whisper',
|
|
62
62
|
'bci',
|
|
63
63
|
'parakeet',
|
|
64
|
+
'moss-transcribe',
|
|
64
65
|
'embeddings',
|
|
65
66
|
'nmt',
|
|
66
67
|
'vad',
|
|
@@ -118,7 +119,7 @@ export const loadedModelInfoSchema = z
|
|
|
118
119
|
toolDialect: toolDialectSchema.optional(),
|
|
119
120
|
fitProbe: nativeProbeFitSchema
|
|
120
121
|
.optional()
|
|
121
|
-
.describe(
|
|
122
|
+
.describe("Outcome of the engine fitter's check that ran ahead of this load. Absent when the load set `modelFitPolicy: 'off'`.")
|
|
122
123
|
})
|
|
123
124
|
.meta({ title: 'LoadedModelInfo' });
|
|
124
125
|
export const getLoadedModelInfoResponseSchema = z.object({
|
|
@@ -50,11 +50,8 @@ export declare const ggufFactsSchema: z.ZodObject<{
|
|
|
50
50
|
assumptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
/**
|
|
53
|
-
* Per-model
|
|
53
|
+
* Per-model facts the computed floor reads before download. Generated into
|
|
54
54
|
* `models/registry/resource-profiles.ts` alongside the model catalog.
|
|
55
|
-
*
|
|
56
|
-
* Profiles hold facts only — no memory numbers — so re-calibrating an estimator
|
|
57
|
-
* never requires regenerating the catalog.
|
|
58
55
|
*/
|
|
59
56
|
export declare const modelResourceProfileSchema: z.ZodObject<{
|
|
60
57
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -63,10 +60,12 @@ export declare const modelResourceProfileSchema: z.ZodObject<{
|
|
|
63
60
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
64
61
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
65
62
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
63
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
66
64
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
67
65
|
"onnx-tts": "onnx-tts";
|
|
68
66
|
"tts-ggml": "tts-ggml";
|
|
69
67
|
"parakeet-transcription": "parakeet-transcription";
|
|
68
|
+
"moss-transcribe": "moss-transcribe";
|
|
70
69
|
"ggml-ocr": "ggml-ocr";
|
|
71
70
|
"sdcpp-generation": "sdcpp-generation";
|
|
72
71
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -61,11 +61,8 @@ export const ggufFactsSchema = z.object({
|
|
|
61
61
|
.describe('Notes on any value that was derived rather than read from the file.')
|
|
62
62
|
});
|
|
63
63
|
/**
|
|
64
|
-
* Per-model
|
|
64
|
+
* Per-model facts the computed floor reads before download. Generated into
|
|
65
65
|
* `models/registry/resource-profiles.ts` alongside the model catalog.
|
|
66
|
-
*
|
|
67
|
-
* Profiles hold facts only — no memory numbers — so re-calibrating an estimator
|
|
68
|
-
* never requires regenerating the catalog.
|
|
69
66
|
*/
|
|
70
67
|
export const modelResourceProfileSchema = z.object({
|
|
71
68
|
schemaVersion: z.literal(1).describe('Bumped whenever the emitted profile shape changes.'),
|
|
@@ -22,10 +22,12 @@ export declare const modelDescriptorSchema: z.ZodObject<{
|
|
|
22
22
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
23
23
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
24
24
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
25
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
25
26
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
26
27
|
"onnx-tts": "onnx-tts";
|
|
27
28
|
"tts-ggml": "tts-ggml";
|
|
28
29
|
"parakeet-transcription": "parakeet-transcription";
|
|
30
|
+
"moss-transcribe": "moss-transcribe";
|
|
29
31
|
"ggml-ocr": "ggml-ocr";
|
|
30
32
|
"sdcpp-generation": "sdcpp-generation";
|
|
31
33
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -61,10 +63,12 @@ export declare const modelSrcInputSchema: z.ZodUnion<readonly [z.ZodString, z.Zo
|
|
|
61
63
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
62
64
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
63
65
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
66
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
64
67
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
65
68
|
"onnx-tts": "onnx-tts";
|
|
66
69
|
"tts-ggml": "tts-ggml";
|
|
67
70
|
"parakeet-transcription": "parakeet-transcription";
|
|
71
|
+
"moss-transcribe": "moss-transcribe";
|
|
68
72
|
"ggml-ocr": "ggml-ocr";
|
|
69
73
|
"sdcpp-generation": "sdcpp-generation";
|
|
70
74
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -106,10 +110,12 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
106
110
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
107
111
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
108
112
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
113
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
109
114
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
110
115
|
"onnx-tts": "onnx-tts";
|
|
111
116
|
"tts-ggml": "tts-ggml";
|
|
112
117
|
"parakeet-transcription": "parakeet-transcription";
|
|
118
|
+
"moss-transcribe": "moss-transcribe";
|
|
113
119
|
"ggml-ocr": "ggml-ocr";
|
|
114
120
|
"sdcpp-generation": "sdcpp-generation";
|
|
115
121
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -133,7 +139,7 @@ export declare const modelInputToSrcSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zod
|
|
|
133
139
|
engine?: string | undefined;
|
|
134
140
|
expectedSize?: number | undefined;
|
|
135
141
|
sha256Checksum?: string | undefined;
|
|
136
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
142
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
137
143
|
}>>;
|
|
138
144
|
/**
|
|
139
145
|
* Schema that transforms ModelSrc to its optional name
|
|
@@ -161,10 +167,12 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
161
167
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
162
168
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
163
169
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
170
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
164
171
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
165
172
|
"onnx-tts": "onnx-tts";
|
|
166
173
|
"tts-ggml": "tts-ggml";
|
|
167
174
|
"parakeet-transcription": "parakeet-transcription";
|
|
175
|
+
"moss-transcribe": "moss-transcribe";
|
|
168
176
|
"ggml-ocr": "ggml-ocr";
|
|
169
177
|
"sdcpp-generation": "sdcpp-generation";
|
|
170
178
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -188,6 +196,6 @@ export declare const modelInputToNameSchema: z.ZodPipe<z.ZodUnion<readonly [z.Zo
|
|
|
188
196
|
engine?: string | undefined;
|
|
189
197
|
expectedSize?: number | undefined;
|
|
190
198
|
sha256Checksum?: string | undefined;
|
|
191
|
-
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
199
|
+
addon?: "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification" | "vad" | undefined;
|
|
192
200
|
}>>;
|
|
193
201
|
export declare function inferModelTypeFromModelSrc(modelSrc: unknown): string | undefined;
|
|
@@ -9,10 +9,12 @@ export declare const ModelType: {
|
|
|
9
9
|
readonly whispercppTranscription: "whispercpp-transcription";
|
|
10
10
|
readonly bciWhispercppTranscription: "bci-whispercpp-transcription";
|
|
11
11
|
readonly llamacppEmbedding: "llamacpp-embedding";
|
|
12
|
+
readonly llamacppDecision: "llamacpp-decision";
|
|
12
13
|
readonly nmtcppTranslation: "nmtcpp-translation";
|
|
13
14
|
readonly onnxTts: "onnx-tts";
|
|
14
15
|
readonly ttsGgml: "tts-ggml";
|
|
15
16
|
readonly parakeetTranscription: "parakeet-transcription";
|
|
17
|
+
readonly mossTranscribe: "moss-transcribe";
|
|
16
18
|
readonly ggmlOcr: "ggml-ocr";
|
|
17
19
|
readonly sdcppGeneration: "sdcpp-generation";
|
|
18
20
|
readonly audiogenGgml: "audiogen-ggml";
|
|
@@ -72,10 +74,12 @@ export declare const PUBLIC_MODEL_TYPES: {
|
|
|
72
74
|
readonly whispercppTranscription: "whispercpp-transcription";
|
|
73
75
|
readonly bciWhispercppTranscription: "bci-whispercpp-transcription";
|
|
74
76
|
readonly llamacppEmbedding: "llamacpp-embedding";
|
|
77
|
+
readonly llamacppDecision: "llamacpp-decision";
|
|
75
78
|
readonly nmtcppTranslation: "nmtcpp-translation";
|
|
76
79
|
readonly onnxTts: "onnx-tts";
|
|
77
80
|
readonly ttsGgml: "tts-ggml";
|
|
78
81
|
readonly parakeetTranscription: "parakeet-transcription";
|
|
82
|
+
readonly mossTranscribe: "moss-transcribe";
|
|
79
83
|
readonly ggmlOcr: "ggml-ocr";
|
|
80
84
|
readonly sdcppGeneration: "sdcpp-generation";
|
|
81
85
|
readonly audiogenGgml: "audiogen-ggml";
|
|
@@ -94,10 +98,12 @@ export declare const modelTypeInputSchema: z.ZodEnum<{
|
|
|
94
98
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
95
99
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
96
100
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
101
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
97
102
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
98
103
|
"onnx-tts": "onnx-tts";
|
|
99
104
|
"tts-ggml": "tts-ggml";
|
|
100
105
|
"parakeet-transcription": "parakeet-transcription";
|
|
106
|
+
"moss-transcribe": "moss-transcribe";
|
|
101
107
|
"ggml-ocr": "ggml-ocr";
|
|
102
108
|
"sdcpp-generation": "sdcpp-generation";
|
|
103
109
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -122,10 +128,12 @@ export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
|
122
128
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
123
129
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
124
130
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
131
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
125
132
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
126
133
|
"onnx-tts": "onnx-tts";
|
|
127
134
|
"tts-ggml": "tts-ggml";
|
|
128
135
|
"parakeet-transcription": "parakeet-transcription";
|
|
136
|
+
"moss-transcribe": "moss-transcribe";
|
|
129
137
|
"ggml-ocr": "ggml-ocr";
|
|
130
138
|
"sdcpp-generation": "sdcpp-generation";
|
|
131
139
|
"audiogen-ggml": "audiogen-ggml";
|
|
@@ -137,7 +145,7 @@ export declare const modelTypeSchema: z.ZodPipe<z.ZodEnum<{
|
|
|
137
145
|
nmt: "nmt";
|
|
138
146
|
parakeet: "parakeet";
|
|
139
147
|
classification: "classification";
|
|
140
|
-
}>, z.ZodTransform<"llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification", "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification">>;
|
|
148
|
+
}>, z.ZodTransform<"llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification", "embeddings" | "diffusion" | "audiogen" | "tts" | "ocr" | "vla" | "llamacpp-completion" | "whispercpp-transcription" | "bci-whispercpp-transcription" | "llamacpp-embedding" | "llamacpp-decision" | "nmtcpp-translation" | "onnx-tts" | "tts-ggml" | "parakeet-transcription" | "moss-transcribe" | "ggml-ocr" | "sdcpp-generation" | "audiogen-ggml" | "ggml-vla" | "ggml-classification" | "llm" | "whisper" | "bci" | "nmt" | "parakeet" | "classification">>;
|
|
141
149
|
/**
|
|
142
150
|
* Normalize model type input to canonical form.
|
|
143
151
|
* Custom plugin types (not in built-ins) are returned as-is.
|
|
@@ -193,6 +201,7 @@ export declare const parakeetModelTypeSchema: z.ZodEnum<{
|
|
|
193
201
|
parakeet: "parakeet";
|
|
194
202
|
}>;
|
|
195
203
|
export type ParakeetModelTypeInput = z.infer<typeof parakeetModelTypeSchema>;
|
|
204
|
+
export declare const mossTranscribeModelTypeSchema: z.ZodLiteral<"moss-transcribe">;
|
|
196
205
|
/**
|
|
197
206
|
* Embeddings model type schema.
|
|
198
207
|
* - Alias: `"embeddings"` → resolves to `"llamacpp-embedding"`
|
|
@@ -10,10 +10,12 @@ export const ModelType = {
|
|
|
10
10
|
whispercppTranscription: 'whispercpp-transcription',
|
|
11
11
|
bciWhispercppTranscription: 'bci-whispercpp-transcription',
|
|
12
12
|
llamacppEmbedding: 'llamacpp-embedding',
|
|
13
|
+
llamacppDecision: 'llamacpp-decision',
|
|
13
14
|
nmtcppTranslation: 'nmtcpp-translation',
|
|
14
15
|
onnxTts: 'onnx-tts',
|
|
15
16
|
ttsGgml: 'tts-ggml',
|
|
16
17
|
parakeetTranscription: 'parakeet-transcription',
|
|
18
|
+
mossTranscribe: 'moss-transcribe',
|
|
17
19
|
ggmlOcr: 'ggml-ocr',
|
|
18
20
|
sdcppGeneration: 'sdcpp-generation',
|
|
19
21
|
audiogenGgml: 'audiogen-ggml',
|
|
@@ -157,6 +159,7 @@ export const bciModelTypeSchema = modelTypeInputSchema
|
|
|
157
159
|
export const parakeetModelTypeSchema = modelTypeInputSchema
|
|
158
160
|
.extract([AliasKeys.parakeet, ModelType.parakeetTranscription])
|
|
159
161
|
.describe('Parakeet model type: "parakeet" (alias) or "parakeet-transcription" (canonical)');
|
|
162
|
+
export const mossTranscribeModelTypeSchema = z.literal(ModelType.mossTranscribe);
|
|
160
163
|
/**
|
|
161
164
|
* Embeddings model type schema.
|
|
162
165
|
* - Alias: `"embeddings"` → resolves to `"llamacpp-embedding"`
|
package/dist/schemas/ocr.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
20
20
|
opencl: "opencl";
|
|
21
21
|
}>>;
|
|
22
22
|
gpuDevice: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
mainGpu: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
24
|
+
integrated: "integrated";
|
|
25
|
+
dedicated: "dedicated";
|
|
26
|
+
}>]>>;
|
|
23
27
|
detectorModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
24
28
|
src: z.ZodString;
|
|
25
29
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -42,10 +46,80 @@ export declare const ocrConfigSchema: z.ZodObject<{
|
|
|
42
46
|
"whispercpp-transcription": "whispercpp-transcription";
|
|
43
47
|
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
44
48
|
"llamacpp-embedding": "llamacpp-embedding";
|
|
49
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
45
50
|
"nmtcpp-translation": "nmtcpp-translation";
|
|
46
51
|
"onnx-tts": "onnx-tts";
|
|
47
52
|
"tts-ggml": "tts-ggml";
|
|
48
53
|
"parakeet-transcription": "parakeet-transcription";
|
|
54
|
+
"moss-transcribe": "moss-transcribe";
|
|
55
|
+
"ggml-ocr": "ggml-ocr";
|
|
56
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
57
|
+
"audiogen-ggml": "audiogen-ggml";
|
|
58
|
+
"ggml-vla": "ggml-vla";
|
|
59
|
+
"ggml-classification": "ggml-classification";
|
|
60
|
+
llm: "llm";
|
|
61
|
+
whisper: "whisper";
|
|
62
|
+
bci: "bci";
|
|
63
|
+
nmt: "nmt";
|
|
64
|
+
parakeet: "parakeet";
|
|
65
|
+
classification: "classification";
|
|
66
|
+
}>, z.ZodLiteral<"vad">]>>;
|
|
67
|
+
}, z.core.$strip>]>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export declare function refineOcrMainGpuSelector(config: Pick<OCRConfig, 'gpuDevice' | 'mainGpu'>, ctx: z.RefinementCtx): void;
|
|
70
|
+
export declare function refineOcrMainGpu(config: Pick<OCRConfig, 'backendDevice' | 'gpuDevice' | 'mainGpu'>, ctx: z.RefinementCtx): void;
|
|
71
|
+
export declare const ocrLoadConfigSchema: z.ZodObject<{
|
|
72
|
+
langList: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
pipelineType: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
easyocr: "easyocr";
|
|
75
|
+
doctr: "doctr";
|
|
76
|
+
}>>;
|
|
77
|
+
magRatio: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
canvasSize: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
defaultRotationAngles: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
80
|
+
contrastRetry: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
lowConfidenceThreshold: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
recognizerBatchSize: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
nThreads: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
backendDevice: z.ZodOptional<z.ZodEnum<{
|
|
85
|
+
cpu: "cpu";
|
|
86
|
+
vulkan: "vulkan";
|
|
87
|
+
metal: "metal";
|
|
88
|
+
opencl: "opencl";
|
|
89
|
+
}>>;
|
|
90
|
+
gpuDevice: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
mainGpu: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
92
|
+
integrated: "integrated";
|
|
93
|
+
dedicated: "dedicated";
|
|
94
|
+
}>]>>;
|
|
95
|
+
detectorModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
96
|
+
src: z.ZodString;
|
|
97
|
+
name: z.ZodOptional<z.ZodString>;
|
|
98
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
registryPath: z.ZodOptional<z.ZodString>;
|
|
100
|
+
registrySource: z.ZodOptional<z.ZodString>;
|
|
101
|
+
blobCoreKey: z.ZodOptional<z.ZodString>;
|
|
102
|
+
blobIndex: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
104
|
+
expectedSize: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
sha256Checksum: z.ZodOptional<z.ZodString>;
|
|
106
|
+
addon: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
107
|
+
embeddings: "embeddings";
|
|
108
|
+
diffusion: "diffusion";
|
|
109
|
+
audiogen: "audiogen";
|
|
110
|
+
tts: "tts";
|
|
111
|
+
ocr: "ocr";
|
|
112
|
+
vla: "vla";
|
|
113
|
+
"llamacpp-completion": "llamacpp-completion";
|
|
114
|
+
"whispercpp-transcription": "whispercpp-transcription";
|
|
115
|
+
"bci-whispercpp-transcription": "bci-whispercpp-transcription";
|
|
116
|
+
"llamacpp-embedding": "llamacpp-embedding";
|
|
117
|
+
"llamacpp-decision": "llamacpp-decision";
|
|
118
|
+
"nmtcpp-translation": "nmtcpp-translation";
|
|
119
|
+
"onnx-tts": "onnx-tts";
|
|
120
|
+
"tts-ggml": "tts-ggml";
|
|
121
|
+
"parakeet-transcription": "parakeet-transcription";
|
|
122
|
+
"moss-transcribe": "moss-transcribe";
|
|
49
123
|
"ggml-ocr": "ggml-ocr";
|
|
50
124
|
"sdcpp-generation": "sdcpp-generation";
|
|
51
125
|
"audiogen-ggml": "audiogen-ggml";
|
package/dist/schemas/ocr.js
CHANGED
|
@@ -48,10 +48,52 @@ export const ocrConfigSchema = z.object({
|
|
|
48
48
|
.number()
|
|
49
49
|
.optional()
|
|
50
50
|
.describe("0-based GPU device index for `'vulkan'`/`'metal'`/`'opencl'`; when omitted, prefers a discrete GPU. Ignored for `'cpu'`."),
|
|
51
|
+
mainGpu: z
|
|
52
|
+
.union([
|
|
53
|
+
// Titled so the generated Python model gets a stable name instead of
|
|
54
|
+
// taking the next positional `MainGpuN` from an existing schema.
|
|
55
|
+
z.number().int().min(0).max(2147483647).meta({ title: 'OcrMainGpuIndex' }),
|
|
56
|
+
z.enum(['integrated', 'dedicated'])
|
|
57
|
+
])
|
|
58
|
+
.optional()
|
|
59
|
+
.describe("GPU to use on multi-GPU systems: a ggml registry index, or `'integrated'`/`'dedicated'` to restrict selection to that class. Requires `backendDevice` `'vulkan'`, `'metal'`, or `'opencl'`; cannot be combined with `gpuDevice`. An unavailable class or refused device falls back to CPU; an out-of-range index uses automatic selection. Stripped on mobile."),
|
|
51
60
|
detectorModelSrc: modelSrcInputSchema
|
|
52
61
|
.optional()
|
|
53
62
|
.describe('Text-detector model source (easyocr: CRAFT; doctr: DBNet). Derived from the recognizer model source when omitted.')
|
|
54
63
|
});
|
|
64
|
+
const OCR_GPU_BACKEND_DEVICES = new Set([
|
|
65
|
+
'vulkan',
|
|
66
|
+
'metal',
|
|
67
|
+
'opencl'
|
|
68
|
+
]);
|
|
69
|
+
// Applied where a model config is validated rather than on `ocrConfigSchema`
|
|
70
|
+
// itself: zod refuses `.partial()` on an object carrying refinements.
|
|
71
|
+
// Request schemas run before device defaults are merged, so they only reject
|
|
72
|
+
// the selector conflict the caller wrote; `backendDevice` may still come from
|
|
73
|
+
// a default.
|
|
74
|
+
export function refineOcrMainGpuSelector(config, ctx) {
|
|
75
|
+
if (config.mainGpu === undefined || config.gpuDevice === undefined)
|
|
76
|
+
return;
|
|
77
|
+
ctx.addIssue({
|
|
78
|
+
code: 'custom',
|
|
79
|
+
path: ['mainGpu'],
|
|
80
|
+
message: 'mainGpu cannot be combined with gpuDevice. Use only one GPU selector.'
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Full rule, for the merged config the plugin loads.
|
|
84
|
+
export function refineOcrMainGpu(config, ctx) {
|
|
85
|
+
refineOcrMainGpuSelector(config, ctx);
|
|
86
|
+
if (config.mainGpu === undefined)
|
|
87
|
+
return;
|
|
88
|
+
if (!OCR_GPU_BACKEND_DEVICES.has(config.backendDevice)) {
|
|
89
|
+
ctx.addIssue({
|
|
90
|
+
code: 'custom',
|
|
91
|
+
path: ['mainGpu'],
|
|
92
|
+
message: `mainGpu requires backendDevice 'vulkan', 'metal', or 'opencl' (got ${config.backendDevice === undefined ? "the default 'cpu'" : `'${config.backendDevice}'`}).`
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export const ocrLoadConfigSchema = ocrConfigSchema.superRefine(refineOcrMainGpu);
|
|
55
97
|
// Image input types
|
|
56
98
|
export const imageInputSchema = z.discriminatedUnion('type', [
|
|
57
99
|
z.object({
|
package/dist/schemas/plugin.d.ts
CHANGED
|
@@ -135,7 +135,8 @@ export interface QvacPlugin<TConfig = Record<string, unknown>, TArtifactKeys ext
|
|
|
135
135
|
/**
|
|
136
136
|
* The engine's own fitter. Carrying it here keeps every addon specifier
|
|
137
137
|
* inside the module graph of the plugin that owns it, so a bundler walking a
|
|
138
|
-
* host that ships one engine never resolves the others.
|
|
138
|
+
* host that ships one engine never resolves the others. It returns the
|
|
139
|
+
* engine's fit result or a Promise of it.
|
|
139
140
|
*/
|
|
140
141
|
assessFit?: (request: never) => unknown;
|
|
141
142
|
handlers: Record<string, PluginHandlerDefinition>;
|
|
@@ -275,6 +276,11 @@ export declare const pluginDefinitionRuntimeSchema: z.ZodObject<{
|
|
|
275
276
|
* Provides: completion, streaming chat, tool calling.
|
|
276
277
|
*/
|
|
277
278
|
export declare const PLUGIN_LLM: "@qvac/inference/llamacpp-completion/plugin";
|
|
279
|
+
/**
|
|
280
|
+
* Decision plugin (llama.cpp).
|
|
281
|
+
* Provides: typed choice, score, and noul answers about a state.
|
|
282
|
+
*/
|
|
283
|
+
export declare const PLUGIN_DECISION: "@qvac/inference/llamacpp-decision/plugin";
|
|
278
284
|
/**
|
|
279
285
|
* Text embedding plugin (llama.cpp).
|
|
280
286
|
* Provides: vector embeddings for RAG and semantic search.
|
|
@@ -340,7 +346,7 @@ export declare const PLUGIN_CLASSIFICATION: "@qvac/inference/ggml-classification
|
|
|
340
346
|
* plugins: [...BUILTIN_PLUGINS, myCustomPlugin],
|
|
341
347
|
* };
|
|
342
348
|
*/
|
|
343
|
-
export declare const BUILTIN_PLUGINS: readonly ["@qvac/inference/llamacpp-completion/plugin", "@qvac/inference/llamacpp-embedding/plugin", "@qvac/inference/whispercpp-transcription/plugin", "@qvac/inference/bci-whispercpp-transcription/plugin", "@qvac/inference/parakeet-transcription/plugin", "@qvac/inference/nmtcpp-translation/plugin", "@qvac/inference/tts-ggml/plugin", "@qvac/inference/ggml-ocr/plugin", "@qvac/inference/sdcpp-generation/plugin", "@qvac/inference/audiogen-ggml/plugin", "@qvac/inference/ggml-vla/plugin", "@qvac/inference/ggml-classification/plugin"];
|
|
349
|
+
export declare const BUILTIN_PLUGINS: readonly ["@qvac/inference/llamacpp-completion/plugin", "@qvac/inference/llamacpp-embedding/plugin", "@qvac/inference/llamacpp-decision/plugin", "@qvac/inference/whispercpp-transcription/plugin", "@qvac/inference/bci-whispercpp-transcription/plugin", "@qvac/inference/parakeet-transcription/plugin", "@qvac/inference/nmtcpp-translation/plugin", "@qvac/inference/tts-ggml/plugin", "@qvac/inference/ggml-ocr/plugin", "@qvac/inference/sdcpp-generation/plugin", "@qvac/inference/audiogen-ggml/plugin", "@qvac/inference/ggml-vla/plugin", "@qvac/inference/ggml-classification/plugin"];
|
|
344
350
|
export type BuiltinPlugin = (typeof BUILTIN_PLUGINS)[number];
|
|
345
351
|
/** Native addon package for LLM completion (llama.cpp) */
|
|
346
352
|
export declare const ADDON_LLM: "@qvac/llm-llamacpp";
|
package/dist/schemas/plugin.js
CHANGED
|
@@ -142,6 +142,11 @@ export const pluginDefinitionRuntimeSchema = z
|
|
|
142
142
|
* Provides: completion, streaming chat, tool calling.
|
|
143
143
|
*/
|
|
144
144
|
export const PLUGIN_LLM = '@qvac/inference/llamacpp-completion/plugin';
|
|
145
|
+
/**
|
|
146
|
+
* Decision plugin (llama.cpp).
|
|
147
|
+
* Provides: typed choice, score, and noul answers about a state.
|
|
148
|
+
*/
|
|
149
|
+
export const PLUGIN_DECISION = '@qvac/inference/llamacpp-decision/plugin';
|
|
145
150
|
/**
|
|
146
151
|
* Text embedding plugin (llama.cpp).
|
|
147
152
|
* Provides: vector embeddings for RAG and semantic search.
|
|
@@ -210,6 +215,7 @@ export const PLUGIN_CLASSIFICATION = '@qvac/inference/ggml-classification/plugin
|
|
|
210
215
|
export const BUILTIN_PLUGINS = [
|
|
211
216
|
PLUGIN_LLM,
|
|
212
217
|
PLUGIN_EMBEDDING,
|
|
218
|
+
PLUGIN_DECISION,
|
|
213
219
|
PLUGIN_WHISPER,
|
|
214
220
|
PLUGIN_BCI,
|
|
215
221
|
PLUGIN_PARAKEET,
|
|
@@ -472,16 +472,16 @@ export declare const operationEventSchema: z.ZodObject<{
|
|
|
472
472
|
gpu: "gpu";
|
|
473
473
|
}>;
|
|
474
474
|
graphicsApi: z.ZodOptional<z.ZodEnum<{
|
|
475
|
+
cuda: "cuda";
|
|
475
476
|
vulkan: "vulkan";
|
|
476
477
|
metal: "metal";
|
|
477
478
|
opencl: "opencl";
|
|
478
|
-
|
|
479
|
+
rocm: "rocm";
|
|
479
480
|
opengl: "opengl";
|
|
480
481
|
webgpu: "webgpu";
|
|
481
482
|
direct3d11: "direct3d11";
|
|
482
483
|
direct3d12: "direct3d12";
|
|
483
484
|
levelZero: "levelZero";
|
|
484
|
-
rocm: "rocm";
|
|
485
485
|
}>>;
|
|
486
486
|
driver: z.ZodOptional<z.ZodObject<{
|
|
487
487
|
name: z.ZodString;
|
|
@@ -733,16 +733,16 @@ export declare const profilingResponseMetaSchema: z.ZodObject<{
|
|
|
733
733
|
gpu: "gpu";
|
|
734
734
|
}>;
|
|
735
735
|
graphicsApi: z.ZodOptional<z.ZodEnum<{
|
|
736
|
+
cuda: "cuda";
|
|
736
737
|
vulkan: "vulkan";
|
|
737
738
|
metal: "metal";
|
|
738
739
|
opencl: "opencl";
|
|
739
|
-
|
|
740
|
+
rocm: "rocm";
|
|
740
741
|
opengl: "opengl";
|
|
741
742
|
webgpu: "webgpu";
|
|
742
743
|
direct3d11: "direct3d11";
|
|
743
744
|
direct3d12: "direct3d12";
|
|
744
745
|
levelZero: "levelZero";
|
|
745
|
-
rocm: "rocm";
|
|
746
746
|
}>>;
|
|
747
747
|
driver: z.ZodOptional<z.ZodObject<{
|
|
748
748
|
name: z.ZodString;
|