Copyright | (c) 2025 Tushar Adhatrao |
---|---|
License | MIT |
Maintainer | Tushar Adhatrao <tusharadhatrao@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Llama.Adapter
Description
Synopsis
- initAdapterLora :: Model -> FilePath -> IO (Either String AdapterLora)
- setAdapterLora :: Context -> AdapterLora -> Float -> IO (Either String ())
- rmAdapterLora :: Context -> AdapterLora -> IO (Either String ())
- clearAdapterLora :: Context -> IO ()
- applyAdapterCVec :: Context -> Maybe [Float] -> Int -> Int -> Int -> IO (Either String ())
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.