MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / __init__

Method __init__

trainer/src/inference_server/main.py:101–109  ·  view source on GitHub ↗
(self, huggingface_model_id: str)

Source from the content-addressed store, hash-verified

99)
100class Model:
101 def __init__(self, huggingface_model_id: str):
102 model_dir = merged_model_cache_dir(huggingface_model_id)
103 cache_model_weights(huggingface_model_id, model_dir)
104
105 logging.info("Preloading model")
106 read_all_files(model_dir)
107
108 logging.info(f"Loading model from volume {model_dir}")
109 self.engine = AsyncLLMEngine.from_engine_args(AsyncEngineArgs(model=model_dir))
110
111 @modal.method()
112 async def generate(self, request: Input) -> Output:

Callers

nothing calls this directly

Calls 3

merged_model_cache_dirFunction · 0.85
read_all_filesFunction · 0.85
cache_model_weightsFunction · 0.70

Tested by

no test coverage detected