Skip to content

Instantly share code, notes, and snippets.

View rasatpetabit's full-sized avatar

Richard A Steenbergen rasatpetabit

View GitHub Profile
@rasatpetabit
rasatpetabit / GIST-README.md
Last active September 23, 2026 05:28
DeepSeek-V4-Flash-0731 tool-call repetition collapse: portable reproducer (3 stacks incl. Ollama cloud 6/6)

DeepSeek-V4-Flash-0731: degenerate repetition at tool-call decision points (portable reproducer)

One fixed, fully sanitized ~240k-token agentic conversation that makes DeepSeek-V4-Flash-0731 collapse into repeating a short action-announcement ("Run.") instead of emitting a tool call. Reproduced 2026-08-14 on three serving stacks that share no code or hardware:

Serving stack Trials Strict loops Notes
Ollama cloud, deepseek-v4-flash:0731-cloud 6 6/6 61-97x "Run.", all rolls hit the 2,048-token cap
@rasatpetabit
rasatpetabit / 0001-parser-do-not-consume-DSML-markup-a-request-can-neve.patch
Created August 13, 2026 18:36
DSML tool-call parser hardening for vLLM #48931 / #51914 (6 patches + regression tests)
From df753b5dd5912db8cdb50044f3b2985b942763a2 Mon Sep 17 00:00:00 2001
From: Richard A Steenbergen <ras@petabitscale.com>
Date: Wed, 12 Aug 2026 16:17:44 -0700
Subject: [PATCH 1/6] parser: do not consume DSML markup a request can never
turn into a tool call
A request that declares no tools still entered tool parsing: only
tool_choice="none" *with* tools set suppress_tool_calls, so
(CONTENT, "TOOL_START") fired, the machine entered TOOL_PREAMBLE -- which
has no content_events entry -- and every later chunk was discarded. With no