lloyal.node API Reference - v1.0.7
    Preparing search index...

    Interface LoadOptions

    Options for binary loading

    Controls which native binary variant is loaded when creating a context. Use this for explicit GPU variant selection with automatic fallback.

    interface LoadOptions {
        gpuVariant?: GpuVariant;
    }
    Index

    Properties

    Properties

    gpuVariant?: GpuVariant

    GPU variant to use

    • 'cuda': NVIDIA CUDA (requires libcudart.so)
    • 'vulkan': Vulkan (AMD/Intel/NVIDIA)
    • 'default' or undefined: CPU only

    If the requested variant is unavailable (missing runtime libraries), automatically falls back to CPU with a console warning.

    // Request CUDA with automatic fallback to CPU
    const ctx = await createContext(
    { modelPath: './model.gguf' },
    { gpuVariant: 'cuda' }
    );