runbios-sdk 0.5.0-dev.347 → 0.5.0-dev.350
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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/resources/training.d.ts +19 -7
- package/dist/resources/training.js +25 -6
- package/dist/types.d.ts +28 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
|
|
|
36
36
|
* SDK version. Sent as part of the User-Agent header.
|
|
37
37
|
* Must match package.json "version" -- enforced by a contract test.
|
|
38
38
|
*/
|
|
39
|
-
export declare const VERSION = "0.5.0-dev.
|
|
39
|
+
export declare const VERSION = "0.5.0-dev.350";
|
|
40
40
|
export declare class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
readonly models: Models;
|
|
@@ -79,7 +79,7 @@ export { Wallet } from './resources/wallet.js';
|
|
|
79
79
|
export { GPU, type GPURecommendation } from './resources/gpu.js';
|
|
80
80
|
export { LoopNoVersionError, type LoopChatParams, type LoopChatResult, } from './resources/loop-chat.js';
|
|
81
81
|
export { Inference, validateChatRequest, parseSSE, buildInferenceRequest, contextSizingBasis, type ContextSizingBasis, CONTEXT_DEFAULT_CEILING, CONTEXT_EDITABLE_FLOOR, type ChatMessage, type FunctionTool, type ChatCompletionParams, type ChatCompletionResponse, type ChatCompletionChunk, type InferenceVerbParams, type CompletionParams, type EmbeddingParams, type RerankParams, type AnthropicMessageParams, type AnthropicMessageResponse, type LoopCaptureOption, type LoopSampleIdOnResult, LOOP_PIPELINE_HEADER, LOOP_SAMPLE_ID_HEADER, type ServerlessUsageWindow, type ServerlessTimeseriesMetric, type ServerlessWorkspaceLimits, type ServerlessUsageEnvelope, type ServerlessUsageOverviewResponse, type ServerlessUsageRowsResponse, type ServerlessUsageTimeseriesResponse, type ServerlessUsageDailyResponse, type ServerlessSavingsTotals, type ServerlessSavingsPeriod, type ServerlessUsageSavingsResponse, } from './resources/inference.js';
|
|
82
|
-
export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, InferenceModel, InferenceModelListResponse, ModelConfig, Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatVariant, DatasetFormatSpec, DatasetFormatSpecs, DatasetStorageUsage, TrainingMethod, RLHFAlgorithm, AdapterType, TrainingJobStatus, TrainingStatusFilter, TrainingCreateParams, TrainingStartFromParams, TrainingStartFrom, TrainingExportStep, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCostEstimate, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, TrainingFeature, GPUChoice, WalletBalance, Transaction, TransactionListResponse, TransactionListParams, GPUInfo, GPUPricingResponse, GPUOptionsParams, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingAdvisorRecommendation, TrainingAdvisorUserShape, TrainingAdvisorJustification, TrainingAdvisorBasis, GPUOption, GPUOptionSuggestion, GPUOptionsResponse, InferenceStatus, InferenceCreateParams, InferenceUpdateParams, InferenceDeployment, InferenceDeploymentSummary, InferenceCreateResponse, InferenceListResponse, InferenceUpdateResponse, InferenceLifecycleResponse, InferenceDeleteResponse, InferenceGPUOptionMarket, InferenceGPUOption, InferenceGPUAlternative, InferenceGPUOptionsParams, InferenceGPUOptionsResponse, InferenceCanonicalRequest, InferencePreflightWarning, InferencePreflightResponse, AdapterCompatibility, AdapterCompatibilityResponse, AdapterCompatibilityParams, SupportedArchitecture, ArchitectureScope, SupportedArchitecturesResponse, ApiKey, ApiKeyScope, ApiKeyIntrospection, Organization, OrgMember, OrgInvite, Workspace, Integration, IntegrationCreateParams, StorageUsage, StorageObject, PromptTokensDetails, ChatCompletionUsage, ServingKind, TrainingRulePausedReason, TrainingTrigger, TrainingRecipe, TrainingRunState, TrainingVerdict, TrainingDecision, EvaluationStatus, EvaluationItemStatus, ItemErrorCode, EvaluationWinner, EvaluationItemWinnerFilter, ReportStatusFilter, ReportSort, EvaluationWarningCode, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationWarning, EvaluationMargin, Evaluation, EvaluationItemJudge, EvaluationReferenceKind, EvaluationReference, EvaluationPairwiseOrder, EvaluationItemPairwise, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkCheck, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkRunItemSide, BenchmarkRunItem, BenchmarkRunItemListParams, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, InferenceAlias, InferenceAliasRequest, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunBenchmarkRun, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, BenchmarkRunItemsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, BenchmarkQuestionsParams, BenchmarkQuestionsTraining, BenchmarkQuestionResult, BenchmarkQuestion, BenchmarkQuestionsResponse, TrainingCurvePoint, TrainingCurve, TrainingRuleRunRefusalCode, TrainingRuleSaveRefusalCode, TrainingRuleMonthlyLimitRefusal, PipelineStatus, PipelineActiveRun, PipelineVersion, PipelineAttempt, AttemptExplanation, AttemptMissedBar, PipelineModelRole, PipelineComparedWith, PipelineTotals, PipelineTrainingsByResult, PipelineTrainingsByModel, PipelineSpentParts, PipelineAttemptListParams, PipelineAttemptListResponse, PipelineAttemptModelFilter, PipelineAttemptResultFilter, PipelineAttemptTrigger, PipelineSecondModel, PipelineSecondModelState, Lineage, PipelineChain, PipelineChainRebuild, TrainingRunRollbackRefusalCode, TrainingRunRetestRefusalCode, LoopTraceRebuild, LoopTraceDeleteResponse, PipelineAttemptOutcome, PipelineLiveDeploymentStatus, PipelineLiveDeployment, LoopStorageWhere, LoopStorage, Pipeline, PipelineListParams, PipelineListStatus, PipelineListResponse, PipelineTrainingSettings, PipelineTrainingDefaults, PipelineTrainingRequest, PipelineResponse, PipelineTrainWhen, PipelineSchedule, PipelineWriteRequest, PipelineMutationResponse, PipelineImportParams, PipelineFloors, HeldBackFloors, LoopModel, LoopModelsResponse, LoopUnavailableModel, LoopUnavailableReasonCode, LoopTracePipeline, LoopTracePipelinesResponse, LoopMetricsHistoryParams, LoopMetricPoint, LoopSignalDay, LoopMetricsHistory, LoopCaptureFeedback, LoopFeedbackWord, LoopCaptureHealth, LoopCaptureMiss, LoopSignalManyItem, LoopSignalManyResult, PromotionPolicyState, RuleBenchmark, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, CompareBenchmark, VersionBenchmarkScore, PromotionMeasurement, PromotionOutcome, VersionHoldout, VersionCommonSet, VersionScores, VersionScoreDifference, VersionCompareResponse, VersionCompareParams, TrainingRunPromotion, VerdictCheck, VerdictCheckKey, VerdictChecksWithheld, TrainingRunCost, AttemptDirection, AttemptHoldout, AttemptCompareSide, AttemptSharedSample, AttemptSharedFigures, AttemptBenchmarkSide, AttemptCompareBenchmark, AttemptCompareItemSide, AttemptCompareItem, AttemptCompareResponse, AttemptCompareParams, LoopTraceJudge, LoopJudgeFilter, LoopSampleState, LoopSampleStateName, LoopSampleDay, LoopImportRefusal, PipelineAutoScoring, PipelineAutoScoringStatus, LoopDatasetFeedback, LoopSampleOrigin, LoopFeedbackCounts, LoopPipelineCounts, LoopDatasetPipelineRef, LoopDataset, LoopDatasetWrite, LoopDatasetCreate, LoopDatasetPreviewParams, LoopDatasetPreviewModel, LoopDatasetPreview, LoopDatasetListParams, LoopDatasetListResponse, LoopDatasetCreator, LoopDatasetLearnedBy, LoopDatasetExportParams, LoopDatasetExportLine, LoopDatasetExport, LoopDatasetDeleteResponse, PipelineDatasetRef, PipelineConditions, PipelineConditionsWrite, TrainedOnDataset, TrainedOn, } from './types.js';
|
|
82
|
+
export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, InferenceModel, InferenceModelListResponse, ModelConfig, Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatVariant, DatasetFormatSpec, DatasetFormatSpecs, DatasetStorageUsage, TrainingMethod, RLHFAlgorithm, AdapterType, TrainingJobStatus, TrainingStatusFilter, TrainingCreateParams, TrainingStartFromParams, TrainingStartFrom, TrainingExportStep, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCostEstimate, ManagedTrainingOption, ManagedTrainingOptions, ManagedTrainingOptionsParams, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, TrainingFeature, GPUChoice, WalletBalance, Transaction, TransactionListResponse, TransactionListParams, GPUInfo, GPUPricingResponse, GPUOptionsParams, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingAdvisorRecommendation, TrainingAdvisorUserShape, TrainingAdvisorJustification, TrainingAdvisorBasis, GPUOption, GPUOptionSuggestion, GPUOptionsResponse, InferenceStatus, InferenceCreateParams, InferenceUpdateParams, InferenceDeployment, InferenceDeploymentSummary, InferenceCreateResponse, InferenceListResponse, InferenceUpdateResponse, InferenceLifecycleResponse, InferenceDeleteResponse, InferenceGPUOptionMarket, InferenceGPUOption, InferenceGPUAlternative, InferenceGPUOptionsParams, InferenceGPUOptionsResponse, InferenceCanonicalRequest, InferencePreflightWarning, InferencePreflightResponse, AdapterCompatibility, AdapterCompatibilityResponse, AdapterCompatibilityParams, SupportedArchitecture, ArchitectureScope, SupportedArchitecturesResponse, ApiKey, ApiKeyScope, ApiKeyIntrospection, Organization, OrgMember, OrgInvite, Workspace, Integration, IntegrationCreateParams, StorageUsage, StorageObject, PromptTokensDetails, ChatCompletionUsage, ServingKind, TrainingRulePausedReason, TrainingTrigger, TrainingRecipe, TrainingRunState, TrainingVerdict, TrainingDecision, EvaluationStatus, EvaluationItemStatus, ItemErrorCode, EvaluationWinner, EvaluationItemWinnerFilter, ReportStatusFilter, ReportSort, EvaluationWarningCode, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationWarning, EvaluationMargin, Evaluation, EvaluationItemJudge, EvaluationReferenceKind, EvaluationReference, EvaluationPairwiseOrder, EvaluationItemPairwise, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkCheck, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkRunItemSide, BenchmarkRunItem, BenchmarkRunItemListParams, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, InferenceAlias, InferenceAliasRequest, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunBenchmarkRun, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, BenchmarkRunItemsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, BenchmarkQuestionsParams, BenchmarkQuestionsTraining, BenchmarkQuestionResult, BenchmarkQuestion, BenchmarkQuestionsResponse, TrainingCurvePoint, TrainingCurve, TrainingRuleRunRefusalCode, TrainingRuleSaveRefusalCode, TrainingRuleMonthlyLimitRefusal, PipelineStatus, PipelineActiveRun, PipelineVersion, PipelineAttempt, AttemptExplanation, AttemptMissedBar, PipelineModelRole, PipelineComparedWith, PipelineTotals, PipelineTrainingsByResult, PipelineTrainingsByModel, PipelineSpentParts, PipelineAttemptListParams, PipelineAttemptListResponse, PipelineAttemptModelFilter, PipelineAttemptResultFilter, PipelineAttemptTrigger, PipelineSecondModel, PipelineSecondModelState, Lineage, PipelineChain, PipelineChainRebuild, TrainingRunRollbackRefusalCode, TrainingRunRetestRefusalCode, LoopTraceRebuild, LoopTraceDeleteResponse, PipelineAttemptOutcome, PipelineLiveDeploymentStatus, PipelineLiveDeployment, LoopStorageWhere, LoopStorage, Pipeline, PipelineListParams, PipelineListStatus, PipelineListResponse, PipelineTrainingSettings, PipelineTrainingDefaults, PipelineTrainingRequest, PipelineResponse, PipelineTrainWhen, PipelineSchedule, PipelineWriteRequest, PipelineMutationResponse, PipelineImportParams, PipelineFloors, HeldBackFloors, LoopModel, LoopModelsResponse, LoopUnavailableModel, LoopUnavailableReasonCode, LoopTracePipeline, LoopTracePipelinesResponse, LoopMetricsHistoryParams, LoopMetricPoint, LoopSignalDay, LoopMetricsHistory, LoopCaptureFeedback, LoopFeedbackWord, LoopCaptureHealth, LoopCaptureMiss, LoopSignalManyItem, LoopSignalManyResult, PromotionPolicyState, RuleBenchmark, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, CompareBenchmark, VersionBenchmarkScore, PromotionMeasurement, PromotionOutcome, VersionHoldout, VersionCommonSet, VersionScores, VersionScoreDifference, VersionCompareResponse, VersionCompareParams, TrainingRunPromotion, VerdictCheck, VerdictCheckKey, VerdictChecksWithheld, TrainingRunCost, AttemptDirection, AttemptHoldout, AttemptCompareSide, AttemptSharedSample, AttemptSharedFigures, AttemptBenchmarkSide, AttemptCompareBenchmark, AttemptCompareItemSide, AttemptCompareItem, AttemptCompareResponse, AttemptCompareParams, LoopTraceJudge, LoopJudgeFilter, LoopSampleState, LoopSampleStateName, LoopSampleDay, LoopImportRefusal, PipelineAutoScoring, PipelineAutoScoringStatus, LoopDatasetFeedback, LoopSampleOrigin, LoopFeedbackCounts, LoopPipelineCounts, LoopDatasetPipelineRef, LoopDataset, LoopDatasetWrite, LoopDatasetCreate, LoopDatasetPreviewParams, LoopDatasetPreviewModel, LoopDatasetPreview, LoopDatasetListParams, LoopDatasetListResponse, LoopDatasetCreator, LoopDatasetLearnedBy, LoopDatasetExportParams, LoopDatasetExportLine, LoopDatasetExport, LoopDatasetDeleteResponse, PipelineDatasetRef, PipelineConditions, PipelineConditionsWrite, TrainedOnDataset, TrainedOn, } from './types.js';
|
|
83
83
|
/** The closed set of run states a training run never leaves. */
|
|
84
84
|
export { TERMINAL_RUN_STATES } from './types.js';
|
|
85
85
|
/** The most versions a pipeline may be set to make. */
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
|
|
|
36
36
|
* SDK version. Sent as part of the User-Agent header.
|
|
37
37
|
* Must match package.json "version" -- enforced by a contract test.
|
|
38
38
|
*/
|
|
39
|
-
export const VERSION = '0.5.0-dev.
|
|
39
|
+
export const VERSION = '0.5.0-dev.350';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpClient } from '../client.js';
|
|
2
|
-
import type { TrainingCreateParams, TrainingListParams, TrainingJob, TrainingListResponse, TrainingMetrics, TrainingMetricsOptions, TrainingCheckpoint, TrainingLogs, TrainingStopResponse, TrainingResumeResponse, TrainingPreflightResponse, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingCapabilities } from '../types.js';
|
|
2
|
+
import type { TrainingCreateParams, TrainingListParams, TrainingJob, TrainingListResponse, TrainingMetrics, TrainingMetricsOptions, TrainingCheckpoint, TrainingLogs, TrainingStopResponse, TrainingResumeResponse, TrainingPreflightResponse, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingCapabilities, ManagedTrainingOptions, ManagedTrainingOptionsParams } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Create, monitor, and manage fine-tuning training jobs.
|
|
5
5
|
*/
|
|
@@ -36,12 +36,16 @@ export declare class Training {
|
|
|
36
36
|
* auto-substitutes a GPU; a transient 503 is a retry, never a capacity verdict.
|
|
37
37
|
*
|
|
38
38
|
* Managed training: when `capabilities().features` lists `managed_training`
|
|
39
|
-
* enabled, the platform chooses the hardware.
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
39
|
+
* enabled, the platform chooses the hardware. Choose the context length,
|
|
40
|
+
* precision and optimizer state from `managedOptions()` (context 2K-128K,
|
|
41
|
+
* `bf16`/`fp8`, `adamw_torch_fused` 16-bit or `adamw_8bit` 8-bit state).
|
|
42
|
+
* `gpuType`, `gpuCount`, `gpuPriorities`, `queueIfUnavailable`,
|
|
43
|
+
* `maxPriceHourCents`, batch size, gradient accumulation, scheduler and
|
|
44
|
+
* checkpoint count are then ignored (preflight warns `FIELD_IGNORED`); the
|
|
45
|
+
* job trains a cosine schedule, holds out 5% for validation unless it has
|
|
46
|
+
* evaluation datasets, waits unbilled when no machine is free, keeps its best
|
|
47
|
+
* and latest checkpoints, and with `token_billing` is charged per trained
|
|
48
|
+
* token (`preflight` returns `estimate`).
|
|
45
49
|
*
|
|
46
50
|
* @example
|
|
47
51
|
* ```ts
|
|
@@ -63,6 +67,14 @@ export declare class Training {
|
|
|
63
67
|
create(params: TrainingCreateParams): Promise<TrainingJob>;
|
|
64
68
|
/** Validate and canonicalize a training request without creating or billing a job. */
|
|
65
69
|
preflight(params: TrainingCreateParams): Promise<TrainingPreflightResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Managed training: what this model, method and adapter can be trained with
|
|
72
|
+
* -- the context lengths, precisions (`bf16`, `fp8`) and optimizer states
|
|
73
|
+
* (`adamw_torch_fused` = 16-bit, `adamw_8bit` = 8-bit) its certified setups
|
|
74
|
+
* cover. The platform chooses the hardware; every option listed is accepted
|
|
75
|
+
* by `preflight` and `create`. Empty `options`: not trainable yet.
|
|
76
|
+
*/
|
|
77
|
+
managedOptions(params: ManagedTrainingOptionsParams): Promise<ManagedTrainingOptions>;
|
|
66
78
|
/**
|
|
67
79
|
* Ask the trainer's own sizing model what to run: per-device batch,
|
|
68
80
|
* accumulation, learning rate, warmup, predicted peak memory, minimum GPU
|
|
@@ -242,12 +242,16 @@ export class Training {
|
|
|
242
242
|
* auto-substitutes a GPU; a transient 503 is a retry, never a capacity verdict.
|
|
243
243
|
*
|
|
244
244
|
* Managed training: when `capabilities().features` lists `managed_training`
|
|
245
|
-
* enabled, the platform chooses the hardware.
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
245
|
+
* enabled, the platform chooses the hardware. Choose the context length,
|
|
246
|
+
* precision and optimizer state from `managedOptions()` (context 2K-128K,
|
|
247
|
+
* `bf16`/`fp8`, `adamw_torch_fused` 16-bit or `adamw_8bit` 8-bit state).
|
|
248
|
+
* `gpuType`, `gpuCount`, `gpuPriorities`, `queueIfUnavailable`,
|
|
249
|
+
* `maxPriceHourCents`, batch size, gradient accumulation, scheduler and
|
|
250
|
+
* checkpoint count are then ignored (preflight warns `FIELD_IGNORED`); the
|
|
251
|
+
* job trains a cosine schedule, holds out 5% for validation unless it has
|
|
252
|
+
* evaluation datasets, waits unbilled when no machine is free, keeps its best
|
|
253
|
+
* and latest checkpoints, and with `token_billing` is charged per trained
|
|
254
|
+
* token (`preflight` returns `estimate`).
|
|
251
255
|
*
|
|
252
256
|
* @example
|
|
253
257
|
* ```ts
|
|
@@ -288,6 +292,21 @@ export class Training {
|
|
|
288
292
|
const { body } = buildTrainingRequest(params);
|
|
289
293
|
return this._http.fetchPost('/api/training/preflight', body);
|
|
290
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Managed training: what this model, method and adapter can be trained with
|
|
297
|
+
* -- the context lengths, precisions (`bf16`, `fp8`) and optimizer states
|
|
298
|
+
* (`adamw_torch_fused` = 16-bit, `adamw_8bit` = 8-bit) its certified setups
|
|
299
|
+
* cover. The platform chooses the hardware; every option listed is accepted
|
|
300
|
+
* by `preflight` and `create`. Empty `options`: not trainable yet.
|
|
301
|
+
*/
|
|
302
|
+
async managedOptions(params) {
|
|
303
|
+
const q = new URLSearchParams({
|
|
304
|
+
model_id: params.model,
|
|
305
|
+
training_method: params.method === 'cpt' ? 'pt' : params.method || 'sft',
|
|
306
|
+
train_type: params.adapter || 'lora',
|
|
307
|
+
});
|
|
308
|
+
return this._http.fetchGet(`/api/training/managed-options?${q}`);
|
|
309
|
+
}
|
|
291
310
|
/**
|
|
292
311
|
* Ask the trainer's own sizing model what to run: per-device batch,
|
|
293
312
|
* accumulation, learning rate, warmup, predicted peak memory, minimum GPU
|
package/dist/types.d.ts
CHANGED
|
@@ -1171,6 +1171,34 @@ export interface TrainingPreflightResponse {
|
|
|
1171
1171
|
estimate?: TrainingCostEstimate;
|
|
1172
1172
|
}
|
|
1173
1173
|
/** Estimated tokens and price of a managed training run. */
|
|
1174
|
+
/** One precision + optimizer-state combination a managed job may choose for a
|
|
1175
|
+
* model, method and adapter, with the context lengths a certified setup covers
|
|
1176
|
+
* for it. Names no hardware. Every option is accepted by preflight and create. */
|
|
1177
|
+
export interface ManagedTrainingOption {
|
|
1178
|
+
/** `bf16` or `fp8`. */
|
|
1179
|
+
precision: string;
|
|
1180
|
+
/** `adamw_torch_fused` (16-bit state) or `adamw_8bit` (8-bit state). */
|
|
1181
|
+
optim: string;
|
|
1182
|
+
max_length: number;
|
|
1183
|
+
/** Context lengths offered for this option: 2048 ... 131072. */
|
|
1184
|
+
context_lengths: number[];
|
|
1185
|
+
}
|
|
1186
|
+
export interface ManagedTrainingOptions {
|
|
1187
|
+
model_id: string;
|
|
1188
|
+
/** Whether managed training is on in this environment. */
|
|
1189
|
+
enabled: boolean;
|
|
1190
|
+
/** Default (bf16, 16-bit state) first. Empty: not trainable yet. */
|
|
1191
|
+
options: ManagedTrainingOption[];
|
|
1192
|
+
all_context_bands: number[];
|
|
1193
|
+
default_max_length: number;
|
|
1194
|
+
}
|
|
1195
|
+
export interface ManagedTrainingOptionsParams {
|
|
1196
|
+
model: string;
|
|
1197
|
+
/** sft (default), pt or cpt. */
|
|
1198
|
+
method?: string;
|
|
1199
|
+
/** lora (default), qlora or full. */
|
|
1200
|
+
adapter?: string;
|
|
1201
|
+
}
|
|
1174
1202
|
export interface TrainingCostEstimate {
|
|
1175
1203
|
train_rows: number;
|
|
1176
1204
|
mean_tokens_per_row: number;
|