Skip to content

fix: avoid writable mmap for read-only weights#1698

Merged
leejet merged 1 commit into
masterfrom
fix/mmap-readonly-offload-weights
Jun 22, 2026
Merged

fix: avoid writable mmap for read-only weights#1698
leejet merged 1 commit into
masterfrom
fix/mmap-readonly-offload-weights

Conversation

@leejet

@leejet leejet commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Defer model file mmap setup until LoRA application mode determines whether writable mmap is required.
  • Propagate the writable mmap choice into ModelManager so CPU/offloaded read-only weights can use read-only file mappings instead of always using writable private mappings.

Related Issue / Discussion

Fix #1675

Additional Information

N/A

Checklist

@leejet leejet merged commit f440ad9 into master Jun 22, 2026
14 checks passed
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.

[Bug] regression: increased resident memory usage with mmap since master-691-563137a

1 participant