improve web ui

This commit is contained in:
hiyouga
2024-01-10 12:37:45 +08:00
parent 05ed4e8028
commit 1653c22438
4 changed files with 26 additions and 14 deletions

View File

@@ -79,6 +79,10 @@ def get_current_device() -> torch.device:
return torch.device(device)
def get_device_count() -> int:
return torch.cuda.device_count()
def get_logits_processor() -> "LogitsProcessorList":
r"""
Gets logits processor that removes NaN and Inf logits.