struct QLoraMlp {
struct Vec<struct Nf4Tensor> W;
struct Vec<&FloatTensor> bias;
struct Vec<&FloatTensor> A;
struct Vec<&FloatTensor> B;
unsigned long nLayers;
int act;
int outAct;
struct LoraConfig cfg;
float scale;
struct Rng rng;
}Copies the base: weights to NF4, biases as float32, all frozen. The base Mlp may be freed afterwards.
Fields
Methods
Parameterized (module.h): the adapters, as for LoraMlp.
the frozen base at rest
= drop()
§
static struct QLoraMlp attach(
const &Mlp base,
const &LoraConfig cfg,
unsigned long blockSize,
int doubleQuant,
)source · definition