2 writes to Device
Microsoft.ML.GenAI.Core (2)
Pipeline\CausalLMPipeline.cs (2)
103
this.
Device
= device;
113
this.
Device
= default!;
4 references to Device
Microsoft.ML.GenAI.Core (4)
Pipeline\CausalLMPipeline.cs (4)
248
var inputTensor = torch.tensor(inputIds.ToArray(), dtype: ScalarType.Int64, device: this.
Device
).unsqueeze(0);
249
var attentionMask = torch.ones_like(inputTensor, device: this.
Device
);
309
var inputTensor = torch.tensor(inputIds.ToArray(), dtype: ScalarType.Int64, device: this.
Device
).unsqueeze(0);
310
var attentionMask = torch.ones_like(inputTensor, device: this.
Device
);