@qvac/sdk 0.8.2 → 0.9.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 +267 -63
- package/README.md +2 -0
- package/dist/client/api/diffusion.d.ts +32 -0
- package/dist/client/api/diffusion.js +103 -0
- package/dist/client/api/embed.d.ts +9 -3
- package/dist/client/api/embed.js +4 -1
- package/dist/client/api/finetune.d.ts +69 -0
- package/dist/client/api/finetune.js +139 -0
- package/dist/client/api/get-model-info.d.ts +1 -1
- package/dist/client/api/index.d.ts +4 -0
- package/dist/client/api/index.js +4 -0
- package/dist/client/api/rag.d.ts +1 -1
- package/dist/client/api/rag.js +1 -1
- package/dist/client/api/resume.d.ts +14 -0
- package/dist/client/api/resume.js +20 -0
- package/dist/client/api/suspend.d.ts +13 -0
- package/dist/client/api/suspend.js +19 -0
- package/dist/client/api/transcribe.d.ts +25 -17
- package/dist/client/api/transcribe.js +115 -35
- package/dist/client/rpc/bare-client.d.ts +5 -1
- package/dist/client/rpc/bare-client.js +70 -57
- package/dist/client/rpc/expo-rpc-client.d.ts +4 -0
- package/dist/client/rpc/expo-rpc-client.js +8 -0
- package/dist/client/rpc/node-rpc-client.d.ts +4 -0
- package/dist/client/rpc/node-rpc-client.js +8 -0
- package/dist/client/rpc/rpc-client.d.ts +13 -0
- package/dist/client/rpc/rpc-client.js +131 -1
- package/dist/examples/delegated-inference/composite.d.ts +2 -0
- package/dist/examples/delegated-inference/composite.js +99 -0
- package/dist/examples/diffusion-flux2-klein.d.ts +2 -0
- package/dist/examples/diffusion-flux2-klein.js +46 -0
- package/dist/examples/diffusion-simple.d.ts +2 -0
- package/dist/examples/diffusion-simple.js +17 -0
- package/dist/examples/diffusion-txt2img.d.ts +2 -0
- package/dist/examples/diffusion-txt2img.js +40 -0
- package/dist/examples/embed-p2p.js +2 -2
- package/dist/examples/finetune/llamacpp-finetune.d.ts +2 -0
- package/dist/examples/finetune/llamacpp-finetune.js +78 -0
- package/dist/examples/logging-streaming.js +1 -1
- package/dist/examples/mcp-websearch.js +2 -0
- package/dist/examples/ocr-fasttext.js +11 -0
- package/dist/examples/profiling/per-call.js +3 -3
- package/dist/examples/rag/rag-chromadb.js +2 -2
- package/dist/examples/rag/rag-hyperdb/pipeline.js +1 -1
- package/dist/examples/rag/rag-lancedb.js +2 -2
- package/dist/examples/rag/rag-sqlite.js +2 -2
- package/dist/examples/suspend-resume.d.ts +2 -0
- package/dist/examples/suspend-resume.js +52 -0
- package/dist/examples/transcription/parakeet-ctc-filesystem.js +3 -5
- package/dist/examples/transcription/parakeet-microphone-record.js +42 -33
- package/dist/examples/transcription/parakeet-sortformer.js +13 -3
- package/dist/examples/transcription/parakeet-tdt-filesystem.js +5 -7
- package/dist/examples/transcription/whispercpp-filesystem-streaming.d.ts +2 -0
- package/dist/examples/transcription/whispercpp-filesystem-streaming.js +99 -0
- package/dist/examples/transcription/whispercpp-microphone-record.js +78 -299
- package/dist/examples/transcription/whispercpp-prompt.js +11 -0
- package/dist/examples/translation/translation-llm.js +2 -2
- package/dist/examples/tts/supertonic-multilingual.d.ts +2 -0
- package/dist/examples/tts/supertonic-multilingual.js +56 -0
- package/dist/examples/tts/supertonic.js +12 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/logging/utils.js +1 -1
- package/dist/models/registry/models.d.ts +15176 -4264
- package/dist/models/registry/models.js +18657 -7404
- package/dist/models/update-models/codegen.js +2 -2
- package/dist/models/update-models/naming.js +26 -0
- package/dist/pear/pre.js +2 -0
- package/dist/polyfills/bare-globals.d.ts +2 -0
- package/dist/polyfills/bare-globals.js +4 -0
- package/dist/polyfills/bare-globals.noop.d.ts +2 -0
- package/dist/polyfills/bare-globals.noop.js +1 -0
- package/dist/profiling/exporters.js +16 -11
- package/dist/profiling/model-execution.d.ts +16 -0
- package/dist/profiling/model-execution.js +33 -0
- package/dist/schemas/common.d.ts +967 -198
- package/dist/schemas/common.js +16 -1
- package/dist/schemas/completion-stream.d.ts +14 -6
- package/dist/schemas/completion-stream.js +4 -3
- package/dist/schemas/download-asset.d.ts +7 -3
- package/dist/schemas/embed.d.ts +19 -0
- package/dist/schemas/embed.js +7 -0
- package/dist/schemas/engine-addon-map.js +4 -1
- package/dist/schemas/finetune.d.ts +620 -0
- package/dist/schemas/finetune.js +161 -0
- package/dist/schemas/get-model-info.d.ts +2 -0
- package/dist/schemas/get-model-info.js +1 -0
- package/dist/schemas/index.d.ts +5 -1
- package/dist/schemas/index.js +5 -1
- package/dist/schemas/llamacpp-config.d.ts +26 -6
- package/dist/schemas/llamacpp-config.js +12 -0
- package/dist/schemas/load-model.d.ts +4005 -1400
- package/dist/schemas/load-model.js +34 -1
- package/dist/schemas/model-src-utils.d.ts +10 -2
- package/dist/schemas/model-types.d.ts +19 -1
- package/dist/schemas/model-types.js +11 -0
- package/dist/schemas/ocr.d.ts +2 -0
- package/dist/schemas/plugin.d.ts +24 -3
- package/dist/schemas/plugin.js +14 -0
- package/dist/schemas/profiling.d.ts +4 -0
- package/dist/schemas/profiling.js +4 -0
- package/dist/schemas/registry.d.ts +18 -0
- package/dist/schemas/registry.js +2 -0
- package/dist/schemas/reload-config.d.ts +9 -1
- package/dist/schemas/resume.d.ts +10 -0
- package/dist/schemas/resume.js +7 -0
- package/dist/schemas/sdcpp-config.d.ts +327 -0
- package/dist/schemas/sdcpp-config.js +102 -0
- package/dist/schemas/sdk-config.d.ts +1225 -235
- package/dist/schemas/sdk-config.js +4 -0
- package/dist/schemas/sdk-errors-server.d.ts +2 -0
- package/dist/schemas/sdk-errors-server.js +12 -0
- package/dist/schemas/suspend.d.ts +10 -0
- package/dist/schemas/suspend.js +7 -0
- package/dist/schemas/text-to-speech.d.ts +187 -10
- package/dist/schemas/text-to-speech.js +12 -4
- package/dist/schemas/transcription-config.d.ts +16 -56
- package/dist/schemas/transcription-config.js +0 -2
- package/dist/schemas/transcription.d.ts +66 -6
- package/dist/schemas/transcription.js +29 -7
- package/dist/schemas/translate.d.ts +14 -4
- package/dist/schemas/translate.js +10 -2
- package/dist/schemas/translation-config.d.ts +30 -10
- package/dist/server/bare/delegate-rpc-client.js +3 -3
- package/dist/server/bare/hyperswarm.js +15 -3
- package/dist/server/bare/ops/embed.d.ts +8 -4
- package/dist/server/bare/ops/embed.js +15 -4
- package/dist/server/bare/ops/transcribe.d.ts +6 -2
- package/dist/server/bare/ops/transcribe.js +53 -1
- package/dist/server/bare/ops/translate.d.ts +4 -1
- package/dist/server/bare/ops/translate.js +28 -65
- package/dist/server/bare/ops/unload-model.js +2 -0
- package/dist/server/bare/plugins/index.d.ts +1 -0
- package/dist/server/bare/plugins/index.js +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.d.ts +1 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/cache-logger.js +3 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.d.ts +3 -1
- package/dist/server/bare/plugins/llamacpp-completion/ops/completion-stream.js +57 -11
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.d.ts +11 -0
- package/dist/server/bare/plugins/llamacpp-completion/ops/finetune.js +112 -0
- package/dist/server/bare/plugins/llamacpp-completion/plugin.d.ts +175 -5
- package/dist/server/bare/plugins/llamacpp-completion/plugin.js +45 -35
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.d.ts +11 -1
- package/dist/server/bare/plugins/llamacpp-embedding/plugin.js +9 -4
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.d.ts +17 -2
- package/dist/server/bare/plugins/nmtcpp-translation/plugin.js +16 -15
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.d.ts +5 -7
- package/dist/server/bare/plugins/onnx-ocr/ops/ocr-stream.js +11 -3
- package/dist/server/bare/plugins/onnx-ocr/plugin.d.ts +2 -0
- package/dist/server/bare/plugins/onnx-ocr/plugin.js +24 -19
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.d.ts +7 -2
- package/dist/server/bare/plugins/onnx-tts/ops/text-to-speech.js +22 -97
- package/dist/server/bare/plugins/onnx-tts/plugin.d.ts +98 -9
- package/dist/server/bare/plugins/onnx-tts/plugin.js +85 -46
- package/dist/server/bare/plugins/parakeet-transcription/plugin.d.ts +30 -60
- package/dist/server/bare/plugins/parakeet-transcription/plugin.js +49 -37
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.d.ts +3 -0
- package/dist/server/bare/plugins/sdcpp-generation/ops/diffusion.js +51 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.d.ts +278 -0
- package/dist/server/bare/plugins/sdcpp-generation/plugin.js +70 -0
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.d.ts +38 -2
- package/dist/server/bare/plugins/whispercpp-transcription/plugin.js +43 -22
- package/dist/server/bare/rag-hyperdb/handlers/ingest.js +2 -1
- package/dist/server/bare/rag-hyperdb/handlers/search.js +2 -1
- package/dist/server/bare/rag-hyperdb/rag-workspace-manager.js +7 -0
- package/dist/server/bare/registry/model-config-utils.js +3 -0
- package/dist/server/bare/registry/model-registry.d.ts +2 -2
- package/dist/server/bare/registry/model-registry.js +1 -1
- package/dist/server/bare/registry/registry-client.js +21 -0
- package/dist/server/bare/runtime-lifecycle.d.ts +28 -0
- package/dist/server/bare/runtime-lifecycle.js +132 -0
- package/dist/server/bare/types/addon-responses.d.ts +62 -0
- package/dist/server/bare/types/addon-responses.js +1 -0
- package/dist/server/env.js +3 -1
- package/dist/server/rpc/delegate-transport.js +1 -1
- package/dist/server/rpc/handle-request.js +50 -4
- package/dist/server/rpc/handler-registry.js +20 -1
- package/dist/server/rpc/handler-utils.d.ts +5 -3
- package/dist/server/rpc/handler-utils.js +52 -50
- package/dist/server/rpc/handlers/delete-cache.js +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.d.ts +3 -0
- package/dist/server/rpc/handlers/diffusion-stream.js +4 -0
- package/dist/server/rpc/handlers/finetune.d.ts +3 -0
- package/dist/server/rpc/handlers/finetune.js +16 -0
- package/dist/server/rpc/handlers/index.d.ts +10 -0
- package/dist/server/rpc/handlers/index.js +10 -0
- package/dist/server/rpc/handlers/load-model/hyperdrive.js +24 -9
- package/dist/server/rpc/handlers/load-model/registry.d.ts +11 -0
- package/dist/server/rpc/handlers/load-model/registry.js +31 -4
- package/dist/server/rpc/handlers/plugin-dispatch.d.ts +1 -13
- package/dist/server/rpc/handlers/plugin-dispatch.js +21 -21
- package/dist/server/rpc/handlers/resume.d.ts +3 -0
- package/dist/server/rpc/handlers/resume.js +11 -0
- package/dist/server/rpc/handlers/suspend.d.ts +3 -0
- package/dist/server/rpc/handlers/suspend.js +11 -0
- package/dist/server/rpc/handlers/transcribe-stream.d.ts +1 -1
- package/dist/server/rpc/handlers/transcribe-stream.js +2 -2
- package/dist/server/rpc/handlers/transcribe.d.ts +3 -0
- package/dist/server/rpc/handlers/transcribe.js +4 -0
- package/dist/server/rpc/profiling/operation-metrics.js +107 -16
- package/dist/server/rpc/profiling/operation-wrappers.d.ts +1 -1
- package/dist/server/rpc/profiling/operation-wrappers.js +51 -19
- package/dist/server/rpc/progress-throttle.d.ts +8 -0
- package/dist/server/rpc/progress-throttle.js +47 -0
- package/dist/server/rpc/rpc-utils.d.ts +5 -0
- package/dist/server/rpc/rpc-utils.js +11 -0
- package/dist/server/utils/path-security.js +1 -1
- package/dist/server/utils/tool-integration.js +10 -0
- package/dist/server/utils/tool-parser.js +9 -5
- package/dist/server/worker-core.d.ts +2 -0
- package/dist/server/worker-core.js +26 -23
- package/dist/server/worker.js +2 -1
- package/dist/utils/encoding.d.ts +9 -0
- package/dist/utils/encoding.js +14 -0
- package/dist/utils/errors-server.d.ts +6 -0
- package/dist/utils/errors-server.js +11 -0
- package/package.json +81 -25
- package/dist/server/rpc/delegate-utils.d.ts +0 -2
- package/dist/server/rpc/delegate-utils.js +0 -5
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const lrSchedulerValues = ["constant", "cosine", "linear"];
|
|
3
|
+
const finetuneStatusValues = [
|
|
4
|
+
"IDLE",
|
|
5
|
+
"RUNNING",
|
|
6
|
+
"PAUSED",
|
|
7
|
+
"CANCELLED",
|
|
8
|
+
"COMPLETED",
|
|
9
|
+
];
|
|
10
|
+
export const finetuneValidationSchema = z
|
|
11
|
+
.discriminatedUnion("type", [
|
|
12
|
+
z
|
|
13
|
+
.object({
|
|
14
|
+
type: z.literal("none"),
|
|
15
|
+
})
|
|
16
|
+
.strict(),
|
|
17
|
+
z
|
|
18
|
+
.object({
|
|
19
|
+
type: z.literal("split"),
|
|
20
|
+
fraction: z.number().min(0).max(1).optional(),
|
|
21
|
+
})
|
|
22
|
+
.strict(),
|
|
23
|
+
z
|
|
24
|
+
.object({
|
|
25
|
+
type: z.literal("dataset"),
|
|
26
|
+
path: z.string().min(1, "Validation dataset path cannot be empty"),
|
|
27
|
+
})
|
|
28
|
+
.strict(),
|
|
29
|
+
])
|
|
30
|
+
.transform((validation) => validation.type === "split"
|
|
31
|
+
? {
|
|
32
|
+
...validation,
|
|
33
|
+
fraction: validation.fraction ?? 0.05,
|
|
34
|
+
}
|
|
35
|
+
: validation);
|
|
36
|
+
const finetuneOptionsPayloadSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
trainDatasetDir: z.string().min(1, "Training dataset path cannot be empty"),
|
|
39
|
+
validation: finetuneValidationSchema,
|
|
40
|
+
outputParametersDir: z.string().min(1, "Output parameters path cannot be empty"),
|
|
41
|
+
numberOfEpochs: z.number().int().positive().optional(),
|
|
42
|
+
learningRate: z.number().positive().optional(),
|
|
43
|
+
contextLength: z.number().int().positive().optional(),
|
|
44
|
+
batchSize: z.number().int().positive().optional(),
|
|
45
|
+
microBatchSize: z.number().int().positive().optional(),
|
|
46
|
+
assistantLossOnly: z.boolean().optional(),
|
|
47
|
+
loraRank: z.number().int().positive().optional(),
|
|
48
|
+
loraAlpha: z.number().positive().optional(),
|
|
49
|
+
loraInitStd: z.number().positive().optional(),
|
|
50
|
+
loraSeed: z.number().int().optional(),
|
|
51
|
+
loraModules: z.string().min(1).optional(),
|
|
52
|
+
checkpointSaveDir: z.string().min(1).optional(),
|
|
53
|
+
checkpointSaveSteps: z.number().int().min(0).optional(),
|
|
54
|
+
chatTemplatePath: z.string().min(1).optional(),
|
|
55
|
+
lrScheduler: z.enum(lrSchedulerValues).optional(),
|
|
56
|
+
lrMin: z.number().min(0).optional(),
|
|
57
|
+
warmupRatio: z.number().min(0).max(1).optional(),
|
|
58
|
+
warmupRatioSet: z.boolean().optional(),
|
|
59
|
+
warmupSteps: z.number().int().min(0).optional(),
|
|
60
|
+
warmupStepsSet: z.boolean().optional(),
|
|
61
|
+
weightDecay: z.number().min(0).optional(),
|
|
62
|
+
})
|
|
63
|
+
.strict();
|
|
64
|
+
const finetuneModelParamsSchema = z
|
|
65
|
+
.object({
|
|
66
|
+
modelId: z.string(),
|
|
67
|
+
})
|
|
68
|
+
.strict();
|
|
69
|
+
const finetuneRunParamsSchemaBase = finetuneModelParamsSchema
|
|
70
|
+
.extend({
|
|
71
|
+
options: finetuneOptionsPayloadSchema,
|
|
72
|
+
})
|
|
73
|
+
.strict();
|
|
74
|
+
export const finetuneRunParamsSchema = finetuneRunParamsSchemaBase
|
|
75
|
+
.extend({
|
|
76
|
+
operation: z.enum(["start", "resume"]).optional(),
|
|
77
|
+
})
|
|
78
|
+
.strict();
|
|
79
|
+
export const finetuneGetStateParamsSchema = finetuneRunParamsSchemaBase
|
|
80
|
+
.extend({
|
|
81
|
+
operation: z.literal("getState"),
|
|
82
|
+
})
|
|
83
|
+
.strict();
|
|
84
|
+
export const finetuneStopParamsSchema = finetuneModelParamsSchema
|
|
85
|
+
.extend({
|
|
86
|
+
operation: z.enum(["pause", "cancel"]),
|
|
87
|
+
})
|
|
88
|
+
.strict();
|
|
89
|
+
export const finetuneParamsSchema = z.union([
|
|
90
|
+
finetuneRunParamsSchema,
|
|
91
|
+
finetuneGetStateParamsSchema,
|
|
92
|
+
finetuneStopParamsSchema,
|
|
93
|
+
]);
|
|
94
|
+
export const finetuneRunRequestSchema = finetuneRunParamsSchemaBase
|
|
95
|
+
.extend({
|
|
96
|
+
type: z.literal("finetune"),
|
|
97
|
+
operation: z.enum(["start", "resume"]).optional(),
|
|
98
|
+
withProgress: z.boolean().optional(),
|
|
99
|
+
})
|
|
100
|
+
.strict();
|
|
101
|
+
export const finetuneGetStateRequestSchema = finetuneRunParamsSchemaBase
|
|
102
|
+
.extend({
|
|
103
|
+
type: z.literal("finetune"),
|
|
104
|
+
operation: z.literal("getState"),
|
|
105
|
+
})
|
|
106
|
+
.strict();
|
|
107
|
+
export const finetuneStopRequestSchema = finetuneModelParamsSchema
|
|
108
|
+
.extend({
|
|
109
|
+
type: z.literal("finetune"),
|
|
110
|
+
operation: z.enum(["pause", "cancel"]),
|
|
111
|
+
})
|
|
112
|
+
.strict();
|
|
113
|
+
export const finetuneRequestSchema = z.union([
|
|
114
|
+
finetuneRunRequestSchema,
|
|
115
|
+
finetuneGetStateRequestSchema,
|
|
116
|
+
finetuneStopRequestSchema,
|
|
117
|
+
]);
|
|
118
|
+
export const finetuneStatusSchema = z.enum(finetuneStatusValues);
|
|
119
|
+
export const finetuneProgressSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
is_train: z.boolean(),
|
|
122
|
+
loss: z.xor([z.number(), z.nan()]).nullable(),
|
|
123
|
+
loss_uncertainty: z.xor([z.number(), z.nan()]).nullable(),
|
|
124
|
+
accuracy: z.xor([z.number(), z.nan()]).nullable(),
|
|
125
|
+
accuracy_uncertainty: z.xor([z.number(), z.nan()]).nullable(),
|
|
126
|
+
global_steps: z.number().int().min(0),
|
|
127
|
+
current_epoch: z.number().int().min(0),
|
|
128
|
+
current_batch: z.number().int().min(0),
|
|
129
|
+
total_batches: z.number().int().min(0),
|
|
130
|
+
elapsed_ms: z.number().min(0),
|
|
131
|
+
eta_ms: z.number().min(0),
|
|
132
|
+
})
|
|
133
|
+
.strict();
|
|
134
|
+
export const finetuneStatsSchema = z
|
|
135
|
+
.object({
|
|
136
|
+
train_loss: z.number().optional(),
|
|
137
|
+
train_loss_uncertainty: z.xor([z.number(), z.nan()]).nullable().optional(),
|
|
138
|
+
val_loss: z.number().optional(),
|
|
139
|
+
val_loss_uncertainty: z.xor([z.number(), z.nan()]).nullable().optional(),
|
|
140
|
+
train_accuracy: z.number().optional(),
|
|
141
|
+
train_accuracy_uncertainty: z.xor([z.number(), z.nan()]).nullable().optional(),
|
|
142
|
+
val_accuracy: z.number().optional(),
|
|
143
|
+
val_accuracy_uncertainty: z.xor([z.number(), z.nan()]).nullable().optional(),
|
|
144
|
+
learning_rate: z.number().optional(),
|
|
145
|
+
global_steps: z.number().int().min(0),
|
|
146
|
+
epochs_completed: z.number().int().min(0),
|
|
147
|
+
})
|
|
148
|
+
.strict();
|
|
149
|
+
export const finetuneResponseSchema = z
|
|
150
|
+
.object({
|
|
151
|
+
type: z.literal("finetune"),
|
|
152
|
+
status: finetuneStatusSchema,
|
|
153
|
+
stats: finetuneStatsSchema.optional(),
|
|
154
|
+
})
|
|
155
|
+
.strict();
|
|
156
|
+
export const finetuneProgressResponseSchema = finetuneProgressSchema
|
|
157
|
+
.extend({
|
|
158
|
+
type: z.literal("finetune:progress"),
|
|
159
|
+
modelId: z.string(),
|
|
160
|
+
})
|
|
161
|
+
.strict();
|
|
@@ -42,6 +42,7 @@ export declare const modelInfoSchema: z.ZodObject<{
|
|
|
42
42
|
parakeet: "parakeet";
|
|
43
43
|
tts: "tts";
|
|
44
44
|
ocr: "ocr";
|
|
45
|
+
diffusion: "diffusion";
|
|
45
46
|
vad: "vad";
|
|
46
47
|
other: "other";
|
|
47
48
|
}>;
|
|
@@ -88,6 +89,7 @@ export declare const getModelInfoResponseSchema: z.ZodObject<{
|
|
|
88
89
|
parakeet: "parakeet";
|
|
89
90
|
tts: "tts";
|
|
90
91
|
ocr: "ocr";
|
|
92
|
+
diffusion: "diffusion";
|
|
91
93
|
vad: "vad";
|
|
92
94
|
other: "other";
|
|
93
95
|
}>;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./delegate";
|
|
|
6
6
|
export * from "./delete-cache";
|
|
7
7
|
export * from "./download-asset";
|
|
8
8
|
export * from "./embed";
|
|
9
|
+
export * from "./finetune";
|
|
9
10
|
export * from "./load-model";
|
|
10
11
|
export * from "./reload-config";
|
|
11
12
|
export * from "./logging-stream";
|
|
@@ -23,12 +24,15 @@ export * from "./text-to-speech";
|
|
|
23
24
|
export * from "./error";
|
|
24
25
|
export * from "./rag";
|
|
25
26
|
export * from "./ocr";
|
|
27
|
+
export * from "./sdcpp-config";
|
|
26
28
|
export * from "./shard";
|
|
29
|
+
export * from "./suspend";
|
|
30
|
+
export * from "./resume";
|
|
27
31
|
export { SDK_CLIENT_ERROR_CODES } from "./sdk-errors-client";
|
|
28
32
|
export { SDK_SERVER_ERROR_CODES } from "./sdk-errors-server";
|
|
29
33
|
export { REGISTRY_ERROR_CODES } from "./sdk-errors-registry";
|
|
30
34
|
export { qvacConfigSchema, deviceMatchSchema, deviceConfigDefaultsSchema, devicePatternSchema, type QvacConfig, type DeviceMatch, type DeviceConfigDefaults, type DevicePattern, } from "./sdk-config";
|
|
31
|
-
export { PROFILING_KEY, PROFILING_TRAILER_KEY, DELEGATION_BREAKDOWN_KEY, OPERATION_EVENT_KEY, profilerModeSchema, serverBreakdownSchema, delegationBreakdownSchema, operationEventSchema, profilingRequestMetaSchema, profilingResponseMetaSchema, perCallProfilingSchema, type ProfilerMode, type ServerBreakdown, type DelegationBreakdown, type OperationEvent, type ProfilingRequestMeta, type ProfilingResponseMeta, type PerCallProfiling, } from "./profiling";
|
|
35
|
+
export { PROFILING_KEY, PROFILING_TRAILER_KEY, DELEGATION_BREAKDOWN_KEY, OPERATION_EVENT_KEY, MODEL_EXECUTION_KEY, profilerModeSchema, serverBreakdownSchema, delegationBreakdownSchema, operationEventSchema, profilingRequestMetaSchema, profilingResponseMetaSchema, perCallProfilingSchema, type ProfilerMode, type ServerBreakdown, type DelegationBreakdown, type OperationEvent, type ProfilingRequestMeta, type ProfilingResponseMeta, type PerCallProfiling, } from "./profiling";
|
|
32
36
|
export { runtimeContextSchema, type RuntimeContext } from "./runtime-context";
|
|
33
37
|
export * from "./get-model-info";
|
|
34
38
|
export * from "./model-src-utils";
|
package/dist/schemas/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./delegate.js";
|
|
|
7
7
|
export * from "./delete-cache.js";
|
|
8
8
|
export * from "./download-asset.js";
|
|
9
9
|
export * from "./embed.js";
|
|
10
|
+
export * from "./finetune.js";
|
|
10
11
|
export * from "./load-model.js";
|
|
11
12
|
export * from "./reload-config.js";
|
|
12
13
|
export * from "./logging-stream.js";
|
|
@@ -24,12 +25,15 @@ export * from "./text-to-speech.js";
|
|
|
24
25
|
export * from "./error.js";
|
|
25
26
|
export * from "./rag.js";
|
|
26
27
|
export * from "./ocr.js";
|
|
28
|
+
export * from "./sdcpp-config.js";
|
|
27
29
|
export * from "./shard.js";
|
|
30
|
+
export * from "./suspend.js";
|
|
31
|
+
export * from "./resume.js";
|
|
28
32
|
export { SDK_CLIENT_ERROR_CODES } from "./sdk-errors-client.js";
|
|
29
33
|
export { SDK_SERVER_ERROR_CODES } from "./sdk-errors-server.js";
|
|
30
34
|
export { REGISTRY_ERROR_CODES } from "./sdk-errors-registry.js";
|
|
31
35
|
export { qvacConfigSchema, deviceMatchSchema, deviceConfigDefaultsSchema, devicePatternSchema, } from "./sdk-config.js";
|
|
32
|
-
export { PROFILING_KEY, PROFILING_TRAILER_KEY, DELEGATION_BREAKDOWN_KEY, OPERATION_EVENT_KEY, profilerModeSchema, serverBreakdownSchema, delegationBreakdownSchema, operationEventSchema, profilingRequestMetaSchema, profilingResponseMetaSchema, perCallProfilingSchema, } from "./profiling.js";
|
|
36
|
+
export { PROFILING_KEY, PROFILING_TRAILER_KEY, DELEGATION_BREAKDOWN_KEY, OPERATION_EVENT_KEY, MODEL_EXECUTION_KEY, profilerModeSchema, serverBreakdownSchema, delegationBreakdownSchema, operationEventSchema, profilingRequestMetaSchema, profilingResponseMetaSchema, perCallProfilingSchema, } from "./profiling.js";
|
|
33
37
|
export { runtimeContextSchema } from "./runtime-context.js";
|
|
34
38
|
export * from "./get-model-info.js";
|
|
35
39
|
export * from "./model-src-utils.js";
|
|
@@ -24,6 +24,9 @@ export declare const llmConfigBaseSchema: z.ZodObject<{
|
|
|
24
24
|
stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
n_discarded: z.ZodOptional<z.ZodNumber>;
|
|
26
26
|
tools: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
"cache-type-k": z.ZodOptional<z.ZodString>;
|
|
28
|
+
"cache-type-v": z.ZodOptional<z.ZodString>;
|
|
29
|
+
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
27
30
|
projectionModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
28
31
|
src: z.ZodString;
|
|
29
32
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -43,6 +46,7 @@ export declare const llmConfigBaseSchema: z.ZodObject<{
|
|
|
43
46
|
"onnx-tts": "onnx-tts";
|
|
44
47
|
"parakeet-transcription": "parakeet-transcription";
|
|
45
48
|
"onnx-ocr": "onnx-ocr";
|
|
49
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
46
50
|
llm: "llm";
|
|
47
51
|
whisper: "whisper";
|
|
48
52
|
embeddings: "embeddings";
|
|
@@ -50,6 +54,7 @@ export declare const llmConfigBaseSchema: z.ZodObject<{
|
|
|
50
54
|
parakeet: "parakeet";
|
|
51
55
|
tts: "tts";
|
|
52
56
|
ocr: "ocr";
|
|
57
|
+
diffusion: "diffusion";
|
|
53
58
|
}>, z.ZodLiteral<"vad">]>>;
|
|
54
59
|
}, z.core.$strip>]>>;
|
|
55
60
|
}, z.core.$strip>;
|
|
@@ -79,6 +84,9 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
79
84
|
stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
85
|
n_discarded: z.ZodOptional<z.ZodNumber>;
|
|
81
86
|
tools: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
"cache-type-k": z.ZodOptional<z.ZodString>;
|
|
88
|
+
"cache-type-v": z.ZodOptional<z.ZodString>;
|
|
89
|
+
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
82
90
|
projectionModelSrc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
83
91
|
src: z.ZodString;
|
|
84
92
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -98,6 +106,7 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
98
106
|
"onnx-tts": "onnx-tts";
|
|
99
107
|
"parakeet-transcription": "parakeet-transcription";
|
|
100
108
|
"onnx-ocr": "onnx-ocr";
|
|
109
|
+
"sdcpp-generation": "sdcpp-generation";
|
|
101
110
|
llm: "llm";
|
|
102
111
|
whisper: "whisper";
|
|
103
112
|
embeddings: "embeddings";
|
|
@@ -105,6 +114,7 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
105
114
|
parakeet: "parakeet";
|
|
106
115
|
tts: "tts";
|
|
107
116
|
ocr: "ocr";
|
|
117
|
+
diffusion: "diffusion";
|
|
108
118
|
}>, z.ZodLiteral<"vad">]>>;
|
|
109
119
|
}, z.core.$strip>]>>;
|
|
110
120
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -126,6 +136,9 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
126
136
|
stop_sequences?: string[] | undefined;
|
|
127
137
|
n_discarded?: number | undefined;
|
|
128
138
|
tools?: boolean | undefined;
|
|
139
|
+
"cache-type-k"?: string | undefined;
|
|
140
|
+
"cache-type-v"?: string | undefined;
|
|
141
|
+
openclCacheDir?: string | undefined;
|
|
129
142
|
projectionModelSrc?: string | {
|
|
130
143
|
src: string;
|
|
131
144
|
name?: string | undefined;
|
|
@@ -137,7 +150,7 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
137
150
|
engine?: string | undefined;
|
|
138
151
|
expectedSize?: number | undefined;
|
|
139
152
|
sha256Checksum?: string | undefined;
|
|
140
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
153
|
+
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
141
154
|
} | undefined;
|
|
142
155
|
}, {
|
|
143
156
|
ctx_size?: number | undefined;
|
|
@@ -158,6 +171,9 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
158
171
|
stop_sequences?: string[] | undefined;
|
|
159
172
|
n_discarded?: number | undefined;
|
|
160
173
|
tools?: boolean | undefined;
|
|
174
|
+
"cache-type-k"?: string | undefined;
|
|
175
|
+
"cache-type-v"?: string | undefined;
|
|
176
|
+
openclCacheDir?: string | undefined;
|
|
161
177
|
projectionModelSrc?: string | {
|
|
162
178
|
src: string;
|
|
163
179
|
name?: string | undefined;
|
|
@@ -169,15 +185,15 @@ export declare const llmConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
169
185
|
engine?: string | undefined;
|
|
170
186
|
expectedSize?: number | undefined;
|
|
171
187
|
sha256Checksum?: string | undefined;
|
|
172
|
-
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "vad" | undefined;
|
|
188
|
+
addon?: "llamacpp-completion" | "whispercpp-transcription" | "llamacpp-embedding" | "nmtcpp-translation" | "onnx-tts" | "parakeet-transcription" | "onnx-ocr" | "sdcpp-generation" | "llm" | "whisper" | "embeddings" | "nmt" | "parakeet" | "tts" | "ocr" | "diffusion" | "vad" | undefined;
|
|
173
189
|
} | undefined;
|
|
174
190
|
}>>;
|
|
175
191
|
export type LlmConfig = z.infer<typeof llmConfigSchema>;
|
|
176
192
|
export declare const embedConfigBaseSchema: z.ZodObject<{
|
|
177
193
|
gpuLayers: z.ZodOptional<z.ZodNumber>;
|
|
178
194
|
device: z.ZodOptional<z.ZodEnum<{
|
|
179
|
-
gpu: "gpu";
|
|
180
195
|
cpu: "cpu";
|
|
196
|
+
gpu: "gpu";
|
|
181
197
|
}>>;
|
|
182
198
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
183
199
|
pooling: z.ZodOptional<z.ZodEnum<{
|
|
@@ -202,6 +218,7 @@ export declare const embedConfigBaseSchema: z.ZodObject<{
|
|
|
202
218
|
dedicated: "dedicated";
|
|
203
219
|
}>]>>;
|
|
204
220
|
verbosity: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
221
|
+
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
205
222
|
}, z.core.$strip>;
|
|
206
223
|
export type EmbedConfigInput = z.infer<typeof embedConfigBaseSchema>;
|
|
207
224
|
export declare const EMBED_CONFIG_DEFAULTS: {
|
|
@@ -212,8 +229,8 @@ export declare const EMBED_CONFIG_DEFAULTS: {
|
|
|
212
229
|
export declare const embedConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
213
230
|
gpuLayers: z.ZodOptional<z.ZodNumber>;
|
|
214
231
|
device: z.ZodOptional<z.ZodEnum<{
|
|
215
|
-
gpu: "gpu";
|
|
216
232
|
cpu: "cpu";
|
|
233
|
+
gpu: "gpu";
|
|
217
234
|
}>>;
|
|
218
235
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
219
236
|
pooling: z.ZodOptional<z.ZodEnum<{
|
|
@@ -238,9 +255,10 @@ export declare const embedConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
238
255
|
dedicated: "dedicated";
|
|
239
256
|
}>]>>;
|
|
240
257
|
verbosity: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
258
|
+
openclCacheDir: z.ZodOptional<z.ZodString>;
|
|
241
259
|
}, z.core.$strip>, z.ZodTransform<{
|
|
242
260
|
gpuLayers: number | undefined;
|
|
243
|
-
device: "
|
|
261
|
+
device: "cpu" | "gpu" | undefined;
|
|
244
262
|
batchSize: number | undefined;
|
|
245
263
|
pooling?: "none" | "mean" | "cls" | "last" | "rank" | undefined;
|
|
246
264
|
attention?: "causal" | "non-causal" | undefined;
|
|
@@ -248,9 +266,10 @@ export declare const embedConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
248
266
|
flashAttention?: "on" | "off" | "auto" | undefined;
|
|
249
267
|
mainGpu?: number | "integrated" | "dedicated" | undefined;
|
|
250
268
|
verbosity?: 0 | 3 | 2 | 1 | undefined;
|
|
269
|
+
openclCacheDir?: string | undefined;
|
|
251
270
|
}, {
|
|
252
271
|
gpuLayers?: number | undefined;
|
|
253
|
-
device?: "
|
|
272
|
+
device?: "cpu" | "gpu" | undefined;
|
|
254
273
|
batchSize?: number | undefined;
|
|
255
274
|
pooling?: "none" | "mean" | "cls" | "last" | "rank" | undefined;
|
|
256
275
|
attention?: "causal" | "non-causal" | undefined;
|
|
@@ -258,6 +277,7 @@ export declare const embedConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
258
277
|
flashAttention?: "on" | "off" | "auto" | undefined;
|
|
259
278
|
mainGpu?: number | "integrated" | "dedicated" | undefined;
|
|
260
279
|
verbosity?: 0 | 3 | 2 | 1 | undefined;
|
|
280
|
+
openclCacheDir?: string | undefined;
|
|
261
281
|
}>>;
|
|
262
282
|
export type EmbedConfig = z.infer<typeof embedConfigSchema>;
|
|
263
283
|
//# sourceMappingURL=llamacpp-config.d.ts.map
|
|
@@ -38,6 +38,13 @@ export const llmConfigBaseSchema = z.object({
|
|
|
38
38
|
stop_sequences: z.array(z.string()).optional(),
|
|
39
39
|
n_discarded: z.number().optional(),
|
|
40
40
|
tools: z.boolean().optional(),
|
|
41
|
+
"cache-type-k": z.string().optional(),
|
|
42
|
+
"cache-type-v": z.string().optional(),
|
|
43
|
+
/**
|
|
44
|
+
* Writable directory for OpenCL kernel binary cache. Required on Android
|
|
45
|
+
* for fast GPU startup.
|
|
46
|
+
*/
|
|
47
|
+
openclCacheDir: z.string().optional(),
|
|
41
48
|
projectionModelSrc: modelSrcInputSchema.optional(),
|
|
42
49
|
});
|
|
43
50
|
// Default values - typed as partial of the config
|
|
@@ -65,6 +72,11 @@ export const embedConfigBaseSchema = z.object({
|
|
|
65
72
|
.union([z.number().int().min(0), z.enum(["integrated", "dedicated"])])
|
|
66
73
|
.optional(),
|
|
67
74
|
verbosity: verbositySchema.optional(),
|
|
75
|
+
/**
|
|
76
|
+
* Writable directory for OpenCL kernel binary cache. Required on Android
|
|
77
|
+
* for fast GPU startup.
|
|
78
|
+
*/
|
|
79
|
+
openclCacheDir: z.string().optional(),
|
|
68
80
|
});
|
|
69
81
|
// Default values - typed as partial of the config
|
|
70
82
|
export const EMBED_CONFIG_DEFAULTS = {
|