feat(mlx): wire LoRA configuration - #527
Open
adohe wants to merge 1 commit into
Open
Conversation
Propagate PEFT-compatible LoRA settings through MLX training and serving configuration while keeping adapter execution fail-fast until injection support lands. Preserve Torch-free imports for MLX-only installations and defer CUDA runtime setup to Torch-backed entry points and spawned workers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR implements the configuration and API-wiring foundation for MLX LoRA support.
MlxConfig.adapter_pathbehavior.This is the configuration phase only. MLX adapter injection, PEFT weight conversion, adapter checkpoint export, and functional LoRA serving remain intentionally blocked by an explicit
NotImplementedError.Related issue
None.
Type of change
How was it tested?
Result:
12 passed in 2.87s.Additional checks:
python -m compileallpassed for the changed Python files.git diff --checkpassed.Hardware limitations: validation was performed on macOS without running Metal training or GPU tests. Functional MLX LoRA execution is outside this phase and remains explicitly disabled.
Checklist
pytest tests/ -k cpu).