Skip to content

feature: rust https://github.com/rustformers backend #939

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

Open
mudler opened this issue Aug 22, 2023 · 7 comments
Open

feature: rust https://github.com/rustformers backend #939

mudler opened this issue Aug 22, 2023 · 7 comments
Assignees
Labels

Comments

@mudler
Copy link
Owner

mudler commented Aug 22, 2023

Is your feature request related to a problem? Please describe.
A rust backend can be a robust alternative, and rustformers supports also other models

Describe the solution you'd like
Have a rust backend to include support to models supported by rustformers

Describe alternatives you've considered

Additional context

For reference:
https://github.com/huggingface/candle
https://github.com/hyperium/tonic
https://capnproto.org/

@lu-zero promised to give some help here =)

@mudler mudler added the enhancement New feature or request label Aug 22, 2023
@mudler mudler self-assigned this Aug 22, 2023
@localai-bot
Copy link
Contributor

⚠️⚠️⚠️⚠️⚠️

Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!

but.... I can also be funny or helpful 😸 and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.

Don't engage in conversation with me,
I don't support (yet) replying!

⚠️⚠️⚠️⚠️⚠️

I can help you with your feature request for LocalAI. To clarify, you would like to have a rust backend added to LocalAI to support models that are supported by rustformers. This will provide an alternative to the existing C++ and Python backends.
To implement this feature, we can start by adding the necessary dependencies and code to build and train the models using the rust backend. We can also ensure that the rust backend is compatible with the existing API and infrastructure of LocalAI.
As for alternatives, we could consider other programming languages such as C++ or Python, but rust has several advantages over these languages in terms of performance and safety.
Let me know if you have any further questions or if you would like to discuss this feature request further.

Sources:

@lu-zero
Copy link
Collaborator

lu-zero commented Aug 23, 2023

Some notes:

  • if LocalAI wants to explore capnproto to replace the protobuf interface that is orthogonal to supporting rust backends.
  • burn might be also interesting to consider since it may or may not support additional backends, while integrating candle examples might help us to compare quickly with already existing features.

@mudler mudler added the roadmap label Sep 14, 2023
@Aisuko
Copy link
Collaborator

Aisuko commented Oct 2, 2023

Hi, guys. I am interested in this one. May I ask you guys the processing of this? I remember that we have an issue mentioned we need to have an example of building an external backend for localAI. I believe if we finish the example first and it would be more easy for us to do this. We need a template of external backend service.

@mudler May you please split the issue to a set of issues? We can pick up one by one. And it can also make sure we can do everything in the way that we want to.

@Aisuko Aisuko self-assigned this Oct 2, 2023
@mudler
Copy link
Owner Author

mudler commented Oct 2, 2023

we have #1057 already to track documentation on how to create LocalAI backends

@lu-zero
Copy link
Collaborator

lu-zero commented Oct 2, 2023

Here is the equivalent tutorial but using tonic.

@Aisuko
Copy link
Collaborator

Aisuko commented Oct 2, 2023

Noticed and thanks.

@Aisuko
Copy link
Collaborator

Aisuko commented Oct 26, 2023

Here is an idea of the choosing of the default backend of rust #1219

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

No branches or pull requests

4 participants