Skip to content

[Chore] Replace all base64 usages with faster pybase64 package#37290

Merged
DarkLight1337 merged 4 commits intovllm-project:mainfrom
Isotr0py:replace-base64
Mar 17, 2026
Merged

[Chore] Replace all base64 usages with faster pybase64 package#37290
DarkLight1337 merged 4 commits intovllm-project:mainfrom
Isotr0py:replace-base64

Conversation

@Isotr0py
Copy link
Copy Markdown
Member

@Isotr0py Isotr0py commented Mar 17, 2026

Purpose

  • Although Move to a faster base64 implementation #19984 introduced faster pybase64, there're still lots of legacy/new functions still use base64.
  • This PR replaces all base64 usage with pybase64 and adds base64 to check_forbidden_imports.py similar to regex.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify
Copy link
Copy Markdown

mergify bot commented Mar 17, 2026

Documentation preview: https://vllm--37290.org.readthedocs.build/en/37290/

@mergify mergify bot added documentation Improvements or additions to documentation frontend llama Related to Llama models multi-modality Related to multi-modality (#4194) performance Performance-related issues qwen Related to Qwen models labels Mar 17, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces all usages of the standard base64 library with the faster pybase64 package. The changes are mostly correct and also include an update to the pre-commit hook to enforce this change. However, I found one critical issue in vllm/multimodal/media/audio.py where pybase64 is used without being imported, which will cause a NameError.

@Isotr0py Isotr0py added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 17, 2026
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) March 17, 2026 11:51
@mergify
Copy link
Copy Markdown

mergify bot commented Mar 17, 2026

Hi @Isotr0py, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@DarkLight1337 DarkLight1337 merged commit a836524 into vllm-project:main Mar 17, 2026
60 checks passed
@Isotr0py Isotr0py deleted the replace-base64 branch March 17, 2026 16:40
Lucaskabela pushed a commit to Lucaskabela/vllm that referenced this pull request Mar 17, 2026
andylolu2 pushed a commit to andylolu2/vllm that referenced this pull request Mar 18, 2026
wendyliu235 pushed a commit to wendyliu235/vllm-public that referenced this pull request Mar 18, 2026
fxdawnn pushed a commit to fxdawnn/vllm that referenced this pull request Mar 19, 2026
khairulkabir1661 pushed a commit to khairulkabir1661/vllm that referenced this pull request Mar 27, 2026
Monishver11 pushed a commit to Monishver11/vllm that referenced this pull request Mar 27, 2026
…project#37290)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: Monishver Chandrasekaran <monishverchandrasekaran@gmail.com>
JiantaoXu pushed a commit to JiantaoXu/vllm that referenced this pull request Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend llama Related to Llama models multi-modality Related to multi-modality (#4194) performance Performance-related issues qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants