Table of Contents

Class LeasedTikTokenizer

Namespace
FoundationaLLM.Common.Services.Tokenizers
Assembly
FoundationaLLM.Common.dll

Extends the TikTokenizer class to support leasing to multiple clients.

public class LeasedTikTokenizer : TikTokenizer, ITokenizer
Inheritance
LeasedTikTokenizer
Implements
Inherited Members
Extension Methods

Constructors

LeasedTikTokenizer(Stream, IReadOnlyDictionary<string, int>, string, int)

Extends the TikTokenizer class to support leasing to multiple clients.

public LeasedTikTokenizer(Stream tikTokenBpeFileStream, IReadOnlyDictionary<string, int> specialTokensEncoder, string pattern, int cacheSize)

Parameters

tikTokenBpeFileStream Stream
specialTokensEncoder IReadOnlyDictionary<string, int>
pattern string
cacheSize int

Properties

IsLeased

Indicates whether the tokenizer is leased or not.

public bool IsLeased { get; set; }

Property Value

bool