Skip to content

Commit

Permalink
Return values from CompareToSharpToken benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed Apr 29, 2024
1 parent 642a964 commit 7cbbd26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Benchmarks/CompareToSharpToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public IReadOnlyCollection<object> SharpTokenFullArticles()
List<object> res = new(_corpus.Length);
foreach (var text in _corpus)
{
_encoding.Encode(text);
var lst = _encoding.Encode(text);
res.Add(lst);
}

return res;
Expand All @@ -70,6 +71,7 @@ public IReadOnlyCollection<object> FastBertTokenizerFullArticles()
foreach (var text in _corpus)
{
var (iid, attM, _) = _tokenizer.Encode(text, _maxSequenceLength);
res.Add((iid, attM));
}

return res;
Expand Down

0 comments on commit 7cbbd26

Please sign in to comment.