diff --git a/model-boss-ts/dist/index.d.ts b/model-boss-ts/dist/index.d.ts index 5869286..5f4f259 100644 --- a/model-boss-ts/dist/index.d.ts +++ b/model-boss-ts/dist/index.d.ts @@ -1,9 +1,8 @@ /** - * Model path resolution and GPU/VRAM lease coordinator for ML models - TypeScript client. + * Model path resolution library for ML models - TypeScript client. * - * This package provides: - * 1. Model path resolution (finding models in local cache) - * 2. GPU/VRAM lease coordination (re-exported from @lilith/ml-vram-boss) + * Provides utilities for finding and resolving model files in local cache, + * supporting both single-file models (GGUF) and sharded models (safetensors, pytorch). * * @example Path Resolution * ```typescript @@ -20,37 +19,25 @@ * } * ``` * - * @example GPU/VRAM Lease Coordination + * @example With GPU Coordination * ```typescript - * import { GPUBoss, Priority } from '@lilith/ml-model-boss'; + * // For GPU coordination, import from @lilith/ml-vram-boss directly: + * import { GPUBoss, Priority } from '@lilith/ml-vram-boss'; + * import { ensureModelSync } from '@lilith/ml-model-boss'; * * const boss = new GPUBoss(); * await boss.connect(); * - * const lease = await boss.acquire({ - * vramMb: 8000, - * priority: Priority.NORMAL, - * modelId: 'llm', - * }); - * + * const lease = await boss.acquire({ vramMb: 8000, priority: Priority.NORMAL }); * try { - * await loadModel(); - * - * lease.onPreempt(async (reason) => { - * await unloadModel(); - * }); - * - * const response = await model.chat(messages); - * lease.touch(); + * const modelPath = ensureModelSync('my-model'); + * await loadModel(modelPath); * } finally { * await lease.release(); * } - * - * await boss.close(); * ``` * * @packageDocumentation */ -export { GPUBoss, GPULease, LeaseAcquisitionError, LeaseTimeoutError, Priority, type AcquireOptions, type BossConfig, type BossStatus, type GPUStatus, type LeaseInfo, type PreemptCallback, type QueueRequest, type ResolvedConfig, } from '@lilith/ml-vram-boss'; export { ModelPathLoader, getPathLoader, resetPathLoader, ensureModel, ensureModelSync, isCached, resolveModel, tryResolveModel, type ManifestEntry, type ModelManifest, type ModelResolution, } from './path-loader.js'; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/model-boss-ts/dist/index.d.ts.map b/model-boss-ts/dist/index.d.ts.map index 8ffeed1..7bb084d 100644 --- a/model-boss-ts/dist/index.d.ts.map +++ b/model-boss-ts/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAGH,OAAO,EACL,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAQH,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/model-boss-ts/dist/index.js b/model-boss-ts/dist/index.js index f3b6529..b203384 100644 --- a/model-boss-ts/dist/index.js +++ b/model-boss-ts/dist/index.js @@ -1,9 +1,8 @@ /** - * Model path resolution and GPU/VRAM lease coordinator for ML models - TypeScript client. + * Model path resolution library for ML models - TypeScript client. * - * This package provides: - * 1. Model path resolution (finding models in local cache) - * 2. GPU/VRAM lease coordination (re-exported from @lilith/ml-vram-boss) + * Provides utilities for finding and resolving model files in local cache, + * supporting both single-file models (GGUF) and sharded models (safetensors, pytorch). * * @example Path Resolution * ```typescript @@ -20,39 +19,28 @@ * } * ``` * - * @example GPU/VRAM Lease Coordination + * @example With GPU Coordination * ```typescript - * import { GPUBoss, Priority } from '@lilith/ml-model-boss'; + * // For GPU coordination, import from @lilith/ml-vram-boss directly: + * import { GPUBoss, Priority } from '@lilith/ml-vram-boss'; + * import { ensureModelSync } from '@lilith/ml-model-boss'; * * const boss = new GPUBoss(); * await boss.connect(); * - * const lease = await boss.acquire({ - * vramMb: 8000, - * priority: Priority.NORMAL, - * modelId: 'llm', - * }); - * + * const lease = await boss.acquire({ vramMb: 8000, priority: Priority.NORMAL }); * try { - * await loadModel(); - * - * lease.onPreempt(async (reason) => { - * await unloadModel(); - * }); - * - * const response = await model.chat(messages); - * lease.touch(); + * const modelPath = ensureModelSync('my-model'); + * await loadModel(modelPath); * } finally { * await lease.release(); * } - * - * await boss.close(); * ``` * * @packageDocumentation */ -// Re-export GPU coordination from vram-boss for backward compatibility -export { GPUBoss, GPULease, LeaseAcquisitionError, LeaseTimeoutError, Priority, } from '@lilith/ml-vram-boss'; +// model-boss provides path resolution only +// For GPU coordination, import from @lilith/ml-vram-boss directly // Path resolution (model-boss functionality) // TypeScript equivalent of Python's loaders/path_loader.py // Supports single-file models (GGUF) and sharded models (safetensors, pytorch, diffusion) diff --git a/model-boss-ts/dist/index.js.map b/model-boss-ts/dist/index.js.map index 097293f..07ee6ab 100644 --- a/model-boss-ts/dist/index.js.map +++ b/model-boss-ts/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,uEAAuE;AACvE,OAAO,EACL,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,GAST,MAAM,sBAAsB,CAAC;AAE9B,6CAA6C;AAC7C,2DAA2D;AAC3D,0FAA0F;AAC1F,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,GAIhB,MAAM,kBAAkB,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,2CAA2C;AAC3C,kEAAkE;AAElE,6CAA6C;AAC7C,2DAA2D;AAC3D,0FAA0F;AAC1F,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,EACX,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,eAAe,GAIhB,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/model-boss-ts/package.json b/model-boss-ts/package.json index e7f794d..9d188ce 100644 --- a/model-boss-ts/package.json +++ b/model-boss-ts/package.json @@ -1,6 +1,6 @@ { "name": "@lilith/ml-model-boss", - "version": "1.0.0", + "version": "2.0.0", "description": "Model path resolution and GPU/VRAM lease coordination for ML models - TypeScript client", "type": "module", "main": "./dist/index.js",