Pipelines
Pipelines are how you read from a dataset with trlX. Rollout stores are how models store experiences created for them by the orchestrator. It is these experiences in their rollout store that they are trained on.
General
- class trlx.pipeline.BaseRolloutStore(capacity=- 1)[source]
PPO
- class trlx.pipeline.ppo_pipeline.PPORolloutStorage(pad_token_id)[source]
Rollout storage for training PPO
- create_loader(batch_size: int, shuffle: bool) → torch.utils.data.dataloader.DataLoader[source]
Create a dataloader for the rollout store
- Parameters
prep_fn (Callable) – Applied to RLElement after collation (typically tokenizer)
- push(exps: Iterable[trlx.data.ppo_types.PPORLElement])[source]
Push experiences to rollout storage
ILQL
- class trlx.pipeline.offline_pipeline.PromptPipeline(prompts, tokenizer=None)[source]
Tokenizes texts, and then pads them into batches