import type { ShardPatternInfo, ShardUrl } from "../../schemas/index"; /** * Detect if model filename follows shard pattern (00001-of-0000x) */ export declare function detectShardedModel(filename: string): ShardPatternInfo; /** * Generate list of shard filenames for a sharded model * Accepts any shard in the group * * @param shardName - Any shard filename in the group (e.g., "model-00002-of-00005.gguf") * @returns Array of all numbered shard filenames */ export declare function generateShardFilenames(shardName: string): string[]; /** * Parse pattern-based shard URL and generate all shard URLs with cache key * Works with patterns like: https://example.com/path/model-00002-of-00005.gguf * * @param shardUrl - Any shard URL in the group * @returns Object with shard URLs array and cache key */ export declare function parsePatternBasedShardUrl(shardUrl: string): { shardUrls: ShardUrl[]; cacheKey: string; }; /** * Extract tensor information from all shards and write to baseFilename.tensors.txt * Required for sharded models to enable incremental/async loading * @param shardDir - Directory containing the shard files * @param shardFilename - Filename of any shard (e.g., "model-00001-of-00002.gguf") * @returns Path to the created tensors.txt file * @throws If not a sharded model or extraction fails */ export declare function extractTensorsFromShards(shardDir: string, shardFilename: string): Promise; /** * Check if all numbered shard files exist * @param shardDir - Directory containing the shard files * @param shardFilename - Filename of any shard (e.g., "model-00001-of-00002.gguf") * @returns true if all numbered shards exist, false otherwise */ export declare function checkAllShardsExist(shardDir: string, shardFilename: string): Promise; /** * Validate that all shards and tensors.txt exist for a sharded model * @param shardDir - Directory containing the shard files * @param shardFilename - Filename of any shard (e.g., "model-00001-of-00002.gguf") * @returns true if all shards and tensors.txt exist, false otherwise */ export declare function validateShardedModelCache(shardDir: string, shardFilename: string): Promise; //# sourceMappingURL=shard-utils.d.ts.map