nemo_rl.models.policy.draft_config#
Module Contents#
Classes#
Optional optimizer schedule for draft-model parameters. |
|
Configuration for EAGLE-3 draft-model co-training with the policy. |
Functions#
Accept either a validated model or a raw mapping at API boundaries. |
|
Return whether generation must accept refitted draft weights. |
API#
- class nemo_rl.models.policy.draft_config.DraftOptimizerConfig#
Bases:
pydantic.BaseModelOptional optimizer schedule for draft-model parameters.
- lr: Annotated[float, Field(gt=0)]#
None
- min_lr: Annotated[float, Field(ge=0)] | None#
None
- weight_decay: Annotated[float, Field(ge=0)] | None#
None
- validate_lr_range() Self#
Require the draft minimum learning rate to fit its schedule.
- class nemo_rl.models.policy.draft_config.Eagle3DraftConfig#
Bases:
pydantic.BaseModelConfiguration for EAGLE-3 draft-model co-training with the policy.
- speculator_type: Literal[eagle3]#
‘eagle3’
- enabled: bool#
False
- model_name: str | None#
None
- loss_weight: float#
0.1
- num_layers: int | None#
None
- aux_layer_indices: list[int] | None#
None
- optimizer: nemo_rl.models.policy.draft_config.DraftOptimizerConfig | None#
None
- _reject_near_miss_extra_keys() nemo_rl.models.policy.draft_config.Eagle3DraftConfig#
- nemo_rl.models.policy.draft_config.coerce_draft_config(
- config: Eagle3DraftConfig | Mapping[str, Any] | None,
Accept either a validated model or a raw mapping at API boundaries.
MasterConfigvalidation normally produces the model, butPolicyConfigis a TypedDict, so callers that assemble one by hand still pass a plain dict.
- nemo_rl.models.policy.draft_config.draft_refit_enabled(
- config: Eagle3DraftConfig | Mapping[str, Any] | None,
Return whether generation must accept refitted draft weights.