fix: lint

This commit is contained in:
csunny
2023-05-30 19:11:34 +08:00
parent 1bbed02a3c
commit 16c6986666
6 changed files with 34 additions and 26 deletions

View File

@@ -37,7 +37,7 @@ class ModelWorker:
self.model, self.tokenizer = self.ml.loader(
num_gpus, load_8bit=ISLOAD_8BIT, debug=ISDEBUG
)
if not isinstance(self.model, str):
if hasattr(self.model.config, "max_sequence_length"):
self.context_len = self.model.config.max_sequence_length