Skip to content

modeling: rebuild PEFT envoy paths on environment swap - #728

Open
koriyoshi2041 wants to merge 1 commit into
ndif-team:mainfrom
koriyoshi2041:rios/rebuild-peft-envoy-tree
Open

koriyoshi2041 wants to merge 1 commit into
ndif-team:mainfrom
koriyoshi2041:rios/rebuild-peft-envoy-tree

Conversation

@koriyoshi2041

Copy link
Copy Markdown

What changed

  • remove the previous Hugging Face module tree from the shared Envoy registry before rebuilding after a PEFT wrap or unwrap
  • preserve custom Envoy mappings across the rebuild
  • assert that the server-side adapter path matches construction with peft= and that stale root paths are gone

PEFT retains the base model as a descendant of its wrapper. Without clearing the old registry entries, rebuilding reuses Envoys carrying pre-wrap paths and never constructs the base_model.model subtree.

Closes #726.

Tests

  • fail-before: test_set_env_transitions reported model.transformer.h.0 instead of model.base_model.model.transformer.h.0
  • CUDA_VISIBLE_DEVICES="" pytest tests/test_language.py::TestPeft -q — 5 passed
  • git diff --check

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.

_remoteable_set_env('peft') leaves the envoy tree unrebuilt — paths differ from constructing with peft=

1 participant