Skip to content

add the handle to the model during loadmodel #27

@HarvieKrumpet

Description

@HarvieKrumpet

Please add this to your loadmodel routine

public unsafe nint LoadModel(string modelPath, LlmModelOptions? modelOptions = default, Action<float>? progressCallback = default, bool waitForMainLoop = true)
{
...
            nint handle = _model.Create(() => llama_load_model_from_file(modelPath, mparams), llama_free_model);
...
return handle;

So that I have access to the actual loaded model for running additional functions (such as load meta vars...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions