MCPcopy Index your code
hub / github.com/hpcaitech/ColossalAI / step_

Method step_

colossalai/inference/core/rpc_engine.py:257–271  ·  view source on GitHub ↗
(self, input_token_ids, input_meta_data: InputMetaData)

Source from the content-addressed store, hash-verified

255 return input_ids.tolist(), input_meta_data
256
257 async def step_(self, input_token_ids, input_meta_data: InputMetaData):
258 assert len(self.workers) == self.tp_size, "init workers first"
259
260 init_tasks = [
261 self.async_parallel_wrapper(
262 worker.execute_model_forward,
263 input_token_ids,
264 input_meta_data.to_rpc_param(),
265 self.generation_config_dict,
266 )
267 for worker in self.workers
268 ]
269 ret = await asyncio.gather(*init_tasks)
270
271 return ret[0]
272
273 def step(self) -> List[str]:
274 batch = self.request_handler.schedule()

Callers 1

stepMethod · 0.95

Calls 3

to_rpc_paramMethod · 0.45
gatherMethod · 0.45

Tested by

no test coverage detected