Huggingface Hub 上的 Llama 2 模型文件的大小差异很大,具体取决于格式

Kum*_*abh 5 huggingface

Huggingface (meta-llama/Llama-2-7b) 上的 Llama2 7B 模型有一个 pytorch .pth 文件solidified.00.pth,大小约为 13.5GB。拥抱脸部变形金刚兼容模型 meta-llama/Llama-2-7b-hf 具有三个 pytorch 模型文件,大小合计约为 27GB,以及两个安全张量文件,合计大小约为 13.5Gb。

有人可以解释一下文件大小差异巨大的原因吗?

我在 Huggingface 模型卡或他们的博客Llama 2 is here - get it on Hugging Face 中找不到解释。

更新:当模型下载到 Huggingface 缓存时,我注意到只下载了安全张量,而不下载 Pytorch 二进制模型文件。这可以避免同时下载 safetensors 和 pytorch 模型文件。