ZeroRetriever¶
- class openicl.icl_retriever.icl_zero_retriever.ZeroRetriever(dataset_reader: DatasetReader, ice_eos_token: str | None = '', prompt_eos_token: str | None = '', index_split: str | None = 'train', test_split: str | None = 'test', accelerator: Accelerator | None = None)[source]¶
- Zero In-context Learning Retriever Class
Retriever for Zero-shot.
- dataset_reader¶
An instance of the
DatasetReaderclass.- Type:
DatasetReader
- ice_eos_token¶
A string that is added to the end of in-context examples.
- Type:
str, optional
- prompt_eos_token¶
A string that is added to the end of the prompt.
- Type:
str, optional
- index_split¶
A string for the index dataset name. The index dataset is used to select data for in-context examples. Defaults to
train.- Type:
str, optional
- test_split¶
A string for the generation dataset name. The test dataset is used to generate prompts for each data. Defaults to
test.- Type:
str, optional
- index_ds¶
The index dataset. Used to select data for in-context examples.
- Type:
Dataset
- test_ds¶
The test dataset. Used to generate prompts for each data.
- Type:
Dataset
- accelerator¶
An instance of the
Acceleratorclass, used for multiprocessing.- Type:
Accelerator, optional