llama-cpp-hs
Copyright(c) 2025 Tushar Adhatrao
LicenseMIT
MaintainerTushar Adhatrao <tusharadhatrao@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Llama.Vocab

Description

 
Synopsis

Documentation

getVocabSize :: Vocab -> IO Int Source #

Get the number of vocab entries

getVocabTokenCount :: Vocab -> IO Int Source #

Get the number of tokens in the vocab

getVocabTokenText :: Vocab -> LlamaToken -> IO String Source #

Get the text for a token

getVocabTokenScore :: Vocab -> LlamaToken -> IO Float Source #

Get the score for a token

getVocabTokenAttr :: Vocab -> LlamaToken -> IO Int Source #

Get the attribute for a token

isVocabTokenEog :: Vocab -> LlamaToken -> IO Bool Source #

Check if a token is end-of-grammar

isVocabTokenControl :: Vocab -> LlamaToken -> IO Bool Source #

Check if a token is a control token

getVocabBosToken :: Vocab -> IO LlamaToken Source #

Get the beginning-of-sentence token

getVocabEosToken :: Vocab -> IO LlamaToken Source #

Get the end-of-sentence token

getVocabEotToken :: Vocab -> IO LlamaToken Source #

Get the end-of-turn token

getVocabSepToken :: Vocab -> IO LlamaToken Source #

Get the sentence separator token

getVocabNlToken :: Vocab -> IO LlamaToken Source #

Get the next-line token

getVocabPadToken :: Vocab -> IO LlamaToken Source #

Get the padding token

getVocabAddBOSToken :: Vocab -> IO Bool Source #

Get whether to add BOS token automatically

getVocabAddEOSToken :: Vocab -> IO Bool Source #

Get whether to add EOS token automatically

getVocabFIMPrefixToken :: Vocab -> IO LlamaToken Source #

Get the FIM prefix token

getVocabFIMSuffixToken :: Vocab -> IO LlamaToken Source #

Get the FIM suffix token

getVocabFIMMiddleToken :: Vocab -> IO LlamaToken Source #

Get the FIM middle token

getVocabFIMPADToken :: Vocab -> IO LlamaToken Source #

Get the FIM pad token

getVocabFIMSeparatorToken :: Vocab -> IO LlamaToken Source #

Get the FIM separator token