Download types/engine/prefetch.d.ts from nyaaorick/everything-webgpu: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/nyaaorick/everything-webgpu/resolve/main/types/engine/prefetch.d.ts
- Command line
-
hf download hf://nyaaorick/everything-webgpu/types/engine/prefetch.d.ts
-
curl -L -o prefetch.d.ts https://huggingface.co/nyaaorick/everything-webgpu/resolve/main/types/engine/prefetch.d.ts
1.26 kB
| /** | |
| * WebLLM's `cleanModelUrl`, mirrored deliberately. | |
| * | |
| * Kept character-for-character with the bundle's version (see the contract | |
| * test) because the whole point is to produce the same cache keys its loader | |
| * will look for. | |
| */ | |
| export function resolveModelUrl(modelUrl: any): string; | |
| /** | |
| * @param {object} opts | |
| * @param {string} opts.modelId | |
| * @param {object} opts.record the merged app-config entry: `model`, `model_lib` | |
| * @param {(p: {phase: string, done: number, total: number, label: string}) => void} [opts.onProgress] | |
| * @param {AbortSignal} [opts.signal] | |
| * @param {(url: string, init?: object) => Promise<Response>} [opts.fetchImpl] | |
| * @returns {Promise<{modelId: string, files: number, bytes: number, alreadyCached: boolean}>} | |
| */ | |
| export function prefetchModel({ modelId, record, onProgress, signal, fetchImpl, }: { | |
| modelId: string; | |
| record: object; | |
| onProgress?: (p: { | |
| phase: string; | |
| done: number; | |
| total: number; | |
| label: string; | |
| }) => void; | |
| signal?: AbortSignal; | |
| fetchImpl?: (url: string, init?: object) => Promise<Response>; | |
| }): Promise<{ | |
| modelId: string; | |
| files: number; | |
| bytes: number; | |
| alreadyCached: boolean; | |
| }>; | |
| export function isAlreadyLocal(record: any): boolean; | |