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

feat: add python binding for rust llm modules #252

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

biswapanda
Copy link
Contributor

@biswapanda biswapanda commented Feb 24, 2025

What does the PR do?

TODO:

  • Add readme.md docs to run the examples
  • vllm_backed clean up

Adds python binding for llm modules:

  • model deployment card
  • preprocessor
  • backend
  • http service

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

Where should the reviewer start?

Test plan:

  • CI Pipeline ID:

Caveats:

Background

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

@biswapanda biswapanda changed the title feat: add python binding for llm modules - model deployment card, preprocessor and backend feat: add python binding for llm modules Feb 24, 2025
@biswapanda biswapanda changed the title feat: add python binding for llm modules feat: add python binding for rust llm modules Feb 24, 2025
Base automatically changed from bis/rusty-llm to bis/tokenizer February 24, 2025 18:36
Base automatically changed from bis/tokenizer to main February 24, 2025 18:57
@biswapanda biswapanda changed the title feat: add python binding for rust llm modules feat: add python binding for rust backend and preprocessor Feb 24, 2025
@biswapanda biswapanda changed the title feat: add python binding for rust backend and preprocessor feat: add python binding for rust llm modules Feb 24, 2025

use std::sync::Arc;

pub struct OpenAIChatService {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need all of this.

In tio I do:

            let frontend = ServiceFrontend::<
                SingleIn<ChatCompletionRequest>,
                ManyOut<Annotated<ChatCompletionResponseDelta>>,
            >::new();

and it is equivalent. I think that's the new way.

Take a look at launch/tio/src/input/text.rs for example.

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

Successfully merging this pull request may close these issues.

3 participants