Skip to content

Using megablocks causes RuntimeError: 0 active drivers ([]). There should only be one. #2021

@KIC

Description

@KIC

Bug description

Using Scentence Tranfromer with megablocks (recommended) causes error

/xxx/.pyenv/versions/3.11.14/lib/python3.11/site-packages/triton/runtime/driver.py:8: in _create_driver
    raise RuntimeError(f"{len(actives)} active drivers ({actives}). There should only be one.")
E   RuntimeError: 0 active drivers ([]). There should only be one.

After removing the dependency, everyting works as expected.

Code snippet to reproduce the bug

magablocks is only a dependency of SentenceTransformer

from sentence_transformers import SentenceTransformer

EMBEDDING_MODEL = SentenceTransformer(
    str(MODEL_PATH / "nomic-embed"), device=DEVICE, trust_remote_code=True
)

EMBEDDING_MODEL.encode(
            str(text),
            show_progress_bar=False,
            convert_to_numpy=True,
            normalize_embeddings=True,
        )

Error traceback

/xxx/.pyenv/versions/3.11.14/lib/python3.11/site-packages/triton/runtime/driver.py:8: in _create_driver
    raise RuntimeError(f"{len(actives)} active drivers ({actives}). There should only be one.")
E   RuntimeError: 0 active drivers ([]). There should only be one.

Environment

sentence-transformers v5.1.0
├── huggingface-hub v0.34.4 ()
├── pillow v11.1.0
├── scikit-learn v1.7.1
│ ├── joblib v1.5.1
│ ├── numpy v2.2.4
│ ├── scipy v1.15.2 (
)
│ └── threadpoolctl v3.6.0
├── scipy v1.15.2 ()
├── torch v2.6.0 (
)
├── tqdm v4.67.1
├── transformers v4.55.0
│ ├── filelock v3.18.0
│ ├── huggingface-hub v0.34.4 ()
│ ├── numpy v2.2.4
│ ├── packaging v24.2
│ ├── pyyaml v6.0.2
│ ├── regex v2024.11.6
│ ├── requests v2.32.3 (
)
│ ├── safetensors v0.6.2
│ ├── tokenizers v0.21.4
│ │ └── huggingface-hub v0.34.4 (*)
│ └── tqdm v4.67.1
└── typing-extensions v4.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions