v0.3.0
Expands the output-control category from four methods to fourteen, factored onto a shared component library, and reworks the generation contract shared across all categories.
New methods
Ten new output-control methods, alongside a shared _common component library that they and the four existing methods (DeAL, RAD, SASA, ThinkingIntervention) are now built on:
best_of_n: Best-of-N sampling; draw N continuations and keep the highest-scoring onbudget_forcing: Test-time control of reasoning length by capping, shortening, or extending the thinking phase (s1)contrastive_decoding: Contrast a base "expert" against a weaker "amateur" LM, favorcontrastive_guidance: Config-based contrastive mixing of next-token distributions (umbrella for DExperts, contrastive decoding, proxy-tuning, CFG)dexperts: Reweight logits with a small expert and anti-expert LMphased_decoding: Config-based phase-shape driver splicing forced and generated segments into one streamrouted_decoding: Route each prompt to a response strategy (respond / prefix / generisionssearch_decoding: Config-based segment-shape driver (propose, score, keep, iterate; umbrella for best-of-N, self-consistency, DeAL)stopping_rules: Substring, token, and budget stopping criteria as configurationvalue_guidance: Config-based value-guided decoding; score candidate tokens with a value function and shift their logits (umbrella for FUDGE, ARGS, RAD, SASA)
Breaking changes
- Output-control API restructured.
OutputControl.generate()is removed; controls now contribute composableget_logits_processors()andget_stopping_criteria()stacks, and controls that own the decoloop subclass the newDecodingDriver(withdecode()).NoOutputControlis removed;ultHFGenerateDriver(#20) Outputmoved fromaisteer360/algorithms/core/types.py(now deleted) toaisteer360/algorithms/core/output.py, and re-exported fromaisteer360.algorithms.core. Theruntime_kwargsandmetadatafields are removed;finish_reasonis now one of"eos","length", or NoneSteeringPipeline.generate()dispatches on explicit keyword source (text=,messages=,input_ids=); the positional argument is text-only. Positional chat/tensor input now raises,input_ids=is tokens-only, andattention_maskis valid only withinput_ids=- Pipeline control attributes are now plural lists (
input_controls,structural_controls,state_controls,output_controls); the singular attributes and the deprecatedstate_controlproperty are removed. Every category now admits multiple controls in list order, except that at mostDriver` is allowed LabeledExamples,ContrastivePairs, and contrastive rendering consolidated into a newaisteer360/algorithms/core/internals/package; control constructors consolidated into a shared
aisteer360/algorithms/core/base_control.py- Method auto-discovery now raises
RegistryErroron internal import failures, malformedSTEERING_METHODexports, and duplicate method names within a category (previously skipped silently) - Evaluation helpers
chat_generate_model()andchat_generate_pipeline()return(te_retry_generate()gainsreturn_outputs;plot_tradeoff_with_paretoremoved fromaisteer360.evaluation.utils - Packaging:
mergekit,econml,matplotlib, andseabornmoved out of core dependpo,plots, andallextras;gdowndropped;[tool.uv] override-dependencies`removed
What's Changed
- Output control refactor and control consolidation by @emiehling in #20 and #21
Full Changelog: v0.2.0...v0.3.0