MCPcopy Create free account
hub / github.com/togethercomputer/OpenChatKit / __init__

Method __init__

inference/bot.py:113–123  ·  view source on GitHub ↗
(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

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected