MCPcopy Index your code
hub / github.com/ModelTC/LightLLM / initialize

Method initialize

lightllm/server/core/objs/sampling_params.py:239–258  ·  view source on GitHub ↗
(self, data_dict)

Source from the content-addressed store, hash-verified

237 ]
238
239 def initialize(self, data_dict):
240 if data_dict is None:
241 self.exists = False
242 return
243
244 self.exists = True
245
246 pd_node_id = data_dict["node_id"]
247 self.node_id_high = (pd_node_id >> 64) & 0xFFFFFFFFFFFFFFFF
248 self.node_id_low = pd_node_id & 0xFFFFFFFFFFFFFFFF
249
250 ip_parts = [int(part) for part in data_dict["ip"].split(".")]
251 self.ip = (ctypes.c_int32 * 4)(*ip_parts)
252
253 self.rpyc_port = data_dict["rpyc_port"]
254 self.max_new_tokens = data_dict["max_new_tokens"]
255
256 pd_master_node_id = data_dict["pd_master_node_id"]
257 self.pd_master_node_id_high = (pd_master_node_id >> 64) & 0xFFFFFFFFFFFFFFFF
258 self.pd_master_node_id_low = pd_master_node_id & 0xFFFFFFFFFFFFFFFF
259
260 def to_dict(self):
261 if not self.exists:

Callers 4

initializeMethod · 0.45
initMethod · 0.45
fetch_streamMethod · 0.45

Calls

no outgoing calls

Tested by 1