Load the model into memory to make running multiple predictions efficient
(self)
| 74 | |
| 75 | class Predictor(BasePredictor): |
| 76 | def setup(self) -> None: |
| 77 | """Load the model into memory to make running multiple predictions efficient""" |
| 78 | for weight in weights: |
| 79 | download_weights(weight["src"], weight["dest"], weight["files"]) |
| 80 | disable_torch_init() |
| 81 | 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) |
| 82 | |
| 83 | def predict( |
| 84 | self, |
nothing calls this directly
no test coverage detected