Skip to content

[Feature] Add vllm inference example #863

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

Merged
merged 10 commits into from
Jun 20, 2024
Merged

Conversation

wheresmyhair
Copy link
Collaborator

Description

  1. Add vllm inference example
  2. Change detokenize to decode_inference_result to make it clearer

Tests

  1. MemorySafeVLLMInference test
    image

  2. Example sh test
    image
    Note that the fetal python error comes from the killing signal. This will not affect the inference, as the results are already saved:
    image

Copy link
Contributor

@research4pan research4pan left a comment

Choose a reason for hiding this comment

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

The major part looks good to me. Some minor problems before merging into main branch.

scripts/run_vllm_inference.sh

  • [Bug] line 59: remove absolute path, which contains personal information.
  • [Style] line 77: maybe used a fixed log name?

src/lmflow/args.py

  • [Style] line 963: better to be enable_decode_inference_result to indicate that this is a flag.

src/lmflow/pipeline/utils/memory_safe_vllm_inference.py

  • [Style] line 57: better to be enable_decode_inference_result to indicate that this is a flag.

src/lmflow/pipeline/vllm_inferecer.py

  • [Style] line 87, 102, 112, 117, 128: better to be enable_decode_inference_result to indicate that this is a flag.
  • [Style] line 204: add comments, or RETURN_CODE_ERROR_BUFFER = 134 to make it easier to read.

@wheresmyhair
Copy link
Collaborator Author

Changes made, tests passed.

Tests

  1. Example sh test
    image

  2. MemorySafeVLLMInference test
    image

Copy link
Contributor

@research4pan research4pan left a comment

Choose a reason for hiding this comment

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

LGTM

@research4pan research4pan merged commit e5ab2fd into main Jun 20, 2024
2 checks passed
@wheresmyhair wheresmyhair mentioned this pull request Jun 20, 2024
34 tasks
@wheresmyhair wheresmyhair deleted the yizhenjia-vllm-inferencer branch June 20, 2024 07:14
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.

2 participants