From 08876e6a228cf3c7a6d8046f75d19294c6a6c78c Mon Sep 17 00:00:00 2001 From: zaneni6 Date: Thu, 12 Nov 2026 14:11:29 -0700 Subject: [PATCH 1/3] fix(gemma4): current Gemma 4 chat template for E2B/E4B; 400 for non-object tool arguments (#975) Template: gemma4-it:e2b/e4b and gemma4e-flash:e2b/e4b now pin chat_template.jinja oid 9d494178d6f050c786d4b6fa70a0e1a24fac4ae6 (18454 bytes): Google's current Gemma 4 template (null arguments render as null, turn closing around tool calls, reasoning kept after the last user message, image_url/input_audio parts) without the line that opens a thought channel after a tool response. The server drops reasoning from history, so a prompt ending in "<|channel>thought\n" is never a prefix of the next request and every agent-loop step would prefill the whole conversation again; 12B already ships without that line for the same reason. The file has to be uploaded to FastFlowLM/Gemma4-E2B-IT-NPU2 and Gemma4-E4B-IT-NPU2 before this merges. Tool arguments: the template refuses arguments that are not an object or null. gemma4_template_messages (shared by Gemma4e and Gemma4_12B) now turns those into HTTP 400 naming the call, not a 500 from minja. The gemma4-open extension test frontend maps empty-string arguments to {}, as Gemma4e does. Co-Authored-By: Claude --- src/common/AutoModel/modeling_gemma4_12b.cpp | 25 ++++----------- src/common/AutoModel/modeling_gemma4e.cpp | 25 ++++----------- src/common/chat/chat_gemma4_tools.cpp | 26 ++++++++++++++++ src/include/chat/chat_gemma4_tools.hpp | 6 ++++ src/model_info.json | 16 +++++----- src/test/chat_tools/test_chat_tools.cpp | 31 +++++++++++++++++++ .../gemma4_open_frontend.cpp | 5 +++ 7 files changed, 88 insertions(+), 46 deletions(-) diff --git a/src/common/AutoModel/modeling_gemma4_12b.cpp b/src/common/AutoModel/modeling_gemma4_12b.cpp index 92928121e..24525b47c 100644 --- a/src/common/AutoModel/modeling_gemma4_12b.cpp +++ b/src/common/AutoModel/modeling_gemma4_12b.cpp @@ -86,25 +86,12 @@ std::string Gemma4_12B::apply_chat_template(nlohmann::ordered_json& messages, nl opt.polyfill_tool_responses = false; opt.polyfill_object_arguments = false; - // The template raises if tool_calls[].function.arguments is a string, but OpenAI-style - // clients send it serialized. Deserialize it here (what polyfill_object_arguments would do). - nlohmann::ordered_json normalized = messages; - for (auto& message : normalized) { - if (!message.is_object() || !message.contains("tool_calls")) continue; - for (auto& tool_call : message["tool_calls"]) { - if (!tool_call.is_object() || !tool_call.contains("function")) continue; - auto& function = tool_call["function"]; - if (!function.is_object() || !function.contains("arguments")) continue; - auto& arguments = function["arguments"]; - if (!arguments.is_string()) continue; - auto raw = arguments.get(); - if (raw.empty()) { - arguments = nlohmann::ordered_json::object(); - continue; - } - auto parsed = nlohmann::ordered_json::parse(raw, nullptr, /* allow_exceptions= */ false); - if (parsed.is_object()) arguments = parsed; - } + // OpenAI-style clients send tool call arguments serialized; the template renders only an object + nlohmann::ordered_json normalized; + try { + normalized = gemma4_template_messages(messages); + } catch (const std::invalid_argument& e) { + throw ModelRequestError(400, false, e.what(), "invalid_request_error"); } minja::chat_template_inputs inputs; diff --git a/src/common/AutoModel/modeling_gemma4e.cpp b/src/common/AutoModel/modeling_gemma4e.cpp index 2ae272921..3af8d03f1 100644 --- a/src/common/AutoModel/modeling_gemma4e.cpp +++ b/src/common/AutoModel/modeling_gemma4e.cpp @@ -317,25 +317,12 @@ std::string Gemma4e::apply_chat_template(nlohmann::ordered_json& messages, nlohm opt.polyfill_tool_responses = false; opt.polyfill_object_arguments = false; - // The template raises if tool_calls[].function.arguments is a string, but OpenAI-style clients send it - // serialized. Deserialize it here (what polyfill_object_arguments would do). - nlohmann::ordered_json normalized = messages; - for (auto& message : normalized) { - if (!message.is_object() || !message.contains("tool_calls")) continue; - for (auto& tool_call : message["tool_calls"]) { - if (!tool_call.is_object() || !tool_call.contains("function")) continue; - auto& function = tool_call["function"]; - if (!function.is_object() || !function.contains("arguments")) continue; - auto& arguments = function["arguments"]; - if (!arguments.is_string()) continue; - auto raw = arguments.get(); - if (raw.empty()) { - arguments = nlohmann::ordered_json::object(); - continue; - } - auto parsed = nlohmann::ordered_json::parse(raw, nullptr, /* allow_exceptions= */ false); - if (parsed.is_object()) arguments = parsed; - } + // OpenAI-style clients send tool call arguments serialized; the template renders only an object + nlohmann::ordered_json normalized; + try { + normalized = gemma4_template_messages(messages); + } catch (const std::invalid_argument& e) { + throw ModelRequestError(400, false, e.what(), "invalid_request_error"); } minja::chat_template_inputs inputs; diff --git a/src/common/chat/chat_gemma4_tools.cpp b/src/common/chat/chat_gemma4_tools.cpp index 52fa6ee5a..52734e672 100644 --- a/src/common/chat/chat_gemma4_tools.cpp +++ b/src/common/chat/chat_gemma4_tools.cpp @@ -1,6 +1,8 @@ /// \file chat_gemma4_tools.cpp /// \brief Prepare a request's tools for the Gemma4 chat template #include "chat/chat_gemma4_tools.hpp" +#include +#include namespace { /// \brief Rewrite the nullable types in a JSON schema and in the schemas it holds @@ -40,3 +42,27 @@ nlohmann::ordered_json gemma4_template_tools(nlohmann::ordered_json tools) { } return tools; } + +nlohmann::ordered_json gemma4_template_messages(nlohmann::ordered_json messages) { + for (auto& message : messages) { + if (!message.is_object() || !message.contains("tool_calls") || !message["tool_calls"].is_array()) continue; + for (auto& tool_call : message["tool_calls"]) { + if (!tool_call.is_object() || !tool_call.contains("function")) continue; + auto& function = tool_call["function"]; + if (!function.is_object() || !function.contains("arguments")) continue; + auto& arguments = function["arguments"]; + if (arguments.is_string()) { + const auto raw = arguments.get(); + arguments = raw.empty() ? nlohmann::ordered_json::object() + : nlohmann::ordered_json::parse(raw, nullptr, /* allow_exceptions= */ false); + } + if (!arguments.is_object() && !arguments.is_null()) { + const auto name = function.value("name", nlohmann::ordered_json()).is_string() + ? function["name"].get() : std::string("?"); + throw std::invalid_argument("tool_calls[].function.arguments of the call to \"" + name + + "\" must be a JSON object"); + } + } + } + return messages; +} diff --git a/src/include/chat/chat_gemma4_tools.hpp b/src/include/chat/chat_gemma4_tools.hpp index 0eff4ecdd..86a64a522 100644 --- a/src/include/chat/chat_gemma4_tools.hpp +++ b/src/include/chat/chat_gemma4_tools.hpp @@ -10,3 +10,9 @@ /// a single nullable parameter would fail the whole request. A type that still lists /// more than one type after dropping "null" is left as it is. nlohmann::ordered_json gemma4_template_tools(nlohmann::ordered_json tools); + +/// \brief The messages with every tool call's arguments as the JSON object the template renders +/// \note OpenAI-style clients send arguments serialized; an empty string is no arguments ({}). +/// The template refuses any arguments that are not an object or null, so those throw +/// std::invalid_argument, naming the call, instead of failing in the template. +nlohmann::ordered_json gemma4_template_messages(nlohmann::ordered_json messages); diff --git a/src/model_info.json b/src/model_info.json index ad13c60c0..824e221e4 100644 --- a/src/model_info.json +++ b/src/model_info.json @@ -296,8 +296,8 @@ }, { "type": "file", - "oid": "c19999a347da729cf62806a8ddb7eb8e315223b5", - "size": 17336, + "oid": "9d494178d6f050c786d4b6fa70a0e1a24fac4ae6", + "size": 18454, "path": "chat_template.jinja" }, { @@ -370,8 +370,8 @@ }, { "type": "file", - "oid": "c19999a347da729cf62806a8ddb7eb8e315223b5", - "size": 17336, + "oid": "9d494178d6f050c786d4b6fa70a0e1a24fac4ae6", + "size": 18454, "path": "chat_template.jinja" }, { @@ -444,8 +444,8 @@ }, { "type": "file", - "oid": "c19999a347da729cf62806a8ddb7eb8e315223b5", - "size": 17336, + "oid": "9d494178d6f050c786d4b6fa70a0e1a24fac4ae6", + "size": 18454, "path": "chat_template.jinja" }, { @@ -518,8 +518,8 @@ }, { "type": "file", - "oid": "c19999a347da729cf62806a8ddb7eb8e315223b5", - "size": 17336, + "oid": "9d494178d6f050c786d4b6fa70a0e1a24fac4ae6", + "size": 18454, "path": "chat_template.jinja" }, { diff --git a/src/test/chat_tools/test_chat_tools.cpp b/src/test/chat_tools/test_chat_tools.cpp index 678d1a275..5874be10e 100644 --- a/src/test/chat_tools/test_chat_tools.cpp +++ b/src/test/chat_tools/test_chat_tools.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -2035,6 +2036,35 @@ void test_penalty_free_spans() { CHECK(!token_ban_constraint(64, {7}).penalty_free()); } +// Tool call arguments for the Gemma4 templates, which render only an object (or null) +void test_gemma4_template_messages() { + std::printf("gemma4 template gets tool call arguments as an object, or a reason it cannot\n"); + auto call = [](json arguments) { + return json::array({{{"role", "user"}, {"content", "hi"}}, + {{"role", "assistant"}, {"content", ""}, + {"tool_calls", json::array({{{"type", "function"}, + {"function", {{"name", "f"}, {"arguments", arguments}}}}})}}}); + }; + auto arguments = [](const json& messages) { return messages[1]["tool_calls"][0]["function"]["arguments"]; }; + CHECK(arguments(gemma4_template_messages(call("{\"a\":null,\"b\":{\"c\":1}}"))) == + (json{{"a", nullptr}, {"b", {{"c", 1}}}})); + CHECK(arguments(gemma4_template_messages(call(""))) == json::object()); + CHECK(arguments(gemma4_template_messages(call(json{{"a", 1}}))) == (json{{"a", 1}})); + CHECK(arguments(gemma4_template_messages(call(nullptr))).is_null()); + // messages without calls are left as they are + const json plain = json::array({{{"role", "user"}, {"content", "hi"}}}); + CHECK(gemma4_template_messages(plain) == plain); + for (const json bad : {json("oops"), json("[1]"), json("5"), json("{\"a\":1} trailing"), json::array({1}), json(5)}) { + bool threw = false; + try { + gemma4_template_messages(call(bad)); + } catch (const std::invalid_argument& e) { + threw = std::string(e.what()).find("\"f\"") != std::string::npos; + } + CHECK(threw); + } +} + } // namespace int main() { @@ -2073,6 +2103,7 @@ int main() { test_minicpm_template(); test_inkling(); test_penalty_free_spans(); + test_gemma4_template_messages(); if (failures) { std::printf("%d check(s) failed\n", failures); return 1; diff --git a/src/test/model_extension_gemma4e/gemma4_open_frontend.cpp b/src/test/model_extension_gemma4e/gemma4_open_frontend.cpp index a5193a3fa..f0c5f938e 100644 --- a/src/test/model_extension_gemma4e/gemma4_open_frontend.cpp +++ b/src/test/model_extension_gemma4e/gemma4_open_frontend.cpp @@ -442,6 +442,11 @@ class Frontend { !call["function"].contains("arguments")) continue; auto& arguments = call["function"]["arguments"]; if (!arguments.is_string()) continue; + // an empty string is a call without arguments, as in Gemma4e + if (arguments.get().empty()) { + arguments = json::object(); + continue; + } const auto parsed = json::parse( arguments.get(), nullptr, false); if (parsed.is_object()) arguments = parsed; From 44a7e190dc957628fdac181c5cebefe53d3546fe Mon Sep 17 00:00:00 2001 From: zaneni6 Date: Sat, 5 Dec 2026 22:04:32 -0700 Subject: [PATCH 2/3] fix(gemma4): E2B/E4B config.json flm_version 1.0.15 so existing installs refresh the template (#975) The new chat template only reached fresh pulls: an installed E2B/E4B package stays Ready while its config.json is current, and keeps the old template. Their Hugging Face config.json now says flm_version 1.0.15 (E2B git oid a2222087, E4B git oid e504aebc; sizes unchanged), so: - src/model_info.json: the new config.json oid for gemma4-it:e2b/e4b and gemma4e-flash:e2b/e4b, which share the two packages; - src/model_list.json: flm_min_version 1.0.15 for the same four tags. An older download is then Outdated: run/serve/pull re-check every file, remove the template and config.json that no longer match, and download those two again. The weights are kept. Until the files are on Hugging Face, fresh pulls of these four tags fail the hash check. Co-Authored-By: Claude --- src/model_info.json | 8 ++++---- src/model_list.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/model_info.json b/src/model_info.json index 824e221e4..d5986c35a 100644 --- a/src/model_info.json +++ b/src/model_info.json @@ -302,7 +302,7 @@ }, { "type": "file", - "oid": "51a20dbc7844107d06280c51882dbad273f1a9c4", + "oid": "a2222087e803782a01c982c2419f96b5754a2cf9", "size": 7528, "path": "config.json" }, @@ -376,7 +376,7 @@ }, { "type": "file", - "oid": "07a6fb2f7c407853d83725b513ab1fc2d165e6a5", + "oid": "e504aebcb59eae9e583cc95b419d6d7ccdd5a90a", "size": 7229, "path": "config.json" }, @@ -450,7 +450,7 @@ }, { "type": "file", - "oid": "51a20dbc7844107d06280c51882dbad273f1a9c4", + "oid": "a2222087e803782a01c982c2419f96b5754a2cf9", "size": 7528, "path": "config.json" }, @@ -524,7 +524,7 @@ }, { "type": "file", - "oid": "07a6fb2f7c407853d83725b513ab1fc2d165e6a5", + "oid": "e504aebcb59eae9e583cc95b419d6d7ccdd5a90a", "size": 7229, "path": "config.json" }, diff --git a/src/model_list.json b/src/model_list.json index 235b1dca7..5d2d4a85e 100644 --- a/src/model_list.json +++ b/src/model_list.json @@ -364,7 +364,7 @@ "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/main", "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2", "size": 2000000000, - "flm_min_version": "0.9.43", + "flm_min_version": "1.0.15", "files": [ "config.json", "model.q4nx", @@ -403,7 +403,7 @@ "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E4B-IT-NPU2/tree/main", "ms_url": "https://modelscope.cn/models/amd/Gemma4-E4B-IT-NPU2", "size": 4000000000, - "flm_min_version": "0.9.43", + "flm_min_version": "1.0.15", "files": [ "config.json", "model.q4nx", @@ -595,7 +595,7 @@ "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/main", "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2", "size": 2000000000, - "flm_min_version": "0.9.43", + "flm_min_version": "1.0.15", "files": [ "config.json", "model.q4nx", @@ -633,7 +633,7 @@ "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E4B-IT-NPU2/tree/main", "ms_url": "https://modelscope.cn/models/amd/Gemma4-E4B-IT-NPU2", "size": 4000000000, - "flm_min_version": "0.9.43", + "flm_min_version": "1.0.15", "files": [ "config.json", "model.q4nx", From 676505d771279b4018584ceb05716d10f8806cb9 Mon Sep 17 00:00:00 2001 From: zaneni6 Date: Sun, 6 Dec 2026 12:51:35 -0700 Subject: [PATCH 3/3] fix(gemma4): pull E2B/E4B from the flm_1.0.15 branch; Google's tokenizer fix (#975, #1057) The new chat template and the 1.0.15 config.json are on a new branch, flm_1.0.15, of FastFlowLM/Gemma4-E2B-IT-NPU2 and Gemma4-E4B-IT-NPU2, not on main. Released FLM versions keep pulling main and its hashes keep matching; this version pulls the branch. The branch also carries Google's fixed tokenizer.json for each model (google/gemma-4-E2B-it 4adf1574, google/gemma-4-E4B-it 4ecc2ba6: glitch-token merges pruned, vocabulary and ids unchanged; #1057). The NPU packages shipped Google's pre-fix tokenizer (sha256 cc8d3a0c). - src/model_list.json: url, file_url and ms_url of gemma4-it:e2b/e4b and gemma4e-flash:e2b/e4b point at flm_1.0.15; - src/model_info.json: the tokenizer.json records of those four tags, as the branch's tree API lists them. Every record of the four tags now equals the branch; - src/test/model_extension_gemma4e/model-list.json: gemma4-open-it:e2b reads gemma4-it:e2b's records, so it points at the branch with flm_min_version 1.0.15 too. Until amd/Gemma4-E2B-IT-NPU2 and amd/Gemma4-E4B-IT-NPU2 on ModelScope have the same branch, --modelscope pulls of these tags fail. Co-Authored-By: Claude --- src/model_info.json | 40 +++++++++---------- src/model_list.json | 24 +++++------ .../model_extension_gemma4e/model-list.json | 8 ++-- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/model_info.json b/src/model_info.json index d5986c35a..8c5b81144 100644 --- a/src/model_info.json +++ b/src/model_info.json @@ -320,14 +320,14 @@ }, { "type": "file", - "oid": "1ff9f3e3439a939b971f9919e821bf87e835a503", - "size": 32169626, + "oid": "423b777a1620a1e582e0843d01b86d1d1c698965", + "size": 32155733, "lfs": { - "oid": "cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f", - "size": 32169626, + "oid": "ab26b2add729e6f645bd869f228f14190a06615538f3be6f7786f33d13d78ad2", + "size": 32155733, "pointerSize": 133 }, - "xetHash": "c62336ad134cad6f154d84eb0e5a5fa9ca17cd665ef3ba5ac4fd02b1486760b4", + "xetHash": "d3e2cbf0094f678aa49dbe05422fc1e70302e85a138fe38163a6a8683c169265", "path": "tokenizer.json" }, { @@ -394,14 +394,14 @@ }, { "type": "file", - "oid": "1ff9f3e3439a939b971f9919e821bf87e835a503", - "size": 32169626, + "oid": "0e3703ae5fe4459202ad171ccb127b4fcfb7f275", + "size": 32156428, "lfs": { - "oid": "cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f", - "size": 32169626, + "oid": "91d9cf86906f78e197021fda88214d448e5c120665d0243a8e776e046986c6bc", + "size": 32156428, "pointerSize": 133 }, - "xetHash": "c62336ad134cad6f154d84eb0e5a5fa9ca17cd665ef3ba5ac4fd02b1486760b4", + "xetHash": "521d9f0390742dc5890fc5f92931dae9bdda70191dd92fd0f551fae33d8ded1c", "path": "tokenizer.json" }, { @@ -468,14 +468,14 @@ }, { "type": "file", - "oid": "1ff9f3e3439a939b971f9919e821bf87e835a503", - "size": 32169626, + "oid": "423b777a1620a1e582e0843d01b86d1d1c698965", + "size": 32155733, "lfs": { - "oid": "cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f", - "size": 32169626, + "oid": "ab26b2add729e6f645bd869f228f14190a06615538f3be6f7786f33d13d78ad2", + "size": 32155733, "pointerSize": 133 }, - "xetHash": "c62336ad134cad6f154d84eb0e5a5fa9ca17cd665ef3ba5ac4fd02b1486760b4", + "xetHash": "d3e2cbf0094f678aa49dbe05422fc1e70302e85a138fe38163a6a8683c169265", "path": "tokenizer.json" }, { @@ -542,14 +542,14 @@ }, { "type": "file", - "oid": "1ff9f3e3439a939b971f9919e821bf87e835a503", - "size": 32169626, + "oid": "0e3703ae5fe4459202ad171ccb127b4fcfb7f275", + "size": 32156428, "lfs": { - "oid": "cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f", - "size": 32169626, + "oid": "91d9cf86906f78e197021fda88214d448e5c120665d0243a8e776e046986c6bc", + "size": 32156428, "pointerSize": 133 }, - "xetHash": "c62336ad134cad6f154d84eb0e5a5fa9ca17cd665ef3ba5ac4fd02b1486760b4", + "xetHash": "521d9f0390742dc5890fc5f92931dae9bdda70191dd92fd0f551fae33d8ded1c", "path": "tokenizer.json" }, { diff --git a/src/model_list.json b/src/model_list.json index 5d2d4a85e..3c1a86bcd 100644 --- a/src/model_list.json +++ b/src/model_list.json @@ -360,9 +360,9 @@ "tools": true, "supported_platforms": ["aie2p"], "name": "Gemma4-E2B-IT-NPU2", - "url": "https://huggingface.co/FastFlowLM/Gemma4-E2B-IT-NPU2", - "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/main", - "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2", + "url": "https://huggingface.co/FastFlowLM/Gemma4-E2B-IT-NPU2/resolve/flm_1.0.15", + "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/flm_1.0.15", + "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2/resolve/flm_1.0.15", "size": 2000000000, "flm_min_version": "1.0.15", "files": [ @@ -399,9 +399,9 @@ "tools": true, "supported_platforms": ["aie2p"], "name": "Gemma4-E4B-IT-NPU2", - "url": "https://huggingface.co/FastFlowLM/Gemma4-E4B-IT-NPU2", - "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E4B-IT-NPU2/tree/main", - "ms_url": "https://modelscope.cn/models/amd/Gemma4-E4B-IT-NPU2", + "url": "https://huggingface.co/FastFlowLM/Gemma4-E4B-IT-NPU2/resolve/flm_1.0.15", + "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E4B-IT-NPU2/tree/flm_1.0.15", + "ms_url": "https://modelscope.cn/models/amd/Gemma4-E4B-IT-NPU2/resolve/flm_1.0.15", "size": 4000000000, "flm_min_version": "1.0.15", "files": [ @@ -591,9 +591,9 @@ "e2b": { "supported_platforms": ["aie2p"], "name": "Gemma4-E2B-IT-NPU2", - "url": "https://huggingface.co/FastFlowLM/Gemma4-E2B-IT-NPU2", - "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/main", - "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2", + "url": "https://huggingface.co/FastFlowLM/Gemma4-E2B-IT-NPU2/resolve/flm_1.0.15", + "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/flm_1.0.15", + "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2/resolve/flm_1.0.15", "size": 2000000000, "flm_min_version": "1.0.15", "files": [ @@ -629,9 +629,9 @@ "e4b": { "supported_platforms": ["aie2p"], "name": "Gemma4-E4B-IT-NPU2", - "url": "https://huggingface.co/FastFlowLM/Gemma4-E4B-IT-NPU2", - "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E4B-IT-NPU2/tree/main", - "ms_url": "https://modelscope.cn/models/amd/Gemma4-E4B-IT-NPU2", + "url": "https://huggingface.co/FastFlowLM/Gemma4-E4B-IT-NPU2/resolve/flm_1.0.15", + "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E4B-IT-NPU2/tree/flm_1.0.15", + "ms_url": "https://modelscope.cn/models/amd/Gemma4-E4B-IT-NPU2/resolve/flm_1.0.15", "size": 4000000000, "flm_min_version": "1.0.15", "files": [ diff --git a/src/test/model_extension_gemma4e/model-list.json b/src/test/model_extension_gemma4e/model-list.json index 3cf95799f..2772b01a2 100644 --- a/src/test/model_extension_gemma4e/model-list.json +++ b/src/test/model_extension_gemma4e/model-list.json @@ -5,12 +5,12 @@ "e2b": { "supported_platforms": ["aie2p"], "name": "Gemma4-Open-E2B-IT-NPU2", - "url": "https://huggingface.co/FastFlowLM/Gemma4-E2B-IT-NPU2", - "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/main", + "url": "https://huggingface.co/FastFlowLM/Gemma4-E2B-IT-NPU2/resolve/flm_1.0.15", + "file_url": "https://huggingface.co/api/models/FastFlowLM/Gemma4-E2B-IT-NPU2/tree/flm_1.0.15", "model_info_key": "gemma4-it:e2b", - "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2", + "ms_url": "https://modelscope.cn/models/amd/Gemma4-E2B-IT-NPU2/resolve/flm_1.0.15", "size": 2000000000, - "flm_min_version": "0.9.43", + "flm_min_version": "1.0.15", "files": [ "config.json", "model.q4nx",