Skip to content

Commit

Permalink
ensure that torch is not used unless it is available
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed May 17, 2024
1 parent 6fdf8c0 commit 2f5047c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spacy_llm/models/hf/stablelm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from confection import SimpleFrozenDict

from ...compat import Literal, has_transformers, torch, transformers
from ...compat import Literal, has_torch, has_transformers, torch, transformers
from ...registry.util import registry
from .base import HuggingFace

if has_transformers:
if has_transformers and has_torch:

class _StopOnTokens(transformers.StoppingCriteria):
def __call__(
Expand Down

0 comments on commit 2f5047c

Please sign in to comment.