nemo_automodel.components.datasets.llm.retrieval_dataset_normalized
nemo_automodel.components.datasets.llm.retrieval_dataset_normalized
Normalized portable retrieval dataset backed by local Arrow shards.
This format keeps the original retrieval data model:
- train rows contain query text plus positive/negative document ids;
- corpus shards store each referenced document/image once;
- training still resolves
doc_id -> documentthrough the retrieval transform.
It is intended as a portable alternative to the original corpus-id JSON plus external Hugging Face corpus paths.
Module Contents
Classes
Functions
Data
_NORMALIZED_RETRIEVAL_FORMAT_VERSION
API
Bases: AbstractDataset
Local Arrow corpus addressable by document id.
Return all document IDs in sorted order.
Return one normalized corpus document by ID.
Bases: typing.TypedDict
One normalized retrieval source and its optional sample cap.
Construction-time configuration for a normalized retrieval Arrow dataset.
Build the normalized retrieval dataset.
Build a normalized portable retrieval dataset from local Arrow bundles.
Parameters:
Bundle path or source entries. Use either this field or data_dir_list.
Retrieval model type, either bi_encoder or cross_encoder.
Dataset mode, either train or eval.
Number of passages per training query, including the positive passage.
Number of negative passages per evaluation query.
Random seed used for source sampling and optional shuffling.
Whether to shuffle before applying max_train_samples.
Optional cap on the combined training rows.
Starting row for the training sample cap.
Whether to attach corpus query and passage instructions.
Whether to cycle through positive documents by epoch.
Whether image documents should also include their text.
Legacy alias for data_path used by existing retrieval configs.
Returns: Any
A Hugging Face dataset with a lazy retrieval transform attached.