Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchedExecutor LLava #770

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

martindevans
Copy link
Member

Added support for embeddings prompting to BatchedExecutor, allowing support for Llava!

  • Switched batch queue in BatchedExecutor to have 2 possible types - token batches and embeddings batches.
  • Switched inference lock to a integer using Interlocked, this interacts better with async.
  • Added Conversation.Prompt method for Span<float> (raw embeddings) and SafeLlavaImageEmbedHandle.
  • Added LLamaBatchEmbeddings, equivalent to LLamaBatch for embeddings instead of for tokens.
VsDebugConsole_2024-05-30_19-33-38

… support for Llava!

 - Switched batch queue in `BatchedExecutor` to have 2 possible types - token batches and embeddings batches.
 - Switched inference lock to a integer using Interlocked, this interacts better with async.
 - Added `Conversation.Prompt` method for `Span<float>` (raw embeddings) and `SafeLlavaImageEmbedHandle`.
 - Added `LLamaBatchEmbeddings`, equivalent to `LLamaBatch` for embeddings instead of for tokens.
@martindevans martindevans requested a review from SignalRT May 31, 2024 14:06
@SignalRT
Copy link
Collaborator

@martindevans, The PR seems ok for me.

Not related with this PR and more generally speaking is hard to me to have an "Executor" that doesn't implement the ILlamaExecutor interface. If seems to be a lower level of abstraction that ILlamaExecutor and more difficult to use for the final user.

@martindevans
Copy link
Member Author

Not related with this PR and more generally speaking is hard to me to have an "Executor" that doesn't implement the ILlamaExecutor interface. If seems to be a lower level of abstraction that ILlamaExecutor and more difficult to use for the final user.

Rinne had the same issue too. It is a lower level of abstraction, intended as the new foundation that high level executors (replacements for the current ones) can be built on. Since you've both been confused by this, any ideas for better names?

@martindevans martindevans merged commit afb702e into SciSharp:master May 31, 2024
6 checks passed
@martindevans martindevans deleted the batched_llava branch May 31, 2024 21:29
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.

2 participants