mirror alephllm 0.8.9 (same-session law): presets.py (v3 preset builder + registrations guarded for copies without the data stack; TrainConfig.phase_lr_scale/phase_seed_offset; Preset.data_scale/epoch_cap/rebalance_to), governor.py (raw_block: nested wrappers), alephlm.py (compile_hubs via raw_block). Gated: strict load of model.safetensors through the vendored path, logits parity 0.0 vs geolip.
Browse files79 unmodified lines80818283848517 unmodified lines1031041051061071081092 unmodified lines11211311411511611711879 unmodified linesreturn hitsdef _hub_addresses(attn):"""Every AlephAddress a hub carries (single- or multi-constellation)."""if hasattr(attn, "consts"):17 unmodified linesbooks: list[torch.nn.Parameter] = []if "hub" in include:for wrap in getattr(model, "blocks", []):blk = getattr(wrap, "block", wrap)if getattr(blk, "is_hub", False):books += [a.codebook for a in _hub_addresses(blk.attn)]if "head" in include and hasattr(model, "head"):2 unmodified linesbooks.append(addr.codebook)if "bank" in include:for wrap in getattr(model, "blocks", []):blk = getattr(wrap, "block", wrap)addr = getattr(getattr(blk, "bank", None), "addr", None)if isinstance(addr, AlephAddress):books.append(addr.codebook)79 unmodified lines808182838485868788899091929317 unmodified lines1111121131141151161172 unmodified lines12012112212312412512679 unmodified linesreturn hitsdef raw_block(wrap):"""The model's own Block under any depth of adapter wrappers (amoeBlockWithAdapter nests one wrapper per attached arm: .block.block...)."""while hasattr(wrap, "block"):wrap = wrap.blockreturn wrapdef _hub_addresses(attn):"""Every AlephAddress a hub carries (single- or multi-constellation)."""if hasattr(attn, "consts"):17 unmodified linesbooks: list[torch.nn.Parameter] = []if "hub" in include:for wrap in getattr(model, "blocks", []):blk = raw_block(wrap)if getattr(blk, "is_hub", False):books += [a.codebook for a in _hub_addresses(blk.attn)]if "head" in include and hasattr(model, "head"):2 unmodified linesbooks.append(addr.codebook)if "bank" in include:for wrap in getattr(model, "blocks", []):blk = raw_block(wrap)addr = getattr(getattr(blk, "bank", None), "addr", None)if isinstance(addr, AlephAddress):books.append(addr.codebook)
governor.py+10-2