fix: better warmup error

This commit is contained in:
OlivierDehaene 2023-10-25 10:18:58 +02:00
parent f9910d13e2
commit 96a982ad8f
1 changed files with 1 additions and 1 deletions

View File

@ -670,7 +670,7 @@ class FlashCausalLM(Model):
self.device,
)
_, batch = self.generate_token(batch)
except Exception as e:
except torch.cuda.OutOfMemoryError as e:
raise RuntimeError(
f"Not enough memory to handle {len(batch.input_ids)} prefill tokens. "
f"You need to decrease `--max-batch-prefill-tokens`"