Skip to content

Support image-aware DeepSeek templates without client placeholders - #55

Merged
Elevatormusic merged 5 commits into
deepseek-v41-tp2from
codex/fix-dsv41-native-vision
Nov 6, 2026
Merged

Elevatormusic merged 5 commits into
deepseek-v41-tp2from
codex/fix-dsv41-native-vision

Conversation

@Elevatormusic

@Elevatormusic Elevatormusic commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Image-aware checkpoint templates need decoded image blocks so the template can write its own image tokens. Add the explicit server setting TF_DS_VISION_TEMPLATE=native. The existing placeholder mode stays the default for the recipe's patched legacy template.

Only the family image decoder can enable the internal template flag. Client request fields cannot change the server mode. Role, count, size, and client-written-placeholder checks remain. The special-token shield receives the same decoded messages as the template.

The integration preserves prompt-piece caching and whole-input fallback. Four new cases cover native and legacy image templates with both a supported cache and an unsupported tokenizer. They compare final prompt IDs and image spans with whole-input encoding. Removal probes show that losing either the native flag or cache path breaks the intended cases.

This carries the image-block approach from PR #37 by sivalei while preserving legacy compatibility. It addresses recipe issue #46.

Type

  • type: fix: a bug fix, or a fix after review findings
  • type: feature: new code
  • type: docs: docs only
  • type: results: run results
  • type: research: research
  • type: spec: a plan

Current validation

  • Head: 847fc9c159546b1bff8998d0a784cbeef716076b; base: 2d111657084b46b2a2776e1600f39d8c354831fa on deepseek-v41-tp2.
  • Focused native/legacy image, text-shield, prompt-cache, and integration tests: 113 passed in 11.91s.
  • Full isolated CPU plan: 3770 passed, 744 skipped, 138 deselected, 37 subtests passed in 157.82s (0:02:37). The 138 trusted-base exclusions are unchanged.
  • Focused environment: Python 3.12.15, Torch 2.9.1+cpu, tokenizers 0.22.2, Jinja2 3.1.6. No GPU or checkpoint was mounted.
  • Post-review checks use exact read-only source and frozen inputs; manifests and hashes match before and after. Containers were removed.
  • The full plan uses the separate approved fixed HTTP simulator in a fresh private network-none namespace.
  • Exact-head CI is green. Fresh Codex request completed without findings and has a new trusted thumbs-up.
  • Not run: current-head EAQ inference, two-node token hashes, image quality, paired prefill/decode, or Metal. Both local nodes still serve the existing model; no live candidate check is in progress.

Checklist

  • Model arithmetic, precision, and batcher behavior are unchanged.
  • Default placeholder mode and client input guards remain.
  • Both image modes retain cache reuse and fallback.
  • No secrets, internal hosts, or local paths were added.
  • Exact live checkpoint and paired performance qualification is complete.
AI disclosure

AI: GPT-6 and GPT-6.1 Sol (sizes unavailable) via Codex Desktop.
Checked: read the template, decoder and cache paths; inspected the conflict resolution and new tests; verified actual logs, source manifests, frozen inputs, CI and Codex evidence. Hardware qualification remains open.

@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T22:40:55.973153Z 847fc9c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: fd31a6c4c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Elevatormusic
Elevatormusic marked this pull request as ready for review November 6, 2026 20:12
@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: a6128da30f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 32b96239f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 847fc9c159

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Elevatormusic
Elevatormusic merged commit 8559c41 into deepseek-v41-tp2 Nov 6, 2026
7 checks passed
@Elevatormusic
Elevatormusic deleted the codex/fix-dsv41-native-vision branch November 6, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix a correction after review findings or a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant