(
self,
raw_data,
transform,
tokenizer,
slice_config,
llm_type="minicpm",
patch_size=14,
query_nums=64,
batch_vision=False,
max_length=2048,
max_line_res=1120
)
| 24 | """Dataset for supervised fine-tuning.""" |
| 25 | |
| 26 | def __init__( |
| 27 | self, |
| 28 | raw_data, |
| 29 | transform, |
| 30 | tokenizer, |
| 31 | slice_config, |
| 32 | llm_type="minicpm", |
| 33 | patch_size=14, |
| 34 | query_nums=64, |
| 35 | batch_vision=False, |
| 36 | max_length=2048, |
| 37 | max_line_res=1120 |
| 38 | ): |
| 39 | super(SupervisedDataset, self).__init__() |
| 40 | self.raw_data = raw_data |
| 41 | self.tokenizer = tokenizer |
| 42 | self.transform = transform |
| 43 | self.slice_config = slice_config |
| 44 | self.llm_type = llm_type |
| 45 | self.patch_size = patch_size |
| 46 | self.query_nums=query_nums |
| 47 | self.batch_vision = batch_vision |
| 48 | self.max_length = max_length |
| 49 | self.max_line_res = max_line_res |
| 50 | |
| 51 | def __len__(self): |
| 52 | return len(self.raw_data) |
nothing calls this directly
no outgoing calls
no test coverage detected