2 instantiations of LruCache
Microsoft.ML.Tokenizers (2)
12 references to LruCache
Microsoft.ML.Tokenizers (12)
Model\TiktokenTokenizer.cs (11)
29private readonly LruCache<(int Id, int TokenIndex, int TokenLength)[]> _cache;
46internal TiktokenTokenizer(string vocabFilePath, PreTokenizer? preTokenizer, IReadOnlyDictionary<string, int>? specialTokens = null, Normalizer? normalizer = null, int cacheSize = LruCache<int[]>.DefaultCacheSize) :
61internal TiktokenTokenizer(Stream vocabStream, PreTokenizer? preTokenizer, IReadOnlyDictionary<string, int>? specialTokens = null, Normalizer? normalizer = null, int cacheSize = LruCache<int[]>.DefaultCacheSize) :
83int cacheSize = LruCache<int[]>.DefaultCacheSize)
1243LruCache<int[]>.DefaultCacheSize);
1263int cacheSize = LruCache<int[]>.DefaultCacheSize)
1283int cacheSize = LruCache<int[]>.DefaultCacheSize)
1304int cacheSize = LruCache<int[]>.DefaultCacheSize,
1336int cacheSize = LruCache<int[]>.DefaultCacheSize,
1361int cacheSize = LruCache<int[]>.DefaultCacheSize,
1400int cacheSize = LruCache<int[]>.DefaultCacheSize,