(samples: list[str], size=4)
| 100 | return text.replace("\t", " ") |
| 101 | |
| 102 | def 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() |
| 111 | def generate_batch_completion( |
nothing calls this directly
no outgoing calls
no test coverage detected