llama-cpp-hs
Copyright(c) 2025 Tushar Adhatrao
LicenseMIT
MaintainerTushar Adhatrao <[email protected]>
Safe HaskellNone
LanguageHaskell2010

Llama.Tokenize

Description

 
Synopsis

Documentation

tokenize :: Vocab -> String -> Bool -> Bool -> IO ([LlamaToken], Int) Source #

Tokenize a string into tokens

tokenToPiece :: Vocab -> LlamaToken -> Bool -> IO String Source #

Convert a token to a piece of text

detokenize :: Vocab -> [LlamaToken] -> Bool -> Bool -> IO String Source #

Detokenize tokens into a string