Feat: Add option to attach BEC head to penultimate layer#4
Conversation
Adds `train_bec_from` configuration (defaulting to 'last', with option 'penultimate'). When set to 'penultimate', the final convolution layer avoids computing expensive tensor features (`lmax>0`), improving efficiency while still extracting required features for the Born Effective Charge head. Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Adds `train_bec_from` configuration (defaulting to 'last', with option 'penultimate'). When set to 'penultimate', the final convolution layer avoids computing expensive tensor features (`lmax>0`), improving efficiency while still extracting required features for the Born Effective Charge head. Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
Adds `train_bec_from` configuration (defaulting to 'last', with option 'penultimate'). When set to 'penultimate', the final convolution layer avoids computing expensive tensor features (`lmax>0`), improving efficiency while still extracting required features for the Born Effective Charge head. Also includes a scalar filter to prevent FlashTP and PyTorch OOM bugs when the final layer is purely scalar. Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
Adds `train_bec_from` configuration (defaulting to 'last', with option 'penultimate'). When set to 'penultimate', the final convolution layer avoids computing expensive tensor features (`lmax>0`), improving efficiency while still extracting required features for the Born Effective Charge head. Also includes a scalar filter to prevent FlashTP and PyTorch OOM bugs when the final layer is purely scalar. Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
Adds `train_bec_from` configuration (defaulting to 'last', with option 'penultimate'). When set to 'penultimate', the final convolution layer avoids computing expensive tensor features (`lmax>0`), improving efficiency while still extracting required features for the Born Effective Charge head. Also bypasses a FlashTP bug where compiling a layer producing only L=0 outputs from L>0 inputs crashes with KeyError: 0 by falling back to standard e3nn for that specific layer. Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
This PR addresses the user's request to analyze and introduce the capability to attach the Born Effective Charge (BEC) prediction head to the penultimate convolution layer.
Previously, when BEC was trained, the final layer of the network was forced to output
L>0representations to satisfy the tensor requirements of thepredict_becmodule. By introducing thetrain_bec_fromconfiguration key (which can be 'last' or 'penultimate'), users can opt to attach the BEC head earlier. When set to 'penultimate', the final layer falls back to computationally cheaperlmax=0representations (needed only for energy readout), yielding a faster network with fewer parameters.No backward compatibility is broken as the default remains
'last'. Test coverage executes flawlessly for all configurations.PR created automatically by Jules for task 15792460321465469416 started by @AugustinLu