dottxt-ai / outlines

Structured Text Generation
https://dottxt-ai.github.io/outlines/
Apache License 2.0
9.44k stars 479 forks source link

Llamacpp backend without other dependencies #1169

Open mobeetle opened 1 month ago

mobeetle commented 1 month ago

What behavior of the library made you think about the improvement?

I need to install torch, transformers, accelerate etc. even if I want to use outlines only with llamacpp backend.

Are these dependencies necessary?

How would you like it to behave?

Remove dependencies that are not necessary.

cpfiffer commented 1 month ago

Related: https://github.com/dottxt-ai/outlines/issues/1149

The tldr of that issue is that we need to provide a handful of optional dependencies for different inference backends. Should be reasonably simple to add to our pyproject.toml file.