dmx.compressor.modeling.model.DmxModelMixin

class dmx.compressor.modeling.model.DmxModelMixin
__init__()

Methods

__init__()

check_dim_consistency()

A function that checks format dimension consistency and sparseness dimension consistency for all applicable dmx modules in the model

configure(config, *rules)

Configure Dmx-specific numerics/sparsity/logics

counting_flops([zero])

create_submod_transform_forward(model, ...)

Only supported for fx path, submodule forward can be directly called in export path

deepcopy_args(args)

fold_weights_and_biases()

A function that applies the ops the weights and biases using the corresponding formats.

forward_weight_hypernets()

freeze([config_file])

A function that stores the state and ops format of the model to a config file

get_monitoring_records([submodules_to_monitor])

get_runtime_records()

is_same_signature(_model, args, kwargs)

keep_dmx_config()

measure_runtimes(device[, submodules_to_measure])

monitoring([submodules_to_monitor, ...])

named_dmx_modules()

"Returns a list of named modules that are dmx configurable

post_process_gm(_model, args, kwargs)

print_model_tree([include_type])

A function that prints out the tree structure of a model

process_inputs_for_export(model, args, kwargs)

thaw([config_file])

A function that transforms the model in place from a config file.

to_baseline_mode()

to_basic_mode([sbfp_weight_storage])

Configures a transformed DmxModel to the BASIC mode on dmx hardware.

to_fp8_mode()

Configures a transformed DmxModel to the FP8 mode on dmx hardware.

to_old_forward(_m)

to_signature_key(_m, _args, _kwargs)

to_transformed_forward(_m)

transform(config, *rules)

Configure Dmx-specific numerics/sparsity/logics

Attributes

dmx_config

"Returns the DmxConfig object for the model

dmx_module_names

"Returns a list of module names listed in a dmx_config

op_set

Returns a set of unique ops present in the model

transformed

additional_dmx_aware_mappings