xlm.commands.lightning_eval
instantiate_model(cfg, datamodule, tokenizer)
Instantiate and load a model for evaluation.
Supports loading from full checkpoints, model-only checkpoints, or HF Hub. Returns the checkpoint path for the trainer to use.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DictConfig
|
Hydra config |
required |
datamodule
|
Any
|
Datamodule |
required |
tokenizer
|
Any
|
Tokenizer |
required |
Returns:
| Type | Description |
|---|---|
tuple[Harness, Optional[str]]
|
Tuple of (lightning_module, ckpt_path) where ckpt_path is passed to trainer |