gpt-fast icon indicating copy to clipboard operation
gpt-fast copied to clipboard

Optimized the process of loading PyTorch state dictionaries, merging …

Open hvaria opened this issue 11 months ago • 2 comments

…them and remapping their keys

Integrating loading, merging, and remapping into one step reduces the overall processing time by minimizing redundant operations. Pre-compiling the regular expression used for identifying and transforming layer-related keys cuts down the processing time required for these operations. By directly updating the final results without an intermediate merged dictionary, the memory footprint is reduced.

hvaria avatar Mar 12 '24 04:03 hvaria