-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Usage]: Using AsyncLLMEngine with asyncio.run #3996
Comments
Is there a reason why you cannot use the following? from vllm import LLM
model = LLM("mistralai/Mistral-7B-Instruct-v0.2")
model.generate([prompts]) The The class you are using is not really intended to be used externally |
That's my current backup solution which works just fine. But if I can get a scenario like the above working that'd be ideal. |
Okay, is there a reason that doesn't work? Just curious so we can improve the interface. I would say that looking at Otherwise I think your best bet is to reimplement |
As far as I can tell, when using the |
What is AsyncLLMEngine? What is the difference between AsyncLLMEngine vs LLM class? |
@fozziethebeat I got the same issue, did you figure an workaround? thanks. |
Our solution was to fork off a sub-process that ran the server and waited until it was ready and then just call it via REST requests. Works well enough |
@robertgshaw2-neuralmagic Hi, Robert, how can we set |
This is the same as #4789. I'll try to send a PR to fix it. |
Your current environment
How would you like to use vllm
I want to run batch offline inference in a command line tool using
AsyncLLMEngine
in a set of coroutines being managed by a top level call toasyncio.run
.I have a demo script that ultimately does the right thing but doesn't tear down or complete correctly. It will either:
_raise_exception_on_finish
being cancelledThe minimal working example of what I want to do is:
My guess is that this is due to
AsyncLLMEngine
callingasyncio.get_event_loop
and that somehow conflicting with my top level runner callingasyncio.run
.The text was updated successfully, but these errors were encountered: