1 write to Labels
Microsoft.ML.GenAI.Core (1)
Pipeline\CausalLMModelInput.cs (1)
41
this.
Labels
= labels;
7 references to Labels
Microsoft.ML.GenAI.Core (2)
Trainer\CasualLMSupervisedFineTuningTrainer.cs (2)
56
var labels = torch.cat(batch.Select(x => nn.functional.pad(x.
Labels
!, [0, maxLen - x.
Labels
!.shape[1]], value: -100)).ToArray(), 0).to(device);
Microsoft.ML.GenAI.Core.Tests (3)
CasualLMDatasetTest.cs (3)
47
dataset[0].
Labels
!.data<long>().Should().BeEquivalentTo([-100, -100, -100, -100, 6]);
50
dataset[^1].
Labels
!.data<long>().Should().BeEquivalentTo([-100, -100, -100, -100, -100, -100, -100, -100, 10]);
74
item.
Labels
!.shape.Should().BeEquivalentTo(item.InputIds!.shape);
Microsoft.ML.GenAI.LLaMA (2)
LlamaForCausalLM.cs (2)
69
if (input.
Labels
is not null)
75
var shiftLabels = input.
Labels
[.., ..].contiguous();