Base:
method
forward
Microsoft.ML.GenAI.Core.GenAILinear.forward(TorchSharp.torch.Tensor)
17 references to forward
Microsoft.ML.GenAI.Core (5)
Module\Attention.cs (5)
146
var qkv = this.qkv_proj.
forward
(hiddenStates);
154
queryStates = this.q_proj.
forward
(hiddenStates);
155
keyStates = this.k_proj.
forward
(hiddenStates);
156
valueStates = this.v_proj.
forward
(hiddenStates);
214
attnOutput = this.o_proj.
forward
(attnOutput);
Microsoft.ML.GenAI.Core.Tests (4)
QuantizedLinearTests.cs (4)
90
var resultBeforeInt4 = model.
forward
(input);
94
var resultAfterInt4 = model.
forward
(input);
118
var resultBeforeInt8 = model.
forward
(input);
122
var resultAfterInt8 = model.
forward
(input);
Microsoft.ML.GenAI.LLaMA (3)
Module\LlamaMLP.cs (3)
56
using var input1 = this.gate_proj.
forward
(input);
58
using var input3 = input2 * this.up_proj.
forward
(input);
59
return this.down_proj.
forward
(input3);
Microsoft.ML.GenAI.Mistral (3)
MistralMLP.cs (3)
40
using var input1 = this.gate_proj.
forward
(input);
42
using var input3 = input2 * this.up_proj.
forward
(input);
43
return this.down_proj.
forward
(input3);
Microsoft.ML.GenAI.Phi (2)
Module\Phi3MLP.cs (2)
44
using var input1 = this.gate_up_proj.
forward
(input);
49
return this.down_proj.
forward
(upStatus);