FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

pip install FlagEmbedding[finetune] - ModuleNotFoundError: No module named 'torch', but it is

Open mbykov opened this issue 5 months ago • 1 comments

uv pip install 'FlagEmbedding[finetune]'

Resolved 95 packages in 31ms × Failed to build flash-attn==2.8.2 ├─▶ The build backend returned an error ╰─▶ Call to setuptools.build_meta:__legacy__.build_wheel failed (exit status: 1) [stderr] ..... ModuleNotFoundError: No module named 'torch'

but it is:

uv pip list | grep torch
pytorch-triton 3.4.0+git11ec6354 torch 2.9.0.dev20250724+cu128 torchao 0.12.0 torchaudio 2.8.0.dev20250724+cu128 torchdata 0.11.0 torchtune 0.6.1 torchvision 0.24.0.dev20250724+cu128

I have RTX 5060 card, so I installed torch with nightly build:

uv pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128 --upgrade --force-reinstall

and it works ok.

But what could be done now?

mbykov avatar Jul 30 '25 20:07 mbykov

but it's not urgent and not critical. Trainer works ok without flash-attn. I wrote it just in case.

mbykov avatar Jul 30 '25 20:07 mbykov