1 write to _numKeyValueHeads
Microsoft.ML.GenAI.Core (1)
7 references to _numKeyValueHeads
Microsoft.ML.GenAI.Core (7)
Module\Attention.cs (7)
117var opSize = this._numHeads * this._headDim + 2 * (this._numKeyValueHeads * this._headDim);
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);
149keyStates = qkv[.., .., queryPos..(queryPos + this._numKeyValueHeads * this._headDim)];
150valueStates = qkv[.., .., (queryPos + this._numKeyValueHeads * this._headDim)..];
164keyStates = keyStates.view(bsz, qLen, this._numKeyValueHeads, this._headDim).transpose(1, 2);
165valueStates = valueStates.view(bsz, qLen, this._numKeyValueHeads, this._headDim).transpose(1, 2);