(self)
| 511 | return lambda index: v[index] |
| 512 | |
| 513 | def get_state_dict(self): |
| 514 | return dict( |
| 515 | config=self.config, |
| 516 | index=self._index, |
| 517 | file_loc=self._file_loc, |
| 518 | total_tokens=self._total_tokens, |
| 519 | ) |
| 520 | |
| 521 | def load_state_dict(self, state_dict): |
| 522 | if 'config' in state_dict: |