Skip to content

Conversation

bmazzarol-bunnings
Copy link

Fixes #1259 and potentially #1247 with changes to how the caller manages the LLamaEmbedder.

Fixes SciSharp#1259 and potentially SciSharp#1247 with changes to how the caller manages the LLamaEmbedder.
@bmazzarol-bunnings
Copy link
Author

@martindevans need some help with re-instating the old code that used to reset the kv_cache values. https://github.com/bmazzarol-bunnings/LLamaSharp/blob/test/context-cost-24/LLama/LLamaEmbedder.cs#L73-L74

Or if it is not required then all good. It looked important.

@martindevans
Copy link
Member

Sorry for the delay on reviewing this.

The only issue I see with the current approach is that the embedder uses LLamaSeqId.Zero for all it's work. If sequence zero is being used for something else (e.g. another embedder sharing the same context) that would be bad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: GenerateAsync via the IEmbeddingGenerator interface throws ObjectDisposedException on LLama.Native.SafeLLamaContextHandle

2 participants