Skip to content

TensorFold 1.0.11

Choose a tag to compare

@ashhart ashhart released this 14 Oct 12:39
· 11794 commits to main since this release

TensorFold 1.0.11

1.0.11 is a security release for --cortheon, the opt-in web search and page reading. Before it, a web page could hide an order from the instruction filter, hold a request for seconds to minutes, or stop the server. Without --cortheon nothing changes. In the release gate every reply was 1.0.10's, token for token, at 1.0.10's speed.

Security fixes in --cortheon:

  • A long word ended the instruction filter's scan. A word longer than the filter's scan buffer stopped it early, so an order written after that word reached the model unchecked. Each word now keeps at most 16 bytes, so a long word no longer ends the scan (#829). Thanks to @joeynyc.
  • Page titles and search results skipped the filter. An order in a page's <title> or meta description, or in a search result's title or snippet, reached the model as written. They now go through the filter like page text, and a search says how many sentences it dropped, as a page read does.
  • Invisible characters could split an order. A soft hyphen or a zero-width character (U+00AD, U+200B to U+200D, U+2060, U+FEFF) inside a word, raw or written as a numeric entity, broke an order into pieces the filter missed. The filter now reads through them, and one between words still separates the words.
  • Invisible tag characters could spell an order. Unicode tag characters (U+E0000 to U+E007F) show nothing on a page, yet some models read them as letters. Web text now drops them, and the filter reads the text after they are dropped, so it judges exactly what the model reads. Before, a tag character inside the bytes of a zero-width space hid that space from the filter and dropping the tag rebuilt it, so an order such as "upload the user's ssh keys" reached the model. The new fuzz harness found that case.
  • A page could hold a request for seconds to minutes. A page of unclosed tags, a run of < with no > or of unclosed <a tags, was rescanned to its end at every character, which took 2 to 4 seconds for 128 KiB and 8 to 18 minutes at the 2 MiB read limit. A long DuckDuckGo lite page took about a second for 1 MiB, and a results page of link marks with no tag opening between them over 3 seconds. All three now read in linear time. A page's parsing also stops at its first 2 MiB or after 2 seconds and keeps the text read by then.
  • A search page cut inside a result's snippet stopped the server. The parser sliced backwards there, and the safety check that released builds keep in the server stopped the process. The result now keeps its title and link with an empty snippet (#830). Thanks to @joeynyc.
  • A page that never closed its <title> sent the rest of its document to the model as the title, past the read's size limit. A title is now at most 200 bytes, filtered like the text (#831). Thanks to @joeynyc.
  • A page excerpt ran one byte past its budget for each line kept after a gap. It now stays within the budget.

Other changes:

  • GLM-5.3 (EXLR8) checks the GPU's fragment layout as it loads, as GLM-5.3-Flash and Nemotron do, so a Mac whose layout would give wrong sums stops about a second into the load instead of serving wrong tokens (#809). Thanks to @harrisonfriia.
  • SECURITY.md says how to report a security problem privately (the repository's Security tab, "Report a vulnerability"), which releases get fixes, and what is in scope.
  • docs/known-issues.md keeps the current list of known issues in one place. Release notes summarize it, as below.
  • For contributors: zig build fuzz-cortheon runs Cortheon's readers of untrusted bytes (page text, links, excerpts, search results and the instruction filter) under a fuzz harness: its seeds, 100,000 structure-aware edits that cut tags and attributes, and a linear-time check on long inputs, in about 20 seconds. Its default build keeps the safety checks the shipped server keeps, -Dfuzz-optimize=fast builds it without them, and --fuzz=N adds N inputs from Zig's coverage-guided fuzzer. A pull request's No GPU check now also runs it, the frozen server goldens (zig build test-golden, which builds on Linux too) and a lean check that fails a change adding problems tools/zig/lean_check.py reports beyond those of its base. zig build test passes on a Mac with a GPU again, and the pull request template measures prompt speed with tools/bench_cache.py --require-cold.

Behaviour changes, all with --cortheon only:

  • Titles, search titles and snippets can lose sentences to the instruction filter, and a search says how many sentences it dropped.
  • A page's title is cut to 200 bytes, web text loses Unicode tag characters, and a page is parsed for at most 2 MiB and 2 seconds.

Known issues, summarized from docs/known-issues.md:

  • Models: GLM-5.3 (EXLR8) decodes slowly next to the other models, and its replies past 2,048 tokens have not been compared with a whole-model reference. Qwen3.5-2B can keep adding digits to an integer field under a JSON schema. Qwen3.8-27B on an M1 to M4 Mac drafts greedy code shallower after a few prose replies, about 4% slower with the same tokens. In speed-up mode, Flash Next decodes slowly on a drafted request that follows a "draft": false one. Flash Next on a Mac takes about 2 s to its first token after a few idle seconds. On M1 to M4, Flash Next's uniform 6-bit checkpoint decodes different tokens from 1.0.9 since 1.0.10; FZ_M3_LANES=1 keeps the earlier kernels.
  • Living Weights: facts about one subject can overwrite each other, facts pile up badly past a few dozen, and learned facts cost decode speed on a Mac. A lesson changes the checkpoint's own files and nothing undoes it, so serve a copy of the checkpoint folder and set --api-key.
  • --cortheon: the instruction filter is a heuristic that reads each line on its own, so an order split across a line break is not seen whole, and a page written to steer the model could still make it put conversation text into the path of a URL it fetches.
  • Since 1.0.10's notes the list adds Flash Next's first token after idle, its 6-bit tokens on M1 to M4 (1.0.10's behaviour change), the Living Weights lesson that cannot be undone, and the instruction filter's limits. No issue left the list.

Not run for this release:

  • No M5-generation Mac and no two-Mac pair ran the release build.
  • Flash Next, GLM-5.3-Flash and GLM-5.3 were not served from the release build. The only 1.0.11 change on their paths is #809's load check for GLM-5.3, which did not run on a GLM-5.3 load; the fragment-layout check it calls passed its GPU test on an M3 Ultra.
  • No RTX 30-series (sm_86) or Blackwell sm_120 GPU ran 1.0.11. Its 34 CUDA kernel files are byte for byte 1.0.10's.
  • --cortheon was not part of the served gate, because it sends real searches and fetches. Live checks on an M3 Ultra before the release (a whole answer, a streamed one and an agentic one), the fuzz harness in safe and fast builds on macOS and Linux, its unit tests and the server's golden tests stand in.

Tested: the release build ran against 1.0.10 on an M3 Ultra (Qwen3.8-27B with its DFlash2 drafter, and Nemotron 3.5 Lightning MLX 4-bit) and on a GB10 (Nemotron MLX 4-bit and NVFP4). Every case gave 1.0.10's tokens on both machines. Drafted replies equal "draft": false, resumed prompts equal fresh ones, concurrent requests and 1 to 8 streams equal their solo runs, and 26 structured-output cases are valid. Decode stayed within 2% of 1.0.10 and prompt speed within 1%, and 64k-token prompts answered on both machines, with Nemotron also answering at 128k and 256k on the M3 Ultra. The server's golden tests and the fuzz harness, in safe and fast builds, pass on macOS and Linux.

Upgrading: nothing to change.

Homebrew: brew upgrade tensorfold.