MCPcopy Create free account
hub / github.com/Alpha-VLLM/LLaMA2-Accessory / split_batch

Function split_batch

light-eval/src/eval_humaneval.py:102–108  ·  view source on GitHub ↗
(samples: list[str], size=4)

Source from the content-addressed store, hash-verified

100 return text.replace("\t", " ")
101
102def split_batch(samples: list[str], size=4):
103 mini_batches = []
104
105 for i in range(0, len(samples), size):
106 mini_batches.append(samples[i : i + size])
107
108 return mini_batches
109
110@torch.inference_mode()
111def generate_batch_completion(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected