Load the model into memory to make running multiple predictions efficient
(self)
| 77 | |
| 78 | class Predictor(BasePredictor): |
| 79 | def setup(self) -> None: |
| 80 | """Load the model into memory to make running multiple predictions efficient""" |
| 81 | for weight in weights: |
| 82 | download_weights(weight["src"], weight["dest"], weight["files"]) |
| 83 | disable_torch_init() |
| 84 | |
| 85 | self.tokenizer, self.model, self.image_processor, self.context_len = load_pretrained_model("liuhaotian/llava-v1.5-13b", model_name="llava-v1.5-13b", model_base=None, load_8bit=False, load_4bit=False) |
| 86 | |
| 87 | def predict( |
| 88 | self, |
nothing calls this directly
no test coverage detected