peft#

[[Source]]

from gemma import peft

PEFT utils for flax.linen.

All symbols#

Module#

peft

PEFT utils for flax.linen.

Class#

peft.IntDense

Wrapper around nn.Dense which adds a Quantized adapter.

peft.IntEinsum

Wrapper around nn.Einsum which adds a Quantized adapter.

peft.Interceptor

Base class for interceptors.

peft.LoRADense

Wrapper around nn.Dense which adds a LoRA adapter.

peft.LoRADenseAdapter

LoRA module.

peft.LoRADenseGeneral

Wrapper around nn.DenseGeneral which adds a LoRA adapter.

peft.LoRADenseGeneralAdapter

LoRA general dense module.

peft.LoRAEinsum

Wrapper around nn.Einsum which adds a LoRA adapter.

peft.LoRAEinsumAdapter

LoRA einsum module.

peft.ModuleInterceptor

Interceptor that capture all modules to eventually replaces them.

peft.QuantizationMethod

Quantization methods.

peft.SimulateQuantizedDense

Wrapper around nn.Dense which adds a Quantized adapter.

peft.SimulateQuantizedEinsum

Wrapper around nn.Einsum which adds a Quantized adapter.

Function#

peft.fuse_params

peft.get_axis_to_reduce_from_einsum_str

Returns the axis to reduce over.

peft.merge_params

Inverse of split_params.

peft.quantize

Quantizes the given params.

peft.simulate_quantize

Quantizes the given array.

peft.split_params

Split a nested tree into 2 trees, one with and without ‘lora’ branches.

peft.unfuse_params