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

KernelMemory update with adding the use of already loaded model #630

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

zsogitbe
Copy link
Contributor

When using KernelMemory one may have already loaded a model which can then be used with this extension instead of loading the model again.

When using KernelMemory one may have already loaded a model which can then be used with this extension instead of loading the model again.
@zsogitbe
Copy link
Contributor Author

Please check that there is no conflict or Dispose problems with this solution before merging. Thank you.

@martindevans
Copy link
Member

Can the other overload (which loads the weights) be made to call this new overload? That way we're not duplicating some of the other stuff.

@martindevans
Copy link
Member

Lifetime management seems ok to me 👍

Both the executor and the embedder will create new contexts, which will keep the model in memory until done.

@zsogitbe
Copy link
Contributor Author

Can the other overload (which loads the weights) be made to call this new overload? That way we're not duplicating some of the other stuff.

Removed code repetition.

@AsakusaRinne AsakusaRinne added the enhancement New feature or request label Mar 29, 2024
@AsakusaRinne AsakusaRinne added this to the v0.11.0 milestone Mar 29, 2024
@AsakusaRinne AsakusaRinne merged commit 5e17e0f into SciSharp:master Mar 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants