base_shard_filename

Function base_shard_filename 

Source
pub fn base_shard_filename(name: &str) -> String
Expand description

Strip shard suffix from a filename to get the stable base name.

This ensures all shards in a group compute the same identity:

  • model-00001-of-00005.ggufmodel.gguf
  • llama-3-8b-q4_k_m-00003-of-00008.ggufllama-3-8b-q4_k_m.gguf

The pattern -<digits>-of-<digits> is stripped only when it appears immediately before the file extension.