Verify PR #2078 builder design changes already present#359
Conversation
|
@copilot there were some design changes requested on the PR linked in the title, can you bring them? |
I re-audited the full diff of PR #2078 against I can't access the PR's review threads (SAML protects the microsoft org from my token), so I may be missing a reviewer-requested change that didn't make it into the final diff. Could you point me at the specific design change you'd like brought over (a thread link, file/line, or short description)? Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Task: port the design changes (not new models) from onnxruntime-genai#2078 under
src/python/py/models/builders/intomodelbuilder/builders/.After a line-by-line audit of the PR diff against the current tree, every design change is already incorporated. No code modifications are needed.
Items verified as present
builders/__init__.py— only re-exportsModel; model classes are lazy-imported inbuilder.py.base.py_rope_theta_from_config,_make_search_section,make_neg.make_reshape/make_concat/make_add/make_mul/make_transpose/make_softmaxreturn their output name;make_reshapeaccepts an inline list shape;make_sliceacceptsstarts=/ends=/axes=kwargs.epsilon = getattr(config, "rms_norm_eps", getattr(config, "layer_norm_eps", 1e-6)).compression_ratiorope rescale lifted fromernie.pyinto base.make_rope_inithonorsrope_thetainsiderope_scaling, falls back fromtypetorope_type, threads thetruncateflag.make_mscale_yarn(mscale, alpha=1.0)andtruncatefloor/ceil inmake_inv_freq_rescaled_with_ntk.("cpu", FLOAT16).make_attention_input_projinitializesq_path/k_path/v_path;make_repeat_kvshapes usetotal_sequence_length.cache_dircleanup guarded byos.path.exists;except Exception as e: print(...)inmake_genai_config.gemma.py—Gemma3Modelrecords_original_architecture, reads RoPE fromrope_parameters(v5+ transformers), and overridesload_weightsforGemma3ForConditionalGeneration.gptoss.py—inv_freq = 1.0 / (theta ** ...)correction;gate_up_proj/down_projtransposed before initializer (is_transposed layout);swiglu_limit is Noneguards; post-MoE cast back toio_dtype.nemotron.py—NemotronModelpicks upconfig.norm_epswhen present.olmo.py—OLMo2Model(post-norm, full-D q/k norm) andOLMo3Model(per-layer sliding window vialayer_types).smollm.py— saves/restoresattention_attrs["rope"];use_rope_in_attn = has_rope and original_use_rope.ernie.py— redundantcompression_ratioblock removed (handled in base).mistral.py/qwen.py— top-leveltransformersimports trimmed;Mistral3ForConditionalGeneration,Qwen2_5_VLForConditionalGeneration,Qwen3VLForConditionalGeneration,Qwen3_5ForConditionalGenerationare lazy-imported insideload_weights.New model classes from the PR (
HunyuanDenseV1Model,LFM2Model) are intentionally excluded per the issue.Verification