import type { ArchiveSource, ZipLike } from './archive.ts'; import type { DtypeProbe, TransformersLike } from './runtime.ts'; export type ModelSource = /** A portable model archive: a URL, a File from an , a Blob, or bytes. * Restored into the browser cache, so loading needs no further network. */ { archive: ArchiveSource; zip?: ZipLike; } /** A model folder served over HTTP: files live at `${base}${id}/config.json` etc. */ | { base: string; id: string; } /** The Hugging Face Hub, by repo id. */ | { hub: string; }; /** Point the runtime at `source` and return the model id to load. */ export declare function resolveSource(tjs: TransformersLike, source: ModelSource): Promise; /** Where to probe for a model's dtype variants. * * `base` and `archive` sources point `env.localModelPath` at their files, so * the default probe already finds them. A `hub` source deliberately leaves * that path alone — its files live at `/resolve//`, which * no local base ever points at — so it must say where to look. */ export declare function dtypeProbe(source: ModelSource, tjs: TransformersLike): DtypeProbe | undefined; /** Human-readable description of a source, for logs and metrics. */ export declare function describeSource(source: ModelSource): string; /** Base URL for a Hugging Face repo's files — handy with `exportModel`. */ export declare const hubRoot: (repo: string, revision?: string) => string;