bios-sdk 0.1.1-dev.16 → 0.1.1-dev.19
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/dist/resources/gpu.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare class GPU {
|
|
|
33
33
|
* Uses the model's parameter count and architecture to suggest
|
|
34
34
|
* the best GPU type and count for training.
|
|
35
35
|
*
|
|
36
|
-
* @param modelId - Full
|
|
36
|
+
* @param modelId - Full model id (e.g. "meta-llama/Llama-3.1-8B-Instruct").
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
package/dist/resources/gpu.js
CHANGED
|
@@ -54,7 +54,7 @@ export class GPU {
|
|
|
54
54
|
* Uses the model's parameter count and architecture to suggest
|
|
55
55
|
* the best GPU type and count for training.
|
|
56
56
|
*
|
|
57
|
-
* @param modelId - Full
|
|
57
|
+
* @param modelId - Full model id (e.g. "meta-llama/Llama-3.1-8B-Instruct").
|
|
58
58
|
*
|
|
59
59
|
* @example
|
|
60
60
|
* ```ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpClient } from '../client.js';
|
|
2
2
|
import type { ModelSearchParams, ModelSearchResponse, ModelConfig, AdapterCompatibilityParams, AdapterCompatibilityResponse, ArchitectureScope, SupportedArchitecturesResponse } from '../types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Access the BIOS model catalog -- search
|
|
4
|
+
* Access the BIOS model catalog -- search models, fetch
|
|
5
5
|
* training-relevant configuration, and check adapter compatibility.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Models {
|
|
@@ -9,7 +9,7 @@ export declare class Models {
|
|
|
9
9
|
/** @internal */
|
|
10
10
|
constructor(_http: HttpClient);
|
|
11
11
|
/**
|
|
12
|
-
* Search the
|
|
12
|
+
* Search the model catalog for fine-tunable models.
|
|
13
13
|
*
|
|
14
14
|
* Results are filtered to exclude quantized derivatives (GGUF, GPTQ, AWQ)
|
|
15
15
|
* and adapters by default -- pass `kind: "adapter"` to find LoRA adapters.
|
|
@@ -24,13 +24,13 @@ export declare class Models {
|
|
|
24
24
|
*/
|
|
25
25
|
search(params?: ModelSearchParams): Promise<ModelSearchResponse>;
|
|
26
26
|
/**
|
|
27
|
-
* Fetch the training configuration for a specific model from
|
|
27
|
+
* Fetch the training configuration for a specific model from the catalog.
|
|
28
28
|
*
|
|
29
29
|
* Returns parameter counts, architecture type, and whether the model
|
|
30
30
|
* uses Mixture-of-Experts -- information needed to choose the right
|
|
31
31
|
* GPU and adapter configuration.
|
|
32
32
|
*
|
|
33
|
-
* @param modelId - Full
|
|
33
|
+
* @param modelId - Full model id (e.g. "meta-llama/Llama-3.1-8B").
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* ```ts
|
|
@@ -58,7 +58,7 @@ export declare class Models {
|
|
|
58
58
|
/**
|
|
59
59
|
* List the architectures the platform supports for a given scope. This is
|
|
60
60
|
* the authoritative registry the platform gates on:
|
|
61
|
-
* - `inference` —
|
|
61
|
+
* - `inference` — architecture classes that can be served (deployed).
|
|
62
62
|
* - `training` — architecture keys the fine-tuning wizard/gate accepts.
|
|
63
63
|
*
|
|
64
64
|
* A `count` of 0 means the registry is empty and nothing is explicitly
|
package/dist/resources/models.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Access the BIOS model catalog -- search
|
|
2
|
+
* Access the BIOS model catalog -- search models, fetch
|
|
3
3
|
* training-relevant configuration, and check adapter compatibility.
|
|
4
4
|
*/
|
|
5
5
|
export class Models {
|
|
@@ -9,7 +9,7 @@ export class Models {
|
|
|
9
9
|
this._http = _http;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Search the
|
|
12
|
+
* Search the model catalog for fine-tunable models.
|
|
13
13
|
*
|
|
14
14
|
* Results are filtered to exclude quantized derivatives (GGUF, GPTQ, AWQ)
|
|
15
15
|
* and adapters by default -- pass `kind: "adapter"` to find LoRA adapters.
|
|
@@ -49,13 +49,13 @@ export class Models {
|
|
|
49
49
|
return this._http.fetchGet(`/api/public/model-search?${q}`);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Fetch the training configuration for a specific model from
|
|
52
|
+
* Fetch the training configuration for a specific model from the catalog.
|
|
53
53
|
*
|
|
54
54
|
* Returns parameter counts, architecture type, and whether the model
|
|
55
55
|
* uses Mixture-of-Experts -- information needed to choose the right
|
|
56
56
|
* GPU and adapter configuration.
|
|
57
57
|
*
|
|
58
|
-
* @param modelId - Full
|
|
58
|
+
* @param modelId - Full model id (e.g. "meta-llama/Llama-3.1-8B").
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
61
|
* ```ts
|
|
@@ -96,7 +96,7 @@ export class Models {
|
|
|
96
96
|
/**
|
|
97
97
|
* List the architectures the platform supports for a given scope. This is
|
|
98
98
|
* the authoritative registry the platform gates on:
|
|
99
|
-
* - `inference` —
|
|
99
|
+
* - `inference` — architecture classes that can be served (deployed).
|
|
100
100
|
* - `training` — architecture keys the fine-tuning wizard/gate accepts.
|
|
101
101
|
*
|
|
102
102
|
* A `count` of 0 means the registry is empty and nothing is explicitly
|
|
@@ -10,11 +10,26 @@ export declare class Training {
|
|
|
10
10
|
/** Return the authoritative BIOS image, method, adapter, and hyperparameter contract. */
|
|
11
11
|
capabilities(): Promise<TrainingCapabilities>;
|
|
12
12
|
/**
|
|
13
|
-
* Create a new training job.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* training
|
|
17
|
-
*
|
|
13
|
+
* Create a new training job (book-before-reveal).
|
|
14
|
+
*
|
|
15
|
+
* The call blocks while the ranked GPU ladder is booked (~40s typical). A
|
|
16
|
+
* training id and the "training started" email exist only once a real pod is
|
|
17
|
+
* secured, so the returned `status` is one of:
|
|
18
|
+
*
|
|
19
|
+
* - `"booked"` — a GPU was secured (booked == secured); the job then
|
|
20
|
+
* progresses through provisioning, downloading, and running on its own.
|
|
21
|
+
* - `"securing"` — still booking at the deadline; the async tail continues.
|
|
22
|
+
* Poll {@link get} until it reaches `booked`/`running` (or terminal).
|
|
23
|
+
* Nothing is charged until a pod is real.
|
|
24
|
+
* - `"queued"` — returned only with explicit queue consent
|
|
25
|
+
* (`queueIfUnavailable: true`); waits for stock at zero charge and books
|
|
26
|
+
* via the same path.
|
|
27
|
+
*
|
|
28
|
+
* If the ladder is exhausted at booking time without queue consent, this
|
|
29
|
+
* rejects with a `CAPACITY_UNAVAILABLE` (HTTP 409) carrying neutral
|
|
30
|
+
* alternatives — no phantom job remains and nothing is billed. The SDK never
|
|
31
|
+
* auto-substitutes a GPU; a transient 503 is a retry, never a capacity
|
|
32
|
+
* verdict.
|
|
18
33
|
*
|
|
19
34
|
* @example
|
|
20
35
|
* ```ts
|
|
@@ -120,7 +135,12 @@ export declare class Training {
|
|
|
120
135
|
*/
|
|
121
136
|
stop(id: string, keepData?: boolean): Promise<TrainingStopResponse>;
|
|
122
137
|
/**
|
|
123
|
-
* Resume a stopped training job from its last checkpoint.
|
|
138
|
+
* Resume a stopped or `interrupted` training job from its last checkpoint.
|
|
139
|
+
*
|
|
140
|
+
* Use this on a `stopped` job, or one resting at `interrupted` — the
|
|
141
|
+
* self-heal state a started job enters when its pod is lost and billing has
|
|
142
|
+
* already been stopped (distinct from `failed`). Resume re-books on secured
|
|
143
|
+
* capacity before reporting resumed, so book-before-reveal still applies.
|
|
124
144
|
*
|
|
125
145
|
* @param id - Training job ID.
|
|
126
146
|
*
|
|
@@ -191,11 +191,26 @@ export class Training {
|
|
|
191
191
|
return this._http.fetchGet('/api/training/capabilities');
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
|
-
* Create a new training job.
|
|
194
|
+
* Create a new training job (book-before-reveal).
|
|
195
195
|
*
|
|
196
|
-
*
|
|
197
|
-
* training
|
|
198
|
-
*
|
|
196
|
+
* The call blocks while the ranked GPU ladder is booked (~40s typical). A
|
|
197
|
+
* training id and the "training started" email exist only once a real pod is
|
|
198
|
+
* secured, so the returned `status` is one of:
|
|
199
|
+
*
|
|
200
|
+
* - `"booked"` — a GPU was secured (booked == secured); the job then
|
|
201
|
+
* progresses through provisioning, downloading, and running on its own.
|
|
202
|
+
* - `"securing"` — still booking at the deadline; the async tail continues.
|
|
203
|
+
* Poll {@link get} until it reaches `booked`/`running` (or terminal).
|
|
204
|
+
* Nothing is charged until a pod is real.
|
|
205
|
+
* - `"queued"` — returned only with explicit queue consent
|
|
206
|
+
* (`queueIfUnavailable: true`); waits for stock at zero charge and books
|
|
207
|
+
* via the same path.
|
|
208
|
+
*
|
|
209
|
+
* If the ladder is exhausted at booking time without queue consent, this
|
|
210
|
+
* rejects with a `CAPACITY_UNAVAILABLE` (HTTP 409) carrying neutral
|
|
211
|
+
* alternatives — no phantom job remains and nothing is billed. The SDK never
|
|
212
|
+
* auto-substitutes a GPU; a transient 503 is a retry, never a capacity
|
|
213
|
+
* verdict.
|
|
199
214
|
*
|
|
200
215
|
* @example
|
|
201
216
|
* ```ts
|
|
@@ -363,7 +378,12 @@ export class Training {
|
|
|
363
378
|
return this._http.fetchPost(`/api/training/jobs/${encodeURIComponent(id)}/stop`, { keep_data: keepData });
|
|
364
379
|
}
|
|
365
380
|
/**
|
|
366
|
-
* Resume a stopped training job from its last checkpoint.
|
|
381
|
+
* Resume a stopped or `interrupted` training job from its last checkpoint.
|
|
382
|
+
*
|
|
383
|
+
* Use this on a `stopped` job, or one resting at `interrupted` — the
|
|
384
|
+
* self-heal state a started job enters when its pod is lost and billing has
|
|
385
|
+
* already been stopped (distinct from `failed`). Resume re-books on secured
|
|
386
|
+
* capacity before reporting resumed, so book-before-reveal still applies.
|
|
367
387
|
*
|
|
368
388
|
* @param id - Training job ID.
|
|
369
389
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -99,9 +99,9 @@ export interface AvailableGpuAlternative {
|
|
|
99
99
|
tier?: string;
|
|
100
100
|
recommended?: boolean;
|
|
101
101
|
}
|
|
102
|
-
/** A model returned from the
|
|
102
|
+
/** A model returned from the catalog model search. */
|
|
103
103
|
export interface Model {
|
|
104
|
-
/** Full
|
|
104
|
+
/** Full model id (e.g. "meta-llama/Llama-3.1-8B"). */
|
|
105
105
|
id: string;
|
|
106
106
|
/** Model author / organization. */
|
|
107
107
|
author: string;
|
|
@@ -115,11 +115,11 @@ export interface Model {
|
|
|
115
115
|
architecture: 'dense' | 'moe';
|
|
116
116
|
/** Model type: "llm" or "vlm". */
|
|
117
117
|
modelType: 'llm' | 'vlm';
|
|
118
|
-
/**
|
|
118
|
+
/** Raw model_type from config.json. */
|
|
119
119
|
hfModelType: string | null;
|
|
120
|
-
/** Download count
|
|
120
|
+
/** Download count from the catalog. */
|
|
121
121
|
downloads: number;
|
|
122
|
-
/** Like count
|
|
122
|
+
/** Like count from the catalog. */
|
|
123
123
|
likes: number;
|
|
124
124
|
/** Whether this is a private model. */
|
|
125
125
|
isPrivate: boolean;
|
|
@@ -148,7 +148,7 @@ export interface ModelSearchParams {
|
|
|
148
148
|
visibility?: 'all' | 'public' | 'private';
|
|
149
149
|
/** Model kind: "full" (base models only) or "adapter". */
|
|
150
150
|
kind?: 'full' | 'adapter';
|
|
151
|
-
/**
|
|
151
|
+
/** Integration ID for accessing private models. */
|
|
152
152
|
integrationId?: string;
|
|
153
153
|
}
|
|
154
154
|
/** Response from a model search. */
|
|
@@ -160,9 +160,9 @@ export interface ModelSearchResponse {
|
|
|
160
160
|
hasMore: boolean;
|
|
161
161
|
hfUsername: string;
|
|
162
162
|
}
|
|
163
|
-
/** Model configuration from
|
|
163
|
+
/** Model configuration from the model's config.json. */
|
|
164
164
|
export interface ModelConfig {
|
|
165
|
-
/** Full
|
|
165
|
+
/** Full model id. */
|
|
166
166
|
modelId: string;
|
|
167
167
|
/** Model type from config.json (e.g. "llama", "qwen2"). */
|
|
168
168
|
model_type: string | null;
|
|
@@ -389,9 +389,9 @@ export type RLHFAlgorithm = 'dpo' | 'simpo' | 'cpo' | 'orpo' | 'kto' | 'rm';
|
|
|
389
389
|
/** Supported adapter types. */
|
|
390
390
|
export type AdapterType = 'lora' | 'qlora' | 'adalora' | 'full' | 'loha' | 'lokr' | 'boft' | 'oft' | 'vera' | 'fourierft' | 'bone' | 'adapter' | 'reft' | 'llamapro' | 'longlora';
|
|
391
391
|
/** Training job status values. */
|
|
392
|
-
export type TrainingJobStatus = 'pending' | 'queued' | 'provisioning' | 'preparing' | 'starting' | 'downloading' | 'running' | 'completed' | 'failed' | 'saving' | 'stopped' | 'stopping' | 'resuming' | 'cancelled';
|
|
392
|
+
export type TrainingJobStatus = 'pending' | 'queued' | 'securing' | 'booked' | 'provisioning' | 'preparing' | 'starting' | 'downloading' | 'running' | 'completed' | 'failed' | 'interrupted' | 'saving' | 'stopped' | 'stopping' | 'resuming' | 'cancelled';
|
|
393
393
|
/** Status values accepted by GET /api/training/jobs?status=. */
|
|
394
|
-
export type TrainingStatusFilter = 'pending' | 'queued' | 'provisioning' | 'preparing' | 'starting' | 'running' | 'saving' | 'completed' | 'failed' | 'stopped';
|
|
394
|
+
export type TrainingStatusFilter = 'pending' | 'queued' | 'securing' | 'booked' | 'provisioning' | 'preparing' | 'starting' | 'running' | 'interrupted' | 'saving' | 'completed' | 'failed' | 'stopped';
|
|
395
395
|
/** One ranked GPU fallback choice. The first choice is the primary. */
|
|
396
396
|
export interface GPUChoice {
|
|
397
397
|
gpuType: string;
|
|
@@ -407,9 +407,9 @@ export interface GPUChoice {
|
|
|
407
407
|
export interface TrainingCreateParams {
|
|
408
408
|
/** Stable retry key. Reuse it after a timeout; a new value creates a new job. Auto-generated when omitted. */
|
|
409
409
|
idempotencyKey?: string;
|
|
410
|
-
/**
|
|
410
|
+
/** Model id to fine-tune. */
|
|
411
411
|
model: string;
|
|
412
|
-
/** Optional
|
|
412
|
+
/** Optional model branch, tag, or commit; the API canonicalizes it to an exact commit. */
|
|
413
413
|
modelRevision?: string;
|
|
414
414
|
/** One dataset ID to train on. Kept for compatibility with single-dataset jobs. */
|
|
415
415
|
datasetId?: string;
|
|
@@ -490,7 +490,7 @@ export interface TrainingCreateParams {
|
|
|
490
490
|
modelParamsB?: number;
|
|
491
491
|
/** Active-parameter hint for MoE models in billions. */
|
|
492
492
|
modelActiveParamsB?: number;
|
|
493
|
-
/**
|
|
493
|
+
/** Integration used for gated/private model access. */
|
|
494
494
|
integrationId?: string;
|
|
495
495
|
/** Existing network volume to attach. */
|
|
496
496
|
networkVolumeId?: string;
|
|
@@ -882,9 +882,9 @@ export interface GPUPricingResponse {
|
|
|
882
882
|
/** Parameters understood by the authenticated training GPU-options endpoint. */
|
|
883
883
|
export interface GPUOptionsParams {
|
|
884
884
|
modelId: string;
|
|
885
|
-
/** Requested
|
|
885
|
+
/** Requested model branch, tag, or commit; response returns the exact commit. */
|
|
886
886
|
modelRevision?: string;
|
|
887
|
-
/** Stored
|
|
887
|
+
/** Stored integration used for gated or private models. */
|
|
888
888
|
integrationId?: string;
|
|
889
889
|
/** Canonical adapter/train type. */
|
|
890
890
|
trainType?: AdapterType | string;
|
|
@@ -928,9 +928,9 @@ export interface GPUOptionSuggestion {
|
|
|
928
928
|
}
|
|
929
929
|
export interface GPUOptionsResponse {
|
|
930
930
|
options: GPUOption[];
|
|
931
|
-
/** Canonical
|
|
931
|
+
/** Canonical owner/model identity. */
|
|
932
932
|
model_id: string;
|
|
933
|
-
/** Exact immutable 40-hex
|
|
933
|
+
/** Exact immutable 40-hex model commit used for sizing. */
|
|
934
934
|
model_revision: string;
|
|
935
935
|
model_params_b: number;
|
|
936
936
|
min_vram_gb: number;
|
|
@@ -1253,7 +1253,7 @@ export interface InferenceGPUAlternative {
|
|
|
1253
1253
|
export interface InferenceGPUOptionsParams {
|
|
1254
1254
|
/**
|
|
1255
1255
|
* MODEL-ADDRESSED sizing (recommended): the SERVER resolves the model facts
|
|
1256
|
-
* from this
|
|
1256
|
+
* from this model id (optionally with `revision`) and computes
|
|
1257
1257
|
* min_gpus/valid_counts/bookable_counts — the same single implementation the
|
|
1258
1258
|
* create gate enforces. When set, the deprecated client-fact params below
|
|
1259
1259
|
* are unnecessary.
|
|
@@ -1262,7 +1262,7 @@ export interface InferenceGPUOptionsParams {
|
|
|
1262
1262
|
revision?: string;
|
|
1263
1263
|
/** Size from an existing deployment's pinned facts instead of a model id. */
|
|
1264
1264
|
inferenceId?: string;
|
|
1265
|
-
/**
|
|
1265
|
+
/** Integration for gated models when using `model`. */
|
|
1266
1266
|
hfIntegrationId?: string;
|
|
1267
1267
|
/** DEPRECATED client-fact path; required only when `model`/`inferenceId` are absent. */
|
|
1268
1268
|
paramsB?: number;
|
|
@@ -1406,10 +1406,10 @@ export interface AdapterCompatibilityResponse {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
/** One entry in the supported-architecture registry. */
|
|
1408
1408
|
export interface SupportedArchitecture {
|
|
1409
|
-
/** For inference: the
|
|
1409
|
+
/** For inference: the architecture class (e.g. "LlamaForCausalLM"). For training: the arch key (e.g. "llama"). */
|
|
1410
1410
|
architecture: string;
|
|
1411
1411
|
display_name: string;
|
|
1412
|
-
/** Comma-separated
|
|
1412
|
+
/** Comma-separated model_type aliases this entry covers. */
|
|
1413
1413
|
model_types: string;
|
|
1414
1414
|
enabled: boolean;
|
|
1415
1415
|
notes: string;
|
|
@@ -1426,7 +1426,7 @@ export interface SupportedArchitecturesResponse {
|
|
|
1426
1426
|
export interface AdapterCompatibilityParams {
|
|
1427
1427
|
/** Architecture key (e.g. "llama", "qwen2"). */
|
|
1428
1428
|
architecture?: string;
|
|
1429
|
-
/**
|
|
1429
|
+
/** The model's model_type for automatic architecture detection. */
|
|
1430
1430
|
modelType?: string;
|
|
1431
1431
|
/** Training method. Defaults to "sft". */
|
|
1432
1432
|
trainingMethod?: TrainingMethod;
|