diff --git a/src/autotrain/cli/run_llm.py b/src/autotrain/cli/run_llm.py index db209505d3..d76d28c0b7 100644 --- a/src/autotrain/cli/run_llm.py +++ b/src/autotrain/cli/run_llm.py @@ -408,7 +408,7 @@ def __init__(self, args): print(f"Bot: {tgi.chat(prompt)}") cuda_available = torch.cuda.is_available() - mps_available = torch.mps.is_available() + mps_available = torch.backends.mps.is_available() if not cuda_available and not mps_available: raise ValueError("No GPU/MPS device found. LLM training requires an accelerator")