Expand description
Linear<B> trait — weight-bearing projection abstraction.
Lives in ferrum-kernels alongside Backend because:
Backend::layer_forward_fusedand other “standard transformer layer” helpers want to accept&dyn Linear<Self>as their projection parameter, so the trait must be visible here.- Model code in
ferrum-modelsdepends on both ferrum-kernels and ferrum-quantization, so keeping the trait in kernels avoids any circular dependency between kernels and quantization.
Concrete implementations (DenseLinear, GptqLinear, AwqLinear, GgufLinear)
live in ferrum-quantization, which depends on ferrum-kernels for this
trait and for the Backend it parameterises over.
Traits§
- Linear
- A weight-bearing linear projection.