Skip to content

added vllm lora support. #611

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
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

haizhou-shi
Copy link

This PR adds the lora inference for the vllm backend, tested on single-node single-gpu (tensor-parallel and data-parallel themselves are broken).

Thanks!

Copy link
Member

@NathanHB NathanHB left a comment

Choose a reason for hiding this comment

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

Hey ! Thanks for the PR, only a question for this :)
also need to run make quality

@ray.remote(num_gpus=1 if self.tensor_parallel_size == 1 else None)
def run_inference_one_model(model_args: dict, sampling_params: SamplingParams, requests):
llm = LLM(**model_args)
return llm.generate(prompt_token_ids=requests, sampling_params=sampling_params)
if self.lora_request is not None:
return llm.generate(prompt_token_ids=requests, sampling_params=sampling_params, lora_request=self.lora_request)
Copy link
Member

Choose a reason for hiding this comment

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

does passing lora_request=None results in a failure ? If not, we do not need the if statement

sampling_params=sampling_params,
use_tqdm=True,
)
if self.lora_request is not None:
Copy link
Member

Choose a reason for hiding this comment

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

same as above

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@NathanHB NathanHB added the feature/enhancement New feature/request label May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/enhancement New feature/request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants