mukobi / Unadaptable-Foundation-Models

MIT License
3 stars 0 forks source link

Implement `get_unadapt_method` #40

Closed mukobi closed 2 months ago

mukobi commented 3 months ago

E.g.

def get_unadapt_method(config: DictConfig) -> Callable:
    if config.method == "prune":
        return apply_pruning
    elif config.method == "rescale":
        return apply_weight_rescaling
    elif config.method == "zeroth":
        return apply_zeroth_order_learning
    elif config.method == "gradient":
        return apply_gradient_learning
    else:
        raise NotImplementedError

Might need to refactor the unadapt methods to be classes so you can store hyperparams on them, or a config class with their settings, or some other way to configure them.

m-walters commented 2 months ago

Coincidentally did this with UnadaptMethod class lol