conversion

Medusa conversion/restore utilities.

Functions

convert_to_medusa_model

Convert the model to a medusa model as per config.

restore_medusa_model

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:
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