Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: ModuleNotFoundError: No module named 'minference.cuda' #45

Open
lai-serena opened this issue Jul 16, 2024 · 2 comments
Open
Assignees
Labels
question Further information is requested

Comments

@lai-serena
Copy link

lai-serena commented Jul 16, 2024

Describe the issue

I encountered some issues when using minference in Python.
import minference
The problem is Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/workspace/MInference/minference/__init__.py", line 8, in <module> from .models_patch import MInference File "/workspace/MInference/minference/models_patch.py", line 7, in <module> from .patch import minference_patch, minference_patch_vllm, patch_hf File "/workspace/MInference/minference/patch.py", line 12, in <module> from .modules.minference_forward import ( File "/workspace/MInference/minference/modules/minference_forward.py", line 20, in <module> from ..ops.pit_sparse_flash_attention_v2 import vertical_slash_sparse_attention File "/workspace/MInference/minference/ops/pit_sparse_flash_attention_v2.py", line 10, in <module> from ..cuda import convert_vertical_slash_indexes ModuleNotFoundError: No module named 'minference.cuda'

enviornment :
Python 3.10.14
minference 0.1.4.post3
triton 2.1.0
torch 2.3.0
CUDA 11.8
vllm 0.4.2+cu118
flash-attn 2.5.8

@lai-serena lai-serena added the question Further information is requested label Jul 16, 2024
@iofu728 iofu728 self-assigned this Jul 17, 2024
@iofu728
Copy link
Contributor

iofu728 commented Jul 17, 2024

Hi @lai-serena, thanks for your feedback.

It looks like the build was unsuccessful. You can try installing it using the following method:

pip uninstall minference -y
MINFERENCE_FORCE_BUILD=TRUE pip install minference --no-cache-dir

or build from source,

git clone https://github.com/microsoft/MInference/
cd MInference
pip install -e .

@lepangdan
Copy link

pip install -e . works for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants