17 instantiations of QuantizedLinear
Microsoft.ML.GenAI.Core (5)
Module\Attention.cs (5)
114this.o_proj = new QuantizedLinear(this._hiddenSize, this._hiddenSize, hasBias: attentionBias, dtype: dtype); 118this.qkv_proj = new QuantizedLinear(this._hiddenSize, opSize, hasBias: attentionBias, dtype: dtype); 122this.q_proj = new QuantizedLinear(this._hiddenSize, this._numHeads * this._headDim, hasBias: attentionBias, dtype: dtype); 123this.k_proj = new QuantizedLinear(this._hiddenSize, this._numKeyValueHeads * this._headDim, hasBias: attentionBias, dtype: dtype); 124this.v_proj = new QuantizedLinear(this._hiddenSize, this._numKeyValueHeads * this._headDim, hasBias: attentionBias, dtype: dtype);
Microsoft.ML.GenAI.Core.Tests (4)
QuantizedLinearTests.cs (4)
22var model = new QuantizedLinear(100000, 100, device: device); 43var model = new QuantizedLinear(100000, 100, device: device); 61var model = new QuantizedLinear(123, 10, device: device); 104var model = new QuantizedLinear(123, 10, device: device);
Microsoft.ML.GenAI.LLaMA (3)
Module\LlamaMLP.cs (3)
40this.gate_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: this._hasBias, dtype: config.DType); 41this.up_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: this._hasBias, dtype: config.DType); 42this.down_proj = new QuantizedLinear(this._intermediateSize, this._hiddenSize, hasBias: this._hasBias, dtype: config.DType);
Microsoft.ML.GenAI.Mistral (3)
MistralMLP.cs (3)
29this.gate_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: false, dtype: config.DType); 30this.up_proj = new QuantizedLinear(this._hiddenSize, this._intermediateSize, hasBias: false, dtype: config.DType); 31this.down_proj = new QuantizedLinear(this._intermediateSize, this._hiddenSize, hasBias: false, dtype: config.DType);
Microsoft.ML.GenAI.Phi (2)
Module\Phi3MLP.cs (2)
34this.gate_up_proj = new QuantizedLinear(hiddenSize, 2 * intermediateSize, hasBias: false, dtype: dtype); 35this.down_proj = new QuantizedLinear(intermediateSize, hiddenSize, hasBias: false, dtype: dtype);
17 references to QuantizedLinear
Microsoft.ML.GenAI.Core (5)
Module\Attention.cs (5)
80private readonly QuantizedLinear o_proj; 81private readonly QuantizedLinear? qkv_proj; 82private readonly QuantizedLinear? q_proj; 83private readonly QuantizedLinear? k_proj; 84private readonly QuantizedLinear? v_proj;
Microsoft.ML.GenAI.Core.Tests (4)
QuantizedLinearTests.cs (4)
22var model = new QuantizedLinear(100000, 100, device: device); 43var model = new QuantizedLinear(100000, 100, device: device); 61var model = new QuantizedLinear(123, 10, device: device); 104var model = new QuantizedLinear(123, 10, device: device);
Microsoft.ML.GenAI.LLaMA (3)
Module\LlamaMLP.cs (3)
26private readonly QuantizedLinear gate_proj; 27private readonly QuantizedLinear up_proj; 28private readonly QuantizedLinear down_proj;
Microsoft.ML.GenAI.Mistral (3)
MistralMLP.cs (3)
17private readonly QuantizedLinear gate_proj; 18private readonly QuantizedLinear up_proj; 19private readonly QuantizedLinear down_proj;
Microsoft.ML.GenAI.Phi (2)
Module\Phi3MLP.cs (2)
21private readonly QuantizedLinear gate_up_proj; 22private readonly QuantizedLinear down_proj;