12 references to RobertaModel
Microsoft.ML.TorchSharp (12)
Extensions\TokenizerExtensions.cs (1)
54
return tokenizer.
RobertaModel
().ConvertIdsToOccurrenceRanks(tokenizer.EncodeToIds(sentence));
NasBert\NasBertTrainer.cs (2)
204
EnglishRobertaTokenizer tokenizerModel = Tokenizer.
RobertaModel
();
240
return DataUtils.CollateTokens(inputTensors, Tokenizer.
RobertaModel
().PadIndex, device: Device);
NasBert\NerTrainer.cs (2)
190
t = torch.tensor((ZeroArray).Concat(Tokenizer.
RobertaModel
().ConvertIdsToOccurrenceRanks(encoding.Select(t => t.Id).ToArray())).ToList(), device: Device);
330
EnglishRobertaTokenizer tokenizerModel = tokenizer.
RobertaModel
();
NasBert\SentenceSimilarityTrainer.cs (1)
242
EnglishRobertaTokenizer tokenizerModel = tokenizer.
RobertaModel
();
NasBert\TextClassificationTrainer.cs (1)
266
EnglishRobertaTokenizer tokenizerModel = tokenizer.
RobertaModel
();
Roberta\QATrainer.cs (5)
352
srcTensor = PrepareBatchTensor(ref inputTensors, device: Device, Tokenizer.
RobertaModel
().PadIndex);
406
var contextTokenId = Tokenizer.
RobertaModel
().ConvertIdsToOccurrenceRanks(contextTokens.Select(t => t.Id).ToArray());
857
var contextTokenId = _parent.Tokenizer.
RobertaModel
().ConvertIdsToOccurrenceRanks(_parent.Tokenizer.EncodeToIds(context.ToString()));
859
var questionTokenId = _parent.Tokenizer.
RobertaModel
().ConvertIdsToOccurrenceRanks(_parent.Tokenizer.EncodeToIds(question.ToString()));
927
outputCache.PredictedAnswersBuffer[index] = new ReadOnlyMemory<char>(_parent.Tokenizer.Decode(_parent.Tokenizer.
RobertaModel
().ConvertOccurrenceRanksToIds(contextIds).ToArray().AsSpan(predictStart - questionLength - 2, predictEnd - predictStart).ToArray()).Trim().ToCharArray());