unsloth/studio
danielhanchen 047d9d4d70 Studio: strip orphaned tool-call markup and byte-fallback chars at the tool-call chokepoints
On an MTP GGUF model, speculative decoding on a quantized target surfaces
byte-fallback garbage as U+FFFD plus an orphaned tool-call close tag whose opener
was drained or mangled, which leaked into chat (issue #7084).

Centralize the scrub at the tool-call chokepoints instead of scattering it
per delta:

- strip_tool_markup now sanitizes control chars / U+FFFD and removes a trailing
  orphan-close run, gated by a </tool_call> style sentinel so code/XML literals
  survive. Kimi and DeepSeek end-of-turn closers join the sentinel set.
- The two streaming-strip entries (safetensors strip_tool_markup_streaming and
  the GGUF _strip_tool_markup_streaming) sanitize at the top and drop trailing
  orphan closes on the final segment, so live display matches the finalized
  answer.
- ToolLoopController.record_result scrubs a tool result before it reaches the
  model or the tool card.

Drops the scattered per-delta content, tool-args, and reasoning-channel scrubs
and the secondary live-stream scrub, which are now covered by the chokepoints
above.
2026-07-20 12:58:21 +00:00
..
backend Studio: strip orphaned tool-call markup and byte-fallback chars at the tool-call chokepoints 2026-07-20 12:58:21 +00:00
frontend Studio: hide the RAG embedder and llama.cpp probe from the hub cached inventory (#7018) 2026-07-19 03:20:56 -07:00
src-tauri Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
install_node_prebuilt.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
install_python_stack.py Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
MCP.md Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
node_prebuilt_pins.json Pin isolated Node.js installer to committed sha256 digests (#6625) 2026-06-24 05:47:58 -07:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
setup.sh Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
Unsloth_Studio_Colab.ipynb Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00