Fix llama.cpp loading for Unicode Windows profiles - #8852
Draft
Imagineer99 wants to merge 2 commits into
Draft
Conversation
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.
Summary
--slot-save-pathargument on affected native Windows pathsRoot cause
llama.cpp currently validates
--slot-save-paththrough a narrowstd::filesystem::pathconstruction on Windows. An existing UTF-8 path such asC:\Users\Егор\.unsloth\studio\cache\llama-slotsis therefore reported as “not a directory”, and llama-server exits before loading the model.Slot persistence is an optional idle-unload optimization. This change degrades only that optimization on the affected path instead of preventing the model from loading at all. The fallback can be removed once the managed llama.cpp runtime includes an upstream UTF-8-safe directory check.
Before / after
The Playwright probe drives the real Studio model picker and asserts that the before/after
/api/inference/loadrequest bodies are identical. The UI response is deterministic and stubbed; the command-level behavior is covered separately by the backend A/B regression test and direct llama-server reproduction.Validation
116 passed—test_llama_extra_args_platforms.pyandtest_llama_cpp_slot_resume.py4 passed— focused Unicode-path tests3 passed— focused slot capability/server argument testsgit diff --checkpassedOne unrelated test selection could not collect locally because the compatibility environment does not include
python-multipart.