Repository navigation
model list: drop license and repo-doc files from model downloads - #950
Merged
Merged
Conversation
model_list.json: remove LICENSE / LICENSE.OpenMDW-1.1 from the "files" lists of the Nemotron-3.5-Bolt DFlash entries and Qwen3.8-27B-DFlash2. They are not needed to load or run the model, so `flm pull` no longer downloads them or treats them as required. model_info.json: remove records for repo docs and metadata that no catalog entry downloads (.gitattributes, README*, LICENSE*, *.md, MANIFEST.sha256, configuration.json, a demo image and text file). Also update the qwen3.8-dflash2:27b config.json record to the current upstream revision. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Nov 6, 2026
tawei-amd
pushed a commit
that referenced
this pull request
Nov 18, 2026
…ywhere in the string (#1047) * feat(core): ryzenai-corelib 0.70.0, get_npu replaces npu_usable and testing_npu_arch Moves the core backend to ryzenai-corelib 0.70.0 (corelib main at 39c30eab). What changed in corelib 0.61 to 0.70 that reaches FastFlowLM: - 0.70, NPU query: ryzenai_corelib_npu_usable and the testing hook ryzenai_corelib_testing_npu_arch are gone. ryzenai_corelib_get_npu (none / aiem / aie2p) and ryzenai_corelib_npu_name replace them, so corelib_api.hpp no longer includes corelib/testing.h. - The runtime's readiness check now asks for aiem. The old npu_usable was false on AIE2P, whose kernels corelib runs only behind an xclbin FastFlowLM never gives it; get_npu now answers aie2p there, so checking for "any NPU" would have offered the core backend on Strix. - NpuArch names the enum with npu_name, "" for none, as before, so dev04 / aie2p platform detection is unchanged. - 0.61 / 0.68, model structs: model_metadata gains max_draft_tokens and audio_token_id; session_options gains draft_tokens. FastFlowLM zero-initialises both at their full sizeof, so no draft is asked for. - 0.62 / 0.67, matmul: the 4-bit layout is mladf_v4 (was mladf) beside AIE2P's mladf_v2, and matmul_bf16_kernel_info gains format. FastFlowLM names neither; the fake corelib fills format. - 0.68: ssmlp_bf16_weights_desc gains ungated; unused here. - Model libraries and their names are unchanged. The weights loader's switch from bad_argument to unsupported for a wrong tensor type does not matter here: FastFlowLM does not branch on corelib's status codes. The fake corelib answers get_npu from one enum and npu_name as corelib spells it; the tests refuse none and aie2p, and read "" for none. On an AIE4 (Medusa) test machine, qwen3-core 0.6b/1.7b/4b/8b, phi4-mini-it-core:4b, qwen3.5-core 4b/9b and llama3.2-core:1b each load, pass the readiness check through get_npu, report no fallback and answer correctly, at decode rates within a few percent of corelib 0.59's. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(chat): a JSON Schema pattern matches anywhere in the string, and keeps a one-character class's length bounds JSON Schema finds a string pattern anywhere in the string; xgrammar matches the regex against the whole string. A field written as {"type": "string", "minLength": 1, "maxLength": 128, "pattern": "\\S"} ("not blank") therefore allowed exactly one character, and xgrammar also drops minLength/maxLength whenever a pattern is present (it logs "pattern combined with minLength/maxLength is not supported"). Found running an agent benchmark with qwen3.6-moe-core:35b-a3b: every free-text argument of a forced chart-generation tool call came back as one character ("caption":"7","alt_text":"A","labels":["P","C"]). The caller rejected it, the grammar left the model no other call to make, and it repeated until the tool-iteration limit. normalize_schema() now: - pads the side(s) a string pattern leaves unanchored with ".*" ("\S" becomes ".*(\S).*"). A pattern anchored at both ends is left as it is, so "^\d{4}-\d{2}-\d{2}$" keeps its meaning. - lets a lone character class that only has to occur somewhere ("\S", "\d", "[a-z]", ...) lead, and turns the schema's length bounds into the repetition after it: "\S" with maxLength 128 becomes "\S.{0,127}", so the bounds xgrammar would drop are enforced. - keeps minLength/maxLength and drops the pattern instead when that repetition would be longer than 128. xgrammar compiles a longer regex repetition into a rule of its own and cannot build that rule inside a nested object ("cannot build the decoding grammar: Check failed: per_rule_fsm_hashes[...].has_value()"), so the request would fail with HTTP 400; a string past its maxLength is the likelier mistake. response_format schemas now go through normalize_schema() as tool parameters already did, so they get the same reading. New live cases in src/test/openai_api_test: test_tool_calls function_unanchored_pattern and function_nested_long_bounded_pattern, and test_response_format schema_unanchored_pattern. The two unanchored cases fail on main ('P' for "Paris"); the nested one fails with the HTTP 400 above if the bounds are folded at any length. On an AIE4 (Medusa) test machine with qwen3.6-moe-core:35b-a3b: test_tool_calls.py 18/18, test_response_format.py 12/12. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(core): ryzenai-corelib 0.87.0, has_feature replaces get_npu and npu_name Moves the core backend to ryzenai-corelib 0.87.0 (corelib main at 5bf19507). What changed in corelib 0.71 to 0.87 that reaches FastFlowLM: - 0.73, NPU query: ryzenai_corelib_get_npu, ryzenai_corelib_npu_name and the ryzenai_corelib_npu enum are gone. ryzenai_corelib_has_feature and ryzenai_corelib_feature_name replace them, over ryzenai_corelib_feature (npu, npu_aiem, npu_aie2p, gpu, npu_direct). - The runtime's readiness check asks has_feature(npu_aiem). AIE2P is still refused, since FastFlowLM never gives corelib an xclbin, and the error names npu_aie2p or none. - NpuArch passes corelib's spelling through (npu_aiem, npu_aie2p, ""), and platform_from_corelib_arch maps npu_aiem to dev04. FastFlowLM still keeps no table of devices. - Everything else FastFlowLM resolves is unchanged: every other entry point in FLM_CORELIB_FUNCTIONS keeps its signature, and model_metadata and session_options keep their layout. 0.87's single PDI list per stream, NPU direct, the .amd.gguf exports (0.80, 0.83) and the new ops do not touch FastFlowLM's calls. - 0.83: corelib's 4-bit GGUF types are renamed (AMD_Q4_G128, AMD_Q4_G32, new AMD_Q4_G64). Files published under the old type codes (ggml 128, 129) are still read as before, so the catalog's AMD files need no change. - Model libraries: ryzenai_corelib_model_d3 is new. The core build copies ryzenai_corelib_model_*.dll by glob, so it lands beside flm.exe without a change; no -core tag uses it yet. - Not taken here: corelib now lets Llama 3.2-1B/3B and 3.1-8B read a Q4_G128 GGUF in place of their Q8_0. Q8_0 still loads, so the catalog's Llama entries stay on Q8_0; switching them is a separate change. The fake corelib answers has_feature from one NPU feature, or none, and feature_name as corelib spells it. The tests refuse none and npu_aie2p, each named in the error, and read "" for none. The Linux setup guide's version check now prints 0, 87, 0. On an AIE4 (Medusa) test machine, with the core flm.exe statically linked against corelib's default build (no --npu-direct): every -core tag except Llama 3B/8B loads, passes the readiness check through has_feature(npu_aiem), reports no fallback and answers correctly, at decode rates matching 0.70's. Gemma 4 E2B/E4B, Qwen3.8 and Qwen3.6 recall a code from the middle of 4k and 12k prompts (Qwen3.6 also at 24k). An flm.exe linked against a corelib built with --npu-direct engages NPU direct for Qwen3.6 and gives the same greedy output, with prefill about 10-15% faster from 12k tokens. The core build stays on corelib's default build: --npu-direct needs CHESS in WSL, so turning it on is a build-only follow-up. Co-authored-by: Cursor <cursoragent@cursor.com> * test(core): the frontend stubs return a full vocabulary of logits; the DFlash entries hold no licence Two checks added on main left two Windows-only core suites failing on main itself. Only tests change here. - test_phi4_frontend, test_llama_frontend: #874 added a check to AutoModel::_sample that refuses logits shorter than the sampler's in_features, which is vocab_size from config.json. Each test's FakeEngine returned buffer<bf16>(1) from forward and prefill, so every test that samples failed with "Backend returned fewer logits than the frontend vocabulary". They now return kVocabSize logits, as the core backend does: 200064 for Phi-4 and 128256 for Llama. config.json takes vocab_size from the same constant. - test_model_downloader: #950 dropped LICENSE.OpenMDW-1.1 and LICENSE from the files of nemotron3.5-bolt-dflash:e4b and qwen3.8-dflash2:27b, but the test still expected them. It now expects config.json and dflash_weight.q4nx, as the catalog lists. The check itself is unchanged. The real core backend returns logits as wide as corelib's vocab_size, which equals config.json's for the shipped -core tags, so it does not trip there. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(core): ryzenai-corelib 0.103.0 Moves the core backend to ryzenai-corelib 0.103.0 (corelib main at 49a8ed3c). What changed in corelib 0.88 to 0.103 that reaches FastFlowLM: - Every entry point in FLM_CORELIB_FUNCTIONS keeps its signature, and model_metadata keeps its layout, so the only code change is the required version in corelib_api.hpp. - model_session_options: lora is gone (0.97: a session runs LoRA kernels when its model has an adapter set), and low_memory (0.96) and kv_cache_bits (0.98) are appended. FastFlowLM value-initialises the struct and sets only max_sequence_length, so the defaults hold: no LoRA, the embedding table mapped, a BF16 KV cache. - Additive only, as far as FastFlowLM's calls go: uint8 tensors, stream_set_low_memory, PQ2_0 weights, head_gate_bf16, hadamard_bf16, and NPU direct on AIE2P. FastFlowLM still refuses AIE2P. - Model libraries: qwen2, lfm2, lfm3, hyv3, glide, minicpm_ocr and minicpmv47 are new. The core build copies ryzenai_corelib_model_*.dll by glob, so they land beside flm.exe without a change; no -core tag uses them yet. - Not taken here: the 8-bit KV cache (kv_cache_bits 8, AIE4 NPU direct only) and low_memory sessions. Both are opt-in and would be separate changes. The docs' version checks and the required-version notes move to 0.103. On an AIE4 (Medusa) test machine, qwen3-core 0.6b/1.7b/4b/8b, phi4-mini-it-core:4b, qwen3.5-core 4b/9b and llama3.2-core:1b each load, report no fallback and answer correctly, at decode rates matching 0.87's. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(chat): Gemma4 and LFM2 tool grammars keep a string's minLength/maxLength The argument grammars FastFlowLM writes itself (Gemma4, LFM2) gave every string property the unbounded string rule, so a tool parameter with maxLength 20 took a whole sentence: test_tool_calls function_pattern_keeps_length_bounds failed on gemma4-it:e2b, Linux and Windows. normalize_schema had also folded the bounds into a pattern that only xgrammar's JSON schema reads. These grammars now read the schema as sent and spell bounds up to XGRAMMAR_REGEX_REPEAT_LIMIT: Gemma4 through counted gstr_<low>_<high> rules (a "<" step takes the next character too, so lengths stay exact and "<|" still cannot occur), LFM2 through a {low,high} repetition where an escape is one character. Array items keep their bounds too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): pad an unanchored pattern without ending the string; leave flags and inner anchors as sent Review follow-ups to the pattern rewrite: - The padding is now a class of what a JSON string holds unescaped, not ".*". xgrammar keeps '"', '\' and control characters out of a pattern's matches only when the pattern is printable ASCII; any other pattern compiles without that guard, where ".*" could close the string and add keys ("(é|x)" took x", "k": "y). The folded repetition after a lone class uses the same class. - A pattern opening with an inline flag such as "(?i)" is left as sent: padded, it no longer builds. - A pattern with an anchor inside a group, such as "(?:^abc)", is left as sent: xgrammar ignores an anchor in the middle, so padding would have let "xabc" through. - Each top-level alternative is padded on its own, so "^a|b" reads as "starts with a, or holds b" rather than "^(a|b).*". - normalize_schema no longer enters const, enum, default or examples, which are values, nor "not", whose meaning a rewrite would change. A property named like one of them is still a schema. - The comment on unsatisfiable bounds now says what happens: xgrammar ignores the bounds beside a pattern. The folded form's narrowing is noted. The live tests check for the expected word instead of a length above one, which a valid one-character answer would have failed. New checks in test_chat_tools cover each case through the grammar engine; on the previous code "^a|b" and the non-ASCII injection fail, and the inline-flag and inner-anchor patterns crash the harness. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: tawei-amd <tawei@amd.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/model_list.json: removesLICENSE/LICENSE.OpenMDW-1.1from thefileslists ofnemotron3.5-bolt-dflash:e4b,nemotron3.5-bolt-dflash-flash:e4band the Qwen3.8-27B-DFlash2 entry. These files aren't needed to load or run the model.filesdecides whatflm pulldownloads and what has to be on disk before a model counts as installed.src/model_info.json: removes 115 records for repo docs and metadata that no catalog entry downloads:.gitattributes,README*.md,LICENSE*, other*.md,MANIFEST.sha256,configuration.json, one.pngand onedemo.txt. Records are only looked up by name for files in a catalog entry'sfileslist, so these were never read.qwen3.8-dflash2:27bconfig.jsonrecord (oid and size) to the current upstream revision.A few keys that had hand-formatted brackets show up as whitespace-only changes after the file was rewritten.
.xclbin,bkmodel.q4nxandchat_template.jsonrecords are left in place. They aren't downloaded either, but they relate to the model rather than being repo docs.Testing
fileslist (includingpreferred_sourceoverlays andmodel_info_keymappings) still has amodel_info.jsonrecord, and every catalog key still has an entry..github/script/ci/test_changes.py: 16/17 pass.test_engine_paths(qwen3.8-dflash2) fails the same way onmain.Since nearly every
model_info.jsonkey changed, CI will likely run the NPU tests for most model families.🤖 Generated with Claude Code