Method
__init__
(self, gpu_id, model_name_or_path, max_tokens, sample, temperature, top_k, retrieval, max_memory, do_stream)
Source from the content-addressed store, hash-verified
| 111 | prompt = ">>> " |
| 112 | |
| 113 | def __init__(self, gpu_id, model_name_or_path, max_tokens, sample, temperature, top_k, retrieval, max_memory, do_stream): |
| 114 | super().__init__() |
| 115 | self._gpu_id = int(gpu_id) |
| 116 | self._model_name_or_path = model_name_or_path |
| 117 | self._max_tokens = max_tokens |
| 118 | self._sample = sample |
| 119 | self._temperature = temperature |
| 120 | self._top_k = top_k |
| 121 | self._retrieval = retrieval |
| 122 | self._max_memory = max_memory |
| 123 | self._do_stream = do_stream |
| 124 | |
| 125 | def preloop(self): |
| 126 | print(f"Loading {self._model_name_or_path} to cuda:{self._gpu_id}...") |
Callers
nothing calls this directly
Tested by
no test coverage detected