3 instantiations of CausalLMModelInput
Microsoft.ML.GenAI.Core (3)
Pipeline\CausalLMPipeline.cs (3)
142var input = new CausalLMModelInput(inputIds, attentionMask, pastKeyValuesLength: 0) 151var input = new CausalLMModelInput(inputIds[.., prevPos..curPos], attentionMask[.., prevPos..curPos], pastKeyValuesLength: prevPos) 307var input = new CausalLMModelInput(inputTensor, attentionMask, pastKeyValuesLength: 0)
22 references to CausalLMModelInput
Microsoft.ML.GenAI.Core (8)
CausalLMPipelineChatClient.cs (1)
19where TCausalLMModel : nn.Module<CausalLMModelInput, CausalLMModelOutput>
Pipeline\CausalLMPipeline.cs (7)
19where TModel : nn.Module<CausalLMModelInput, CausalLMModelOutput> 66where TModel : nn.Module<CausalLMModelInput, CausalLMModelOutput> 94nn.Module<CausalLMModelInput, CausalLMModelOutput> model, 114public nn.Module<CausalLMModelInput, CausalLMModelOutput> Model { get; } 142var input = new CausalLMModelInput(inputIds, attentionMask, pastKeyValuesLength: 0) 151var input = new CausalLMModelInput(inputIds[.., prevPos..curPos], attentionMask[.., prevPos..curPos], pastKeyValuesLength: prevPos) 307var input = new CausalLMModelInput(inputTensor, attentionMask, pastKeyValuesLength: 0)
Microsoft.ML.GenAI.LLaMA (4)
LlamaForCausalLM.cs (2)
17public class LlamaForCausalLM : nn.Module<CausalLMModelInput, CausalLMModelOutput> 60public override CausalLMModelOutput forward(CausalLMModelInput input)
Module\LlamaModel.cs (2)
12internal class LlamaModel : nn.Module<CausalLMModelInput, CausalLMModelOutput> 53public override CausalLMModelOutput forward(CausalLMModelInput input)
Microsoft.ML.GenAI.Mistral (4)
MistralForCausalLM.cs (2)
16public class MistralForCausalLM : nn.Module<CausalLMModelInput, CausalLMModelOutput> 39public override CausalLMModelOutput forward(CausalLMModelInput input)
MistralModel.cs (2)
12public class MistralModel : nn.Module<CausalLMModelInput, CausalLMModelOutput> 51public override CausalLMModelOutput forward(CausalLMModelInput input)
Microsoft.ML.GenAI.Phi (6)
Module\Phi3Model.cs (2)
13internal class Phi3Model : nn.Module<CausalLMModelInput, CausalLMModelOutput> 54public override CausalLMModelOutput forward(CausalLMModelInput input)
Phi2\Phi2ForCasualLM.cs (2)
17public class Phi2ForCasualLM : nn.Module<CausalLMModelInput, CausalLMModelOutput> 33public override CausalLMModelOutput forward(CausalLMModelInput input) // use_cache, output_attentions, output_hidden_states
Phi3\Phi3ForCasualLM.cs (2)
21public class Phi3ForCasualLM : nn.Module<CausalLMModelInput, CausalLMModelOutput> 41public override CausalLMModelOutput forward(CausalLMModelInput input)