Commit ec21a49
Align OG2 FP8 recipe with PR #1500 layer precision approach
Replace broken fp8_first_last_bf16 mechanism with resolve_layer_precision()
from PR #1500. The old approach set config attributes that were never read by
the forward pass, causing all layers to default to FP8 regardless of setting.
Key changes:
- Delete fp8_debugging.py, add quantization.py with resolve_layer_precision()
and initialize_quant_stats_logging()
- Add set_recipes()/get_layer_autocast() to OG2 model (from lepton branch),
model now handles per-layer autocast internally
- Model constructor accepts fp8_recipe/fp4_recipe, set_recipes() called after
FSDP wrapping since recipes aren't serializable
- Remove outer te.autocast() from training loop (model handles it)
- Rename fp8_stats_config -> quant_stats_config throughout
- Add _parse_layers_cfg() for CLI string support
- Add og2_7b_fp8_fl1_pq2.yaml with explicit fp8_layers=[2..31]
- Expand fp8_debugging_stats.yaml with all layer types + LogTensorStats
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d357621 commit ec21a49
29 files changed
Lines changed: 1274636 additions & 192 deletions
File tree
- bionemo-recipes/recipes
- fp8_analysis
- activation_analysis
- analysis_output/csv_data
- wandb_comparison
- opengenome2_llama_native_te
- hydra_config
Lines changed: 253 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 217 additions & 0 deletions
Large diffs are not rendered by default.
0 commit comments