Windows CMD 命令
set HF_ENDPOINT=https://hf-mirror.com
set HF_HUB_DISABLE_PARALLEL_DOWNLOADS=1 # 禁用多线程,避免被服务器断开
set HUGGINGFACE_HUB_TIMEOUT=300 # 超时设为5分钟
huggingface-cli download sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 \ --include "*.json" "*.model" "*.bin" "*.safetensors" "1_Pooling/*" \ --exclude "onnx/*" "openvino/*" "tf_model.h5" # 排除不需要的文件
手动下载:
| 文件 / 文件夹 | 说明 |
|---|---|
1_Pooling/ 文件夹 |
包含池化层配置,必须下载 |
config.json |
模型主配置文件 |
config_sentence_transformers.json |
Sentence-Transformers 专用配置 |
model.safetensors(或 pytorch_model.bin) |
模型权重文件(核心!二选一即可,优先 safetensors) |
modules.json |
模型模块定义 |
sentence_bert_config.json |
BERT 配置 |
sentencepiece.bpe.model |
分词器文件 |
special_tokens_map.json |
特殊 tokens 映射 |
tokenizer.json |
分词器配置 |
tokenizer_config.json |
分词器主配置 |
unigram.json |
分词器词表 |