conversion
Medusa conversion/restore utilities.
Functions
Convert the model to a medusa model as per config. |
|
Function for restoring a previously convert model to a medusa model. |
- convert_to_medusa_model(model, config)
Convert the model to a medusa model as per config.
- Parameters:
model (Module) –
config (MedusaConfig) –
- Return type:
Tuple[Module, Dict[str, Any]]
- restore_medusa_model(model, config, metadata)
Function for restoring a previously convert model to a medusa model.
- Parameters:
model (Module) –
config (MedusaConfig) –
metadata (Dict[str, Any]) –
- Return type:
Module