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

Unload model from GPU #362

Open
miqaP opened this issue Sep 16, 2024 · 0 comments
Open

Unload model from GPU #362

miqaP opened this issue Sep 16, 2024 · 0 comments

Comments

@miqaP
Copy link

miqaP commented Sep 16, 2024

I'm trying to use different models with LMQL, but it seems that each new model is loaded onto the GPU. Is it possible to unload a model before loading a new one? I've searched through the code but haven't been able to figure out how to unload a model.
Here is the code I use to load a model :

self._llm = lmql.model(
                    f"local:llama.cpp:{model.get_model_absolute_path()}",
                    tokenizer=model.tokenizer,
                    n_gpu_layers=-1,
                    n_ctx=4096,
                )

I found this issue #228 but it refers to loading model using the cli "lmql serve-model"

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

No branches or pull requests

1 participant