Skip to content

[FEATURE] "Container" slimmable model #240

@sdatkinson

Description

@sdatkinson

Inspired by the example in #239, this Issue is to implement the "ContainerModel" class.

As far as a .nam file goes, I'll propose the following:

{
    "version": "0.6.1",
    "architecture": "SlimmableContainer",
    "config": {
        "submodels": [
            {
                "max_value": 0.5,
                "model": {...}
            },
            {
                "max_value": 1.0,
                "model": {...}
            }
        ]
    },
    "weights": [],
    "sample_rate": 48000
}

I'll attach a complete model that (I think) should work.

A few notes:

  • weights is empty but is included for legacy reasons. (I kinda want to get away from that anyways in favor of a better laid-out format. Maybe we officially make it optional with this? We'll still require it for existing model types for now.)
  • The constructor may want to do a variety of sanity checks, like asserting that the submodels have the same expected sample rate (though perhaps that can be relaxed in the future and things like sample rate-independent models (e.g. Carson et al., 2024) might be implemented as special cases of slimmable NAMs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions