Skip to content

Commit ad2c1d3

Browse files
committed
Updates
Signed-off-by: Ann Kuruvilla <[email protected]>
1 parent bb35f82 commit ad2c1d3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

QEfficient/base/modeling_qeff.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,17 @@ def _compile(
281281
if mdp_ts_json_path := compiler_options.pop("mdp_load_partition_config", None):
282282
command.append(f"-mdp-load-partition-config={mdp_ts_json_path}")
283283

284-
# Default node precision file added for AI-100
285-
config = getattr(self.model, "config", None)
286-
if config is None and hasattr(self.model, "model"):
287-
config = getattr(self.model.model, "config", None)
288-
if config and hasattr(config, "architectures") and "Gemma3ForConditionalGeneration" in config.architectures:
289-
compiler_options["node_precision_info"] = constants.DEFAULT_GEMMA3_NODE_PRECISION_INFO
284+
# Default node precision file added for Gemma3:AI-100
285+
if hasattr(self, "model"):
286+
config = getattr(self.model, "config", None)
287+
if config is None and hasattr(self.model, "model"):
288+
config = getattr(self.model.model, "config", None)
289+
if (
290+
config
291+
and hasattr(config, "architectures")
292+
and "Gemma3ForConditionalGeneration" in config.architectures
293+
):
294+
compiler_options["node_precision_info"] = constants.DEFAULT_GEMMA3_NODE_PRECISION_INFO
290295

291296
for key, value in compiler_options.items():
292297
option = "-" + key.replace("_", "-")

0 commit comments

Comments
 (0)