MCPcopy Create free account
hub / github.com/LLaVA-VL/LLaVA-NeXT / setup

Method setup

predict.py:76–81  ·  view source on GitHub ↗

Load the model into memory to make running multiple predictions efficient

(self)

Source from the content-addressed store, hash-verified

74
75class 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,

Callers

nothing calls this directly

Calls 3

disable_torch_initFunction · 0.90
load_pretrained_modelFunction · 0.90
download_weightsFunction · 0.85

Tested by

no test coverage detected