fix RAM OOM when load large models in tensor parallel mode. (#1395)

Co-authored-by: ran_lin <rlin@thoughtworks.com>
This commit is contained in:
boydfd
2023-11-20 19:02:42 -08:00
committed by GitHub
co-authored by ran_lin
parent 819b18e7ba
commit 4bb6b67188
4 changed files with 52 additions and 7 deletions
+2
View File
@@ -67,6 +67,8 @@ class Worker:
# Initialize the model.
set_random_seed(self.model_config.seed)
def load_model(self):
self.model = get_model(self.model_config)
@torch.inference_mode()