Optimization model override metadata

85 views
Skip to first unread message

V. A.

unread,
Oct 15, 2025, 12:06:47 PMOct 15
to Chromium-dev
Hi everyone 
I'm trying to use local models for the phishing classifier using the command switch--optimization-guide-model-override=OPTIMIZATION_TARGET:path/to/model_file[ :base64_metadata ]

As we can see in components/optimization_guide/core/optimization_guide_switches.cc
the metadatas are optional, but when I run chromium with my model it is asking for them

Do you know what kind of metadata are needed ?


Daniel Rubery

unread,
Oct 16, 2025, 1:10:52 PMOct 16
to Chromium-dev, V. A.
The metadata format is per-target, so there's no one answer to your question. But since you mention the phishing classifier, I can point you here, which is where that target processes the metadata. It needs to be a ClientSidePhishingModelMetadata (with the Any wrapping, serialization, etc), and you can read the nearby code to understand the semantics.

I'll also note that the phishing classifier seems to have its own override flag (source). I'm not sure which will be more usable for you, but it might be interesting to look at.

V. A.

unread,
Oct 20, 2025, 11:20:04 AMOct 20
to Chromium-dev, Daniel Rubery, V. A.
thank you 

from what I see the  kOverrideCsdModelFlag[] = "csd-model-override-path" is used only for tests

so the only option to run a local model from the other command switch
Reply all
Reply to author
Forward
0 new messages