Skip to content

Use float64 for SevenNet energy rescaling by default - #326

Merged
alphalm4 merged 5 commits into
MDIL-SNU:mainfrom
alphalm4:mixed
Jul 21, 2026
Merged

Use float64 for SevenNet energy rescaling by default#326
alphalm4 merged 5 commits into
MDIL-SNU:mainfrom
alphalm4:mixed

Conversation

@alphalm4

Copy link
Copy Markdown
Contributor

I left the single precision option for backward compatibility.

alphalm4 and others added 5 commits July 16, 2026 21:11
The single-precision rescale path is a rarely-used backward-compat escape
hatch, so threading a shift_scale_dtype argument through the calculator,
checkpoint, deploy, mliap, torchsim, and CLI layers was excessive. Read the
dtype from the SEVENN_SHIFT_SCALE_DTYPE env var at the single point where the
shift/scale parameters are created (sevenn/nn/scale.py), matching the existing
SEVENN_DEBUG-style toggles.

Reverts the argument plumbing in _const, _keys, checkpoint, mliap, model_build,
sevenn_get_model, and util (now identical to base). Keeps the behavioral
changes: double-precision rescale forward casts, C++ energy in double, torchsim
output casts, D3 output float32 cast, and loss dtype alignment. deploy still
records the resolved dtype in metadata via resolve_shift_scale_dtype().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@YutackPark

Copy link
Copy Markdown
Member

LGTM🔥

@alphalm4
alphalm4 merged commit 1fb3a51 into MDIL-SNU:main Jul 21, 2026
4 checks passed
@alphalm4
alphalm4 deleted the mixed branch July 21, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants