You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ITokenizer.cs 393 B

123456789101112131415
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace LLama.Transform
  5. {
  6. public interface ITokenizer
  7. {
  8. IEnumerable<int> Tokenize(LLamaContext context, string text, bool addBos = true, bool special = false);
  9. string Detokenize(LLamaContext context, int token);
  10. string Detokenize(LLamaContext context, IEnumerable<int> tokens);
  11. }
  12. }