Repository navigation
Conversation
|
Hi, thanks for your contributions. This is a work in progress and a fix #13919 is already in the works. However, I did manually test your PR too and it has issues, I will close this as we are already working on it and should be fixed in the next patch. Appreciate your work and feel free to test the new fixes and let me know if my conclusions are incorrect or something missing. Thank you Edit: Edit 2: |
|
ok, thank you. Yes, for me it improves RAM significantly, especially in long "night and day" agent runs. For me this is a big advantage as I use Q5 qwen flash next on 395+ and system is already well filled with this model. |
|
@Griggelor Yes, 100% very good idea, I will take a deeper look into this PR and your idea, thank you |
|
Hi @Sneakr, did you have a chance to check the PR? There are still issues with long, growing chats and typing/usability in front end in Windows. (#16656 and #16603 and my experience with unsloth 0.1.915) Shall I update PR due to changes in main and occurring conflicts? |
|
@Griggelor Hi, I have forwarded the PR to the team to look into. Tagging here for visibility @Imagineer99 @wasimysaid Edit: Sorry for the delay |
|
Hi @Sneakr and Team @Imagineer99 @wasimysaid , working in long chats, especially with Browser Use, still causes significant UI lag. Over time, these conversations can become almost unusable. Since this is still an issue, I had ChatGPT update our proposed virtualization feature to the latest Unsloth mainline yesterday.
Yesterday, I was still experiencing the familiar typing lag and very high RAM usage in a long conversation with Browser Use.
Both screenshots show the exact same chat, taken during active LLM generation. In both cases, memory usage drops by approximately 800 MB shortly after generation finishes.
On my system, the patch has been working flawlessly and reliably so far. The improvement in responsiveness is noticeable, especially in longer agent conversations. For anyone interested in testing it, the quickest way to get a feel for the feature would be to use a Windows test installation and try the prebuilt frontend executable: Download artifact. This is a major quality-of-life improvement. Alongside the compaction issues, typing lag and general UI delays are currently among the most frustrating problems in long-running agent workflows. I really hope we can get this feature into the official release. If there's anything I can do to help move this forward, maybe preparing feature documentation, providing additional benchmarks, testing, or anything else, please let me know. I'd be happy to help! |
|
Thanks @Griggelor for following up. Yes, could you update this PR with the version from your fork PR #43? That’s the version I tested. I tried it in Windows Edge with the same 740-message synthetic chat, twice per mode. With virtualization off, all 740 messages were mounted and the renderer used 514–531 MiB. With Dynamic on, only 4 were mounted and it used 203–222 MiB, about 59% less. Median typing latency was around 6 ms in both modes once the chat had settled. I’d lean toward keeping Dynamic opt-in initially. The most useful follow-up would be to compare typing with Dynamic off and on in the same long Browser Use chat while it’s generating in Unsloth Desktop. I’d also like to know how it feels to scroll back to an old tool result, find and copy the text you need, then return to the live reply. Happy to review the updated PR while you check that. |
3627aec to
47a963f
Compare
|
Hi @Imagineer99, thank you very much for testing and for sharing your results! Great to see that your measurements confirm the significant memory savings. ChatGPT has now updated the existing PR #14001 with the implementation from #43, integrated into the newer Unsloth mainline.
And yes, the exact usability points you mentioned have been particularly important to me during development and testing with real, long-running Browser Use conversations in Unsloth Desktop. My experience with the previously tested R6V3 build:
Regarding the default setting: Dynamic and Fixed are already opt-in. Virtualization is disabled by default, preserving the existing renderer. Both Dynamic and Fixed can be enabled globally or configured individually for each chat. The new November 11 integration has already passed the targeted frontend and browser tests, and the Windows EXE build succeeded. I'll run regression tests tomorrow on my real Windows system, using the new EXE with Unsloth Desktop 0.1.917, and try to collect some comparative typing latency measurements with Dynamic off and on during active Browser Use generation. Thanks again for taking the time to look into this! I hope we can get it into an official release for everyone. |
|
Thanks, I missed that Dynamic was already opt-in. Glad to hear you could copy an old tool result and jump back to the live reply. I’d be interested to hear how typing feels with Dynamic on and off in tomorrow’s Windows test. Thanks for updating the PR! |
|
Hi @Imagineer99, good news. In Unsloth 0.1.917 beta, there is no noticeable typing lag anymore, even in standard mode! So the main benefit of virtualization is now again RAM usage. This has also noticeably improved in the latest standard Unsloth version. One new minor issue I noticed in 0.1.917 standard and patched version: when opening a long chat, the text visibly shifts and jitters for about 10–20 seconds while the conversation loads. I didn't experience this with earlier versions. Nevertheless, virtualization still significantly reduces RAM usage in longer, continuous 2–3 hour chats involving Browser Use, screenshots, and AI-assisted email work. Unpatched Unsloth Desktop 0.1.917, in this use case:
Patched Unsloth Desktop 0.1.917, same use case (off):
Immediately after previous snapshot Patched Unsloth Desktop 0.1.917, same use case, same chat (dynamic):
Dynamic keeps the mounted DOM limited and reduces RAM usage. In this example, by roughly 40%. |





Why: long chats need bounded rendering
Long-running agents can extend beyond individual bounded model contexts via rolling/compaction, but the accumulated persistent conversation can make the browser/WebView2 chat renderer grow without bound. Even after existing improvements to mounted message work (#13059, #13255), retaining every historical message in the live React/DOM tree can substantially increase memory pressure and responsiveness problems. This PR windows historical mounted rows while retaining the authoritative transcript, assistant-ui runtime and stored messages. It does not enlarge the model context or change backend inference/persistence.
Modes and compatibility
ProgressiveMessages; the new virtual renderer is not eagerly loadedGlobal setting and per-chat
Use global setting / Dynamic / Fixed / Offoverrides; persisted legacy migration; all 25 locale files present in the current feature diff. A necessary exceptionally heavy tool row can exceed the DOM target by itself.Screenshots
Global display setting:
Per-chat override:
Observations — separate environments, not pooled benchmarks
Architecture
ThreadretainsProgressiveMessagesfor Off and lazy-loadsAgentHistoryScrollMessagesfor opted-in modes.Details: technical walkthrough.
Current integration and QA
5b11178, based on upstreamed3eec6(9 Nov).47a963f, based on upstreamfcae458(11 Nov; 216 upstream commits aftered3eec6). All 65 feature-file changes ported; concurrently changed frontend/locale files were merged by focused patch application to preserve the latest upstream content rather than overwriting them wholesale.pydantic_core; newer upstream install scripts contain relevant fixes. The combined source and its CI results need independent confirmation; other Mac/Composer failures should not be silently counted as successful.Known limitations and review gates
Development disclosure
Developed collaboratively with ChatGPT-6 Chat, including design, implementation, integration, debugging and QA; contributor performed separate Windows/WebView2 evaluation.