jina-embedding-v4 环境搭建全过程
Requirements
The following Python packages are required:
transformers>=4.52.0
torch>=2.6.0
peft>=0.15.2
torchvision
pillow
下载pytorch 根据自己的cuda版本 注意这里下的pytorch是2.7.1版本
pip install --default-timeout=3000 torch torchvision torchaudio --index-url https://mirrors.nju.edu.cn/pytorch/whl/cu126
下载flash-attn 在v2.7.4中 按照 python版本 cuda版本 torch版本下载
https://github.com/kingbri1/flash-attention/releases
我选择的是flash_attn-2.7.4.post1+cu124torch2.6.0cxx11abiFALSE-cp310-cp310-win_amd64.whl
下载trion 按照python版本
https://hf-mirror.com/madbuda/triton-windows-builds/tree/main
以下是生成的requirement.txt 按需取用
accelerate==1.9.0
asttokens==3.0.0
attrs==25.3.0
backcall==0.2.0
beautifulsoup4==4.13.4
bleach==6.2.0
certifi==2025.7.14
charset-normalizer==3.4.2
colorama==0.4.6
decorator==5.2.1
defusedxml==0.7.1
docopt==0.6.2
einops==0.8.1
executing==2.2.0
fastjsonschema==2.21.1
filelock==3.18.0
flash_attn @ file:///C:/Users/zheng/Desktop/text2image4jina/flash_attn-2.7.4.post1%2Bcu124torch2.6.0cxx11abiFALSE-cp310-cp310-win_amd64.whl#sha256=b226ab9ef427bbce76bc81fb02aabf722b3fd65296359addbba151f218ad2312
fsspec==2025.7.0
huggingface-hub==0.33.4
idna==3.10
ipython==8.12.3
jedi==0.19.2
Jinja2==3.1.6
joblib==1.5.1
jsonschema==4.25.0
jsonschema-specifications==2025.4.1
jupyter_client==8.6.3
jupyter_core==5.8.1
jupyterlab_pygments==0.3.0
MarkupSafe==3.0.2
matplotlib-inline==0.1.7
mistune==3.1.3
mpmath==1.3.0
nbclient==0.10.2
nbconvert==7.16.6
nbformat==5.10.4
networkx==3.4.2
numpy==2.2.6
packaging==25.0
pandocfilters==1.5.1
parso==0.8.4
peft==0.16.0
pickleshare==0.7.5
pillow==11.0.0
pipreqs==0.5.0
platformdirs==4.3.8
prompt_toolkit==3.0.51
psutil==7.0.0
pure_eval==0.2.3
Pygments==2.19.2
python-dateutil==2.9.0.post0
pywin32==311
PyYAML==6.0.2
pyzmq==27.0.0
referencing==0.36.2
regex==2024.11.6
requests==2.32.4
rpds-py==0.26.0
safetensors==0.5.3
scikit-learn==1.7.1
scipy==1.15.3
sentence-transformers==5.0.0
six==1.17.0
soupsieve==2.7
stack-data==0.6.3
sympy==1.14.0
threadpoolctl==3.6.0
tinycss2==1.4.0
tokenizers==0.21.2
torch==2.7.1+cu126
torchaudio==2.7.1+cu126
torchvision==0.22.1+cu126
tornado==6.5.1
tqdm==4.67.1
traitlets==5.14.3
transformers==4.53.3
triton @ file:///C:/Users/zheng/Desktop/text2image4jina/triton-3.0.0-cp310-cp310-win_amd64.whl#sha256=5f0ec17adbcbbe60bd9cb67c17d40a6624d9f010c6bcdad989338a7a4c1b352d
typing_extensions==4.14.1
urllib3==2.5.0
wcwidth==0.2.13
webencodings==0.5.1
yarg==0.1.9