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

Llama.Adapter

Description

 
Synopsis

Documentation

initAdapterLora :: Model -> FilePath -> IO (Either String AdapterLora) Source #

Initialize a LoRA adapter from a file path. This function wraps the C function llama_adapter_lora_init and returns a managed AdapterLora object.

setAdapterLora :: Context -> AdapterLora -> Float -> IO (Either String ()) Source #

Apply a LoRA adapter with a given scale.

rmAdapterLora :: Context -> AdapterLora -> IO (Either String ()) Source #

Remove a previously applied LoRA adapter.

clearAdapterLora :: Context -> IO () Source #

Clear all active LoRA adapters from the context.

applyAdapterCVec :: Context -> Maybe [Float] -> Int -> Int -> Int -> IO (Either String ()) Source #

Apply a context vector (cvec).