MCPcopy Create free account
hub / github.com/OpenSparseLLMs/Linear-MoE / __getitem__

Method __getitem__

linear_moe/data/bloom.py:43–46  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

41 return len(self.samples)
42
43 def __getitem__(self, idx):
44 raw_sample = self.samples[idx]
45 return self.gpt_convert_example_to_feature(raw_sample, self.tokenizer,
46 self.max_seq_length)
47
48 def truncate(self, tokenizer, array, max_length):
49 """

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected