About Code compatability
Opened this issue · 0 comments
kimjoohyungsd commented
class MedusaModelABC(nn.Module):
"""The Medusa Language Model Head.
This module creates a series of prediction heads (based on the 'medusa' parameter)
on top of a given base model. Each head is composed of a sequence of residual blocks
followed by a linear layer.
"""
# Load the base model
# base_model_prefix = "model"
# supports_gradient_checkpointing = True
# _no_split_modules = ["LlamaDecoderLayer", "MistralDecoderLayer"]
# _skip_keys_device_placement = "past_key_values"
# _supports_flash_attn_2 = True
def __init__(
self,
config,
):
"""
Args:
config (PretrainedConfig): The configuration of the MedusaModel.
"""
super().__init__(config)
# For compatibility with the old APIs
If above class was inherited by nn.Module doesn't this cause Exception error since super().init(config) doesn't have any config when initializing?