[GH-ISSUE #4945] [Engine] Dynamically unload and reload MoE experts between VRAM and RAM #2277

Open
opened 2026-11-04 01:58:06 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @RP-SGorodenski on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4945

This is related to the feature idea mentioned in [#20](https://github.com/Niko1221/Strata/issues/20), but my use case is slightly different.

Problem

I have a system with a relatively large amount of system RAM but limited VRAM (RTX 5070 with 12 GB VRAM and 128 GB DDR4 RAM).

Currently, when I need to free VRAM for another model or application, I may have to unload the entire model. This is inconvenient when I want to keep a large MoE model available while occasionally using an AI agent or another model.

Proposed feature

Would it be possible to implement a mechanism for dynamically unloading and reloading individual MoE experts between VRAM and system RAM, without unloading the entire model?

Ideally, this would allow users to:

  • Keep the model and its experts loaded in system RAM.
  • Unload selected experts from VRAM while retaining them in RAM.
  • Reload selected experts into VRAM on demand, preferably through a GUI button or another simple interface.
  • Quickly switch between different expert configurations without having to reload the entire model from disk.

Use case

For example, I could keep a large MoE model loaded in system RAM while using only a subset of its experts in VRAM for regular inference.

When I need an AI agent, I could press a button to load the experts required for the agent into VRAM, use the agent, and then unload those experts again.

This would allow me to use different expert configurations on a system with limited VRAM while taking advantage of the available system RAM.

Question

Would it be possible to implement this functionality in Strata?

I understand that the feasibility and performance may depend on the model architecture and inference backend. I would appreciate feedback on whether this approach is technically feasible and what implementation limitations it might have.

Strata 0.2.7 · Engine 0.1.55

Originally created by @RP-SGorodenski on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4945 ### Related discussion This is related to the feature idea mentioned in [[#20](https://github.com/Niko1221/Strata/issues/20)](https://github.com/Niko1221/Strata/issues/20), but my use case is slightly different. ### Problem I have a system with a relatively large amount of system RAM but limited VRAM (RTX 5070 with 12 GB VRAM and 128 GB DDR4 RAM). Currently, when I need to free VRAM for another model or application, I may have to unload the entire model. This is inconvenient when I want to keep a large MoE model available while occasionally using an AI agent or another model. ### Proposed feature Would it be possible to implement a mechanism for dynamically unloading and reloading individual MoE experts between VRAM and system RAM, without unloading the entire model? Ideally, this would allow users to: - Keep the model and its experts loaded in system RAM. - Unload selected experts from VRAM while retaining them in RAM. - Reload selected experts into VRAM on demand, preferably through a GUI button or another simple interface. - Quickly switch between different expert configurations without having to reload the entire model from disk. ### Use case For example, I could keep a large MoE model loaded in system RAM while using only a subset of its experts in VRAM for regular inference. When I need an AI agent, I could press a button to load the experts required for the agent into VRAM, use the agent, and then unload those experts again. This would allow me to use different expert configurations on a system with limited VRAM while taking advantage of the available system RAM. ### Question Would it be possible to implement this functionality in Strata? I understand that the feasibility and performance may depend on the model architecture and inference backend. I would appreciate feedback on whether this approach is technically feasible and what implementation limitations it might have. Strata 0.2.7 · Engine 0.1.55
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Add the Strata version (Settings > About, or strata --version).

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6562318954 --> @github-actions[bot] commented on GitHub (Nov 1, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Add the Strata version (Settings > About, or `strata --version`). Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@gingertonik commented on GitHub (Nov 1, 2026):

this would also be useful to me, as i run into low vram issues when attempting to do basic desktop things like take a screenshot or move windows around. i run strata on my main gaming pc that has a 4080 and 96gb of ddr4, so freeing my vram but not my system ram would be convenient.

<!-- gh-comment-id:6562556324 --> @gingertonik commented on GitHub (Nov 1, 2026): this would also be useful to me, as i run into low vram issues when attempting to do basic desktop things like take a screenshot or move windows around. i run strata on my main gaming pc that has a 4080 and 96gb of ddr4, so freeing my vram but not my system ram would be convenient.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6562567604 --> @github-actions[bot] commented on GitHub (Nov 1, 2026): Thanks, this follows the format now.
Author
Owner

@michauMiau commented on GitHub (Nov 2, 2026):

Also for this, and clear settings for allocating free VRAM in the TUI would also be helpful

<!-- gh-comment-id:6576121653 --> @michauMiau commented on GitHub (Nov 2, 2026): Also for this, and clear settings for allocating free VRAM in the TUI would also be helpful
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2277
No description provided.