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

fix: AsyncLLMEngine bugs #82

Merged
merged 2 commits into from
Mar 22, 2025
Merged

Conversation

bradhilton
Copy link
Contributor

Addresses a couple raised exceptions when creating an AsyncLLMEngine by:

  1. Also checking the engine attribute which points to an _AsyncLLMEngine instance
  2. Checking valid params against AsyncEngineArgs, instead of EngineArgs, if use_async is True

@danielhanchen danielhanchen changed the base branch from main to nightly March 18, 2025 07:10
@danielhanchen
Copy link
Contributor

Nice thanks!

@danielhanchen danielhanchen merged commit 2f3c87b into unslothai:nightly Mar 22, 2025
danielhanchen added a commit that referenced this pull request Mar 22, 2025
* Update compiler.py

* Update patching_utils.py

* Update patching_utils.py

* Update patching_utils.py

* Update peft_utils.py

* Update compiler.py

* Update loss_utils.py

* Update loss_utils.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* bug fixes

* Update compiler.py

* Update compiler.py

* Update vision_utils.py

* Update compiler.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Bug fixes

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update loss_utils.py

* Update loss_utils.py

* gpu_memory_utilization

* Update temporary_patches.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* train on completions VLMs

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* VLM train only on completions

* Update loss_utils.py

* Update dataset_utils.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update saving_utils.py

* Update llama_cpp.py

* Update llama_cpp.py

* Update saving_utils.py

* Update saving_utils.py

* Update __init__.py

* Update compiler.py

* Update loss_utils.py

* Update compiler.py

* Update loss_utils.py

* Update loss_utils.py

* Update llama_cpp.py

* Update loss_utils.py

* Update compiler.py

* Update llama_cpp.py

* Update compiler.py

* Update vllm_utils.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update training_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Revert "Update dataset_utils.py"

This reverts commit 3b690ad.

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Remove prints

* Update compiler.py

* Update saving_utils.py

* Update temporary_patches.py

* Update __init__.py

* Update pyproject.toml

* Update vllm_utils.py

* bug fix #2008 unsloth issue - load_in_4bit = True + fast_inference = True (#79)

* bug fix #2008 unsloth

* non-quant dtype fix

* Update vllm_utils.py

---------

Co-authored-by: Daniel Han <[email protected]>

* Update dataset_utils.py

* Update compiler.py

* Update temporary_patches.py

* Gemma 3 fixes

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Gemma 3 fixes

* Update patching_utils.py

* Update compiler.py

* Update compiler.py

* Update patching_utils.py

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* compiler

* Update gradient_checkpointing.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* causal mask dtype

* Fix checkpoint and save from local file (#74)

* Enhance gradient checkpointing and add original model ID retrieval in saving utilities

* In case adapter_config.json as well

* Update patching_utils.py

* Update patching_utils.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update loss_utils.py

* Update compiler.py

* Update vllm_utils.py

* Update compiler.py

* Update peft_utils.py

* Update rl_replacements.py

* Update vllm_utils.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update vllm_lora_worker_manager.py

* Update utils.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update dataset_utils.py

* bidirectional attention

* Update vllm_utils.py

* Update __init__.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_lora_worker_manager.py

* Update vllm_lora_worker_manager.py

* Update vllm_lora_worker_manager.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update __init__.py

* fix: AsyncLLMEngine bugs (#82)

* fixed a typo in L119, removing unnecessary len() (#84)

Co-authored-by: Xiaochen Zhu <[email protected]>

---------

Co-authored-by: Mukkesh Ganesh <[email protected]>
Co-authored-by: Edd <[email protected]>
Co-authored-by: Brad Hilton <[email protected]>
Co-authored-by: SpaceHunter <[email protected]>
Co-authored-by: Xiaochen Zhu <[email protected]>
danielhanchen added a commit that referenced this pull request Mar 26, 2025
* Update dataset_utils.py

* Update dataset_utils.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update loss_utils.py

* Update loss_utils.py

* gpu_memory_utilization

* Update temporary_patches.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* train on completions VLMs

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* VLM train only on completions

* Update loss_utils.py

* Update dataset_utils.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update saving_utils.py

* Update llama_cpp.py

* Update llama_cpp.py

* Update saving_utils.py

* Update saving_utils.py

* Update __init__.py

* Update compiler.py

* Update loss_utils.py

* Update compiler.py

* Update loss_utils.py

* Update loss_utils.py

* Update llama_cpp.py

* Update loss_utils.py

* Update compiler.py

* Update llama_cpp.py

* Update compiler.py

* Update vllm_utils.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update rl_replacements.py

* Update training_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Revert "Update dataset_utils.py"

This reverts commit 3b690ad.

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Remove prints

* Update compiler.py

* Update saving_utils.py

* Update temporary_patches.py

* Update __init__.py

* Update pyproject.toml

* Update vllm_utils.py

* bug fix #2008 unsloth issue - load_in_4bit = True + fast_inference = True (#79)

* bug fix #2008 unsloth

* non-quant dtype fix

* Update vllm_utils.py

---------

Co-authored-by: Daniel Han <[email protected]>

* Update dataset_utils.py

* Update compiler.py

* Update temporary_patches.py

* Gemma 3 fixes

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Gemma 3 fixes

* Update patching_utils.py

* Update compiler.py

* Update compiler.py

* Update patching_utils.py

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* Update compiler.py

* compiler

* Update gradient_checkpointing.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* causal mask dtype

* Fix checkpoint and save from local file (#74)

* Enhance gradient checkpointing and add original model ID retrieval in saving utilities

* In case adapter_config.json as well

* Update patching_utils.py

* Update patching_utils.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update loss_utils.py

* Update compiler.py

* Update vllm_utils.py

* Update compiler.py

* Update peft_utils.py

* Update rl_replacements.py

* Update vllm_utils.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update compiler.py

* Update vllm_lora_worker_manager.py

* Update utils.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update dataset_utils.py

* bidirectional attention

* Update vllm_utils.py

* Update __init__.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_utils.py

* Update vllm_lora_worker_manager.py

* Update vllm_lora_worker_manager.py

* Update vllm_lora_worker_manager.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update temporary_patches.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update loss_utils.py

* Update __init__.py

* fix: AsyncLLMEngine bugs (#82)

* fixed a typo in L119, removing unnecessary len() (#84)

Co-authored-by: Xiaochen Zhu <[email protected]>

* Fix gradient checkpointing warning filter implementation

* Input grads fix for gemma3 (#96)

* gemma require gradients fix

* Update peft_utils.py

---------

Co-authored-by: Daniel Han <[email protected]>

* Update vision_utils.py

* Vision requires grad

* Check SDPA for Mistral / Pixtral

* Update compiler.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update __init__.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vision_utils.py

* Update vllm_utils.py (#99)

Fix bugs in generate_batches.py.Original output = [] will result in duplication of results.

* Update vision_utils.py

* Fixes to support IterableDataset (#98)

* Support Iterable Datasets

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Update dataset_utils.py

* Preserve batch size from iterable dataset

* Preserve batch size from iterable dataset

* Support train_on_response_only with IterableDataset

* Support train_on_response_only with IterableDataset

* Support train_on_response_only with IterableDataset

* Support train_on_response_only with IterableDataset

---------

Co-authored-by: Mukkesh Ganesh <[email protected]>
Co-authored-by: Edd <[email protected]>
Co-authored-by: Brad Hilton <[email protected]>
Co-authored-by: SpaceHunter <[email protected]>
Co-authored-by: Xiaochen Zhu <[email protected]>
Co-authored-by: Roland Tannous <[email protected]>
Co-authored-by: DoubleMathew <[email protected]>
Co-authored-by: Michael Han <[email protected]>
Co-authored-by: Qian Wu <[email protected]>
Co-authored-by: marcandrelarochelle <[email protected]>
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