[PR #4572] [CLOSED] [GUI] DeepSeek load/tune keeps --vision on|off and drops only a bare --vision #5098

Closed
opened 2026-11-07 16:32:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4572
Author: @Nyarlathoteppppp
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: fix/4507-vision-value


📝 Commits (1)

  • e4e8058 App load and tune keep a DeepSeek model's --vision on/off pair and drop only a bare --vision when picture reading is off; quant_quality does the same (#4507)

📊 Changes

4 files changed (+36 additions, -2 deletions)

View changed files

📝 apps/host/server/native-control.mjs (+1 -1)
📝 apps/host/tests/draft-layer.test.mjs (+15 -0)
➕ tests/terminal/test_launch_vision_value.py (+19 -0)
📝 tools/quant_quality.py (+1 -1)

📄 Description

Problem and result

For a DeepSeek V4.1 model, setup writes --vision off (or on) into the model's args (setup.py:8270); DeepSeek configs have no vision section. When the app builds the run config for a load or a tune, native-control.mjs drops --vision whenever cfg.vision is falsy, which is always the case for DeepSeek. It removes only the flag, so the engine gets ... --eos 1 off --dspark auto and exits with unknown option off (exit 2), as reported in #4507 and confirmed by a second user on Windows.

After the change, a valued --vision on|off pair is kept as written and only a bare --vision (the Qwen/serve flag with no value) is removed when picture reading is off. tools/quant_quality.py had the same token-only drop and gets the same rule.

Fixes #4507 (duplicate #4505 has the same cause).

Approach

I did not remove the pair (the issue's suggested expectation): the DeepSeek engine loads its vision tower by default (src/dsv41/ds4_model.hpp:65, bool vision = true), so dropping --vision off would load the tower the user or setup turned off and cost memory. Keeping the pair keeps exactly the tower choice setup wrote; for DeepSeek the args are the only place that choice lives (the app's picture toggle needs a vision section). The Qwen behaviour (bare --vision removed when pictures are off) is unchanged.

strata_cli/launch/runner.py:321 has a similar token filter but skips deepseek41 configs, so it is left alone. Archived scripts under bench/results/ with the same pattern are not touched.

Validation

Passed:

  • node --test apps/host/tests/draft-layer.test.mjs (Node 26.0.0): 7 passed. The new test loads a deepseek41 fixture with --vision off, --vision on and a bare --vision, each with and without a following flag; it fails on 46c152a (1 failed, 6 passed) and passes with the fix. The existing "picture reading off sticks" and "picture reading on keeps --vision" tests still pass.
  • python -m pytest tests/terminal/test_launch_vision_value.py: passes with the fix; 4 subtests fail on 46c152a (value left behind by quant_quality.engine_args).
  • The 10 host test files that reference native-control.mjs (models-folder, packaged-control, native-two-models, source-server-env, qa1-downloads, parallel-default, user-args, drafting, draft-layer, component-updates): 99 of 107 pass with the fix; the same 8 tests fail on 46c152a (97 of 105 pass there).
  • Environment: macOS 26 (Darwin 25.5) arm64, Apple M1 Pro, Python 3.14.7, base 46c152a.

Failed:
none observed.

Not run:

  • a real DeepSeek V4.1 load in the app (no model or GPU here), Windows/Linux;
  • the full host suite (node scripts/test.mjs): it did not finish here (no progress after 35 minutes; several files fail to load with ERR_MODULE_NOT_FOUND because this checkout has no apps/host dependencies installed).

Limits

The DeepSeek picture setting still cannot be changed from the app's toggle; that is outside this fix.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4572 **Author:** [@Nyarlathoteppppp](https://github.com/Nyarlathoteppppp) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/4507-vision-value` --- ### 📝 Commits (1) - [`e4e8058`](https://github.com/Niko1221/Strata/commit/e4e805867e0f46eea551884f5f46bf0c9d7ae2e1) App load and tune keep a DeepSeek model's --vision on/off pair and drop only a bare --vision when picture reading is off; quant_quality does the same (#4507) ### 📊 Changes **4 files changed** (+36 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `apps/host/server/native-control.mjs` (+1 -1) 📝 `apps/host/tests/draft-layer.test.mjs` (+15 -0) ➕ `tests/terminal/test_launch_vision_value.py` (+19 -0) 📝 `tools/quant_quality.py` (+1 -1) </details> ### 📄 Description ## Problem and result For a DeepSeek V4.1 model, setup writes `--vision off` (or `on`) into the model's args (`setup.py:8270`); DeepSeek configs have no `vision` section. When the app builds the run config for a load or a tune, `native-control.mjs` drops `--vision` whenever `cfg.vision` is falsy, which is always the case for DeepSeek. It removes only the flag, so the engine gets `... --eos 1 off --dspark auto` and exits with `unknown option off` (exit 2), as reported in #4507 and confirmed by a second user on Windows. After the change, a valued `--vision on|off` pair is kept as written and only a bare `--vision` (the Qwen/serve flag with no value) is removed when picture reading is off. `tools/quant_quality.py` had the same token-only drop and gets the same rule. ## Related discussion Fixes #4507 (duplicate #4505 has the same cause). ## Approach I did not remove the pair (the issue's suggested expectation): the DeepSeek engine loads its vision tower by default (`src/dsv41/ds4_model.hpp:65`, `bool vision = true`), so dropping `--vision off` would load the tower the user or setup turned off and cost memory. Keeping the pair keeps exactly the tower choice setup wrote; for DeepSeek the args are the only place that choice lives (the app's picture toggle needs a `vision` section). The Qwen behaviour (bare `--vision` removed when pictures are off) is unchanged. `strata_cli/launch/runner.py:321` has a similar token filter but skips `deepseek41` configs, so it is left alone. Archived scripts under `bench/results/` with the same pattern are not touched. ## Validation **Passed:** - `node --test apps/host/tests/draft-layer.test.mjs` (Node 26.0.0): 7 passed. The new test loads a `deepseek41` fixture with `--vision off`, `--vision on` and a bare `--vision`, each with and without a following flag; it fails on `46c152a` (1 failed, 6 passed) and passes with the fix. The existing "picture reading off sticks" and "picture reading on keeps --vision" tests still pass. - `python -m pytest tests/terminal/test_launch_vision_value.py`: passes with the fix; 4 subtests fail on `46c152a` (value left behind by `quant_quality.engine_args`). - The 10 host test files that reference `native-control.mjs` (models-folder, packaged-control, native-two-models, source-server-env, qa1-downloads, parallel-default, user-args, drafting, draft-layer, component-updates): 99 of 107 pass with the fix; the same 8 tests fail on `46c152a` (97 of 105 pass there). - Environment: macOS 26 (Darwin 25.5) arm64, Apple M1 Pro, Python 3.14.7, base `46c152a`. **Failed:** none observed. **Not run:** - a real DeepSeek V4.1 load in the app (no model or GPU here), Windows/Linux; - the full host suite (`node scripts/test.mjs`): it did not finish here (no progress after 35 minutes; several files fail to load with `ERR_MODULE_NOT_FOUND` because this checkout has no `apps/host` dependencies installed). ## Limits The DeepSeek picture setting still cannot be changed from the app's toggle; that is outside this fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:40 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5098
No description provided.