Takt API

Core transformation engine for applying PEFT adapters to models.

class taktiny.takt.Takt[source]

Bases: Generic

Apply adapter objects to existing Taktiny models.

classmethod apply_adapter(model, adapter)[source]

Inject adapter into all of its matching modules in model.

Existing model parameters are frozen. Parameters created by adapter modules remain trainable, so the trainer only needs to honor the normal Parameter.trainable flag. Adapter objects are retained as static model metadata for optional post-step updates.

Return type:

TypeVar(M)

Parameters:
  • model (M)

  • adapter (AdapterBase)