Skip to content

GetState() returns a 0x0000... (null) handle #176

@redthing1

Description

@redthing1

I am using LlamaSharp on Apple Silicon (M2 Max) to run a Llama2-7B model.

I am inputting a document into the model context using the ChatSession::ChatAsync API. Then, I want to save the state and reload it later.

So I tried using llamaContext.GetState to get an opaque handle to the state, but it returns a null pointer. However, using llamaContext.GetStateData does return a byte sequence that allows me to save and load the state as expected.

Why is this the case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions