[PR #4249] [GUI] accept local GGUF models with 1K and 2K context windows #4972

Open
opened 2026-11-07 16:31:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4249
Author: @zapabob
Created: 10/26/2026
Status: 🔄 Open

Base: main ← Head: codex/gui-small-gguf-context


📝 Commits (1)

  • c856522 [GUI] accept local GGUF models with small context windows

📊 Changes

9 files changed (+40 additions, -13 deletions)

View changed files

📝 apps/host/server/catalog.mjs (+1 -1)
📝 apps/host/server/engine.mjs (+1 -1)
📝 apps/host/server/local-models.mjs (+1 -1)
📝 apps/host/server/runtime-models.mjs (+1 -1)
📝 apps/host/src/screens/ModelRun.tsx (+2 -2)
📝 apps/host/src/screens/Tuning.tsx (+5 -4)
📝 apps/host/tests/annotations-32.test.mjs (+2 -2)
📝 apps/host/tests/local-models.test.mjs (+1 -1)
➕ apps/host/tests/local-small-context.test.mjs (+26 -0)

📄 Description

Problem and result

The local GGUF importer rejects a file whose declared context is below 4096 tokens, even when its architecture and other metadata pass the existing checks. A 1K or 2K model also cannot be configured consistently: the reservation validator and context controls impose the same 4K floor.

This permits integer-K contexts from 1K upwards and preserves the selected model's actual maximum through inspection, reservation and launch arguments. The model picker can select a context that fits a small model; the tuning slider no longer has a minimum above that model's maximum. The existing 128K recommendation is unchanged.

Scope

A focused context-validation fix, not a new backend or a general promise to run arbitrary GGUFs. Existing architecture, tokenizer, tensor and shard checks remain. This is adjacent to #4160 but does not resolve that issue's native catalogue/hash restrictions, so it deliberately does not close it.

Validation

Windows, Node 26.10.0, based on upstream 4b9e05a2a806a3fe24f7b2560d98626c37dade35.

Passed, from apps/host:

  • node --test tests/local-small-context.test.mjs tests/local-models.test.mjs tests/runtime-models.test.mjs tests/annotations-32.test.mjs: 27 passed, no failures or skips. Includes structurally valid synthetic 1K/2K GGUFs, rejection of contexts above their declared maximum, preservation of existing imports, and exact context propagation into engine arguments.
  • npm run typecheck.
  • npm run build (mixed-import and chunk-size warnings).
  • git diff --check.

Failed: the initial test invocation could not resolve esbuild before the isolated checkout's dependencies were made available; the final command above passed.

Not run: interactive desktop checks, GPU/real-model inference, installer builds, full host suite, or other operating systems.

Limits

The fixtures contain no real inference weights. These checks establish importer and configuration behaviour, not engine support for any particular model. Kept as a draft pending maintainer feedback and desktop verification.


🔄 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/4249 **Author:** [@zapabob](https://github.com/zapabob) **Created:** 10/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/gui-small-gguf-context` --- ### 📝 Commits (1) - [`c856522`](https://github.com/Niko1221/Strata/commit/c856522fadd2299ec50d7f5645962ce67df2f7a8) [GUI] accept local GGUF models with small context windows ### 📊 Changes **9 files changed** (+40 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `apps/host/server/catalog.mjs` (+1 -1) 📝 `apps/host/server/engine.mjs` (+1 -1) 📝 `apps/host/server/local-models.mjs` (+1 -1) 📝 `apps/host/server/runtime-models.mjs` (+1 -1) 📝 `apps/host/src/screens/ModelRun.tsx` (+2 -2) 📝 `apps/host/src/screens/Tuning.tsx` (+5 -4) 📝 `apps/host/tests/annotations-32.test.mjs` (+2 -2) 📝 `apps/host/tests/local-models.test.mjs` (+1 -1) ➕ `apps/host/tests/local-small-context.test.mjs` (+26 -0) </details> ### 📄 Description ## Problem and result The local GGUF importer rejects a file whose declared context is below 4096 tokens, even when its architecture and other metadata pass the existing checks. A 1K or 2K model also cannot be configured consistently: the reservation validator and context controls impose the same 4K floor. This permits integer-K contexts from 1K upwards and preserves the selected model's actual maximum through inspection, reservation and launch arguments. The model picker can select a context that fits a small model; the tuning slider no longer has a minimum above that model's maximum. The existing 128K recommendation is unchanged. ## Scope A focused context-validation fix, not a new backend or a general promise to run arbitrary GGUFs. Existing architecture, tokenizer, tensor and shard checks remain. This is adjacent to #4160 but does not resolve that issue's native catalogue/hash restrictions, so it deliberately does not close it. ## Validation Windows, Node 26.10.0, based on upstream `4b9e05a2a806a3fe24f7b2560d98626c37dade35`. Passed, from `apps/host`: - `node --test tests/local-small-context.test.mjs tests/local-models.test.mjs tests/runtime-models.test.mjs tests/annotations-32.test.mjs`: 27 passed, no failures or skips. Includes structurally valid synthetic 1K/2K GGUFs, rejection of contexts above their declared maximum, preservation of existing imports, and exact context propagation into engine arguments. - `npm run typecheck`. - `npm run build` (mixed-import and chunk-size warnings). - `git diff --check`. Failed: the initial test invocation could not resolve `esbuild` before the isolated checkout's dependencies were made available; the final command above passed. Not run: interactive desktop checks, GPU/real-model inference, installer builds, full host suite, or other operating systems. ## Limits The fixtures contain no real inference weights. These checks establish importer and configuration behaviour, not engine support for any particular model. Kept as a draft pending maintainer feedback and desktop verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#4972
No description provided.