MCPcopy Create free account
hub / github.com/MuLabPKU/TransArch / __getitem__

Method __getitem__

GQLA_preprint/src/compression.py:631–633  ·  view source on GitHub ↗
(self, i)

Source from the content-addressed store, hash-verified

629 class _DS(torch.utils.data.Dataset):
630 def __len__(self): return chunks.shape[0]
631 def __getitem__(self, i):
632 return {"input_ids": chunks[i],
633 "attention_mask": torch.ones(seqlen, dtype=torch.long)}
634 return torch.utils.data.DataLoader(_DS(), batch_size=batch_size, shuffle=False)
635
636

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected