diff --git a/docs/consensus_mergers.md b/docs/consensus_mergers.md index 807d885..57a9c27 100644 --- a/docs/consensus_mergers.md +++ b/docs/consensus_mergers.md @@ -23,7 +23,9 @@ alignment reference. `baseline` is the default. The standard clarity, smooth, varied, and diversity presets are joined by `power_blend` and the DSC presets demonstrated by the CWB conditioning implementation. Select `custom` to make every manual CWB control -authoritative. +authoritative. Every named merger preset keeps `global_scale` at `1.0`; scaling +persisted model or LoRA weights is only performed when explicitly selected in +the custom controls. Similarity alignment greedily matches source rows to the reference by cosine similarity. Index alignment keeps absolute row positions. Position weight can diff --git a/nodes/consensus_merger.py b/nodes/consensus_merger.py index e1b3a28..759e7f3 100644 --- a/nodes/consensus_merger.py +++ b/nodes/consensus_merger.py @@ -72,17 +72,17 @@ CWB_PRESETS = { "varied_merge": { "consensus_type": "median", "power_alpha": 2.0, "similarity_threshold": 0.0, "diversity_beta": 0.0, - "rescale_norm": True, "global_scale": 0.7, + "rescale_norm": True, "global_scale": 1.0, }, "diverse_concept": { "consensus_type": "median", "power_alpha": 2.0, "similarity_threshold": 0.0, "diversity_beta": 1.0, - "rescale_norm": True, "global_scale": 0.7, + "rescale_norm": True, "global_scale": 1.0, }, "high_diversity_concept": { "consensus_type": "median", "power_alpha": 2.0, "similarity_threshold": 0.0, "diversity_beta": 2.0, - "rescale_norm": True, "global_scale": 0.7, + "rescale_norm": True, "global_scale": 1.0, }, "dsc_baseline": { "consensus_type": "median", "power_alpha": 2.0, @@ -105,19 +105,19 @@ CWB_PRESETS = { "dsc_varied_merge": { "consensus_type": "median", "power_alpha": 2.5, "similarity_threshold": 0.0, "diversity_beta": 0.0, - "rescale_norm": True, "global_scale": 0.7, + "rescale_norm": True, "global_scale": 1.0, "dynamic_similarity_contrast": True, "soft_comfort_bandpass": True, }, "dsc_diverse_concept": { "consensus_type": "median", "power_alpha": 2.0, "similarity_threshold": 0.0, "diversity_beta": 1.5, - "rescale_norm": True, "global_scale": 0.7, + "rescale_norm": True, "global_scale": 1.0, "dynamic_similarity_contrast": True, "soft_comfort_bandpass": True, }, "dsc_high_diversity_concept": { "consensus_type": "median", "power_alpha": 2.0, "similarity_threshold": 0.0, "diversity_beta": 3.0, - "rescale_norm": True, "global_scale": 0.7, + "rescale_norm": True, "global_scale": 1.0, "dynamic_similarity_contrast": True, "soft_comfort_bandpass": True, }, } diff --git a/tests/test_consensus_merger.py b/tests/test_consensus_merger.py index ef9334b..a893c43 100644 --- a/tests/test_consensus_merger.py +++ b/tests/test_consensus_merger.py @@ -69,6 +69,11 @@ def _params(output_filename, **overrides): def test_preset_resolution_matches_extended_contract(cwb): + assert all( + preset["global_scale"] == pytest.approx(1.0) + for preset in cwb.CWB_PRESETS.values() + ) + power = cwb.resolve_cwb_settings(cwb_preset="power_blend") assert power.consensus_type == "median" assert power.alignment_threshold == pytest.approx(0.9)