llmcompressor.entrypoints.model_free.helpers
build_weights_map
Build a mapping of tensor name -> resolved file path from the model's weight_map (index.json). This allows any process to locate fused partner tensors from other shards without loading entire files.
Parameters:
-
weight_map(dict[str, str]) –mapping of tensor name -> shard filename (from index.json)
-
model_files(dict[str, str]) –mapping of shard filename -> resolved absolute path
Returns:
-
dict[str, str]–mapping of tensor name -> resolved absolute path