Adding support for x_transformers LLMs #1602
Replies: 3 comments 1 reply
-
You should check out the |
Beta Was this translation helpful? Give feedback.
-
Are you meaning the base classes for a model type adapter? I don't see anything specifically for x_transformers yet. https://github.com/dottxt-ai/outlines/blob/v1.0/outlines/models/base.py |
Beta Was this translation helpful? Give feedback.
-
Hi @swamidass! We do not support this library yet. If you want to try creating a model for it, you should subclass If it works out and this library is used by other people, we could then consider adding it to Outlines. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, how hard is it to add support for a new LLM model api? A quick explainer about the required methods that need to be exposed for an adapter classes would be really nice.
For reference, I want to use a transformer based on this library, x-transformers. https://github.com/lucidrains/x-transformers
The way to generate with this library:
The precise way the model is sampled is visible in the AutoregressiveWrapper's generate function at https://github.com/lucidrains/x-transformers/blob/main/x_transformers/autoregressive_wrapper.py
I suspect that it should be straight forward to create an "OutlinesAutoregressiveWrapper" class that provides the right methods, if there is documentation on how to do this. Any one have an idea on how to accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions