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

Outlines integration #43

Closed
rlouf opened this issue Jan 18, 2024 · 9 comments
Closed

Outlines integration #43

rlouf opened this issue Jan 18, 2024 · 9 comments
Assignees
Labels
relation Public relation needs to be resolved

Comments

@rlouf
Copy link

rlouf commented Jan 18, 2024

This package looks awesome! I was wondering why you decided to copy Outlines' code instead of importing the FSMs directly from outlines? There are several improvements on the performance of guided generation in the pipeline and you will be missing out on those. By importing you get better as we get better :)

@Ying1123 Ying1123 assigned Ying1123 and hnyls2002 and unassigned Ying1123 Jan 18, 2024
@Ying1123
Copy link
Contributor

Ying1123 commented Jan 18, 2024

@rlouf We actually tried to import rather than copy the code. We met some dependency issues before, but we are happy to resolve the issues. @hnyls2002 Could you put your error messages here?

@Ying1123 Ying1123 added the relation Public relation needs to be resolved label Jan 18, 2024
@rlouf
Copy link
Author

rlouf commented Jan 18, 2024

Happy to help!

@hnyls2002
Copy link
Collaborator

Glad to work with you! I tried to import outlines a few weeks ago when your version was 0.0.22. The dependency error is

Could not apply nest_asyncio: Can't patch loop of type <class 'uvloop.Loop'>

This is because nest_asyncio is not compatible with our dependencies. When I looked into your repo today, I was delighted that you made nest_asyncio an optional dependency.

https://github.com/outlines-dev/outlines/blob/65ed0f7e9f900701ba62479982ee29bb47cc2738/outlines/base.py#L17-L25

Great to see this! I will import your library into ours in a short time.

@hnyls2002
Copy link
Collaborator

hnyls2002 commented Jan 19, 2024

By the way, we just implemented simple regex for constraint decoding; later, we also want to support more complex constraint decoding, such as CFGs. I am happy to see you outlines did a great job in this field!

@hnyls2002
Copy link
Collaborator

@rlouf Hi, I have made outlines an import in this PR(#60).

But when I set vllm>=0.2.5 and outlines>=0.0.24 as dependencies at the same time, we meet a conflict error:

ERROR: Cannot install sglang, sglang[srt]==0.1.5 and vllm==0.2.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    sglang[srt] 0.1.5 depends on pydantic; extra == "srt"
    outlines 0.0.24 depends on pydantic>=2.0
    vllm 0.2.5 depends on pydantic==1.10.13
    sglang[srt] 0.1.5 depends on pydantic; extra == "srt"
    outlines 0.0.24 depends on pydantic>=2.0
    vllm 0.2.7 depends on pydantic==1.10.13
    sglang[srt] 0.1.5 depends on pydantic; extra == "srt"
    outlines 0.0.24 depends on pydantic>=2.0
    vllm 0.2.6 depends on pydantic==1.10.13

Do you have any idea how to solve this?

@rlouf
Copy link
Author

rlouf commented Jan 20, 2024

We will likely need to wait until vllm-project/vllm#2468 is merged on the vLLM side, which will relax the pydantic version.

@rlouf
Copy link
Author

rlouf commented Jan 22, 2024

It should soon be ok, vLLM merged vllm-project/vllm#2531 that drops dependency on Pydantic v1.

@rlouf
Copy link
Author

rlouf commented Jan 31, 2024

vLLM released 0.3.0 which bumps the Pydantic version to >= 2.0. We'll cut a new release in Outlines today or tomorrow.

@hnyls2002
Copy link
Collaborator

@rlouf Hi, I have imported outlines as a dependency(#168). Thanks for your great work on FSM and regex!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relation Public relation needs to be resolved
Projects
None yet
Development

No branches or pull requests

3 participants