sad / src /models /block_ar_model.py
haochengsama's picture
add missing files batch 13 (400)
278b5e7 verified
Raw
History Blame Contribute Delete
701 Bytes
"""
BlockARModel – now unified with SADModel.
BlockARModel is an alias for SADModel. They share the same architecture,
SoftAncestorHierarchy, SADLoss, NoisyStateBuilder, and SADTrainer.
Differences handled externally:
- Training: SADTrainer is called with truncated sequences (curriculum)
- Inference: BlockARAdaptiveSkipSampler in src/eval/sampler.py uses
model.forward_causal() for block-by-block generation
`build_block_diff_mask` is kept here for backward compatibility with tests.
"""
from .sad_model import SADModel, build_block_diff_mask
# Alias so old import paths keep working
BlockARModel = SADModel
__all__ = ["BlockARModel", "SADModel", "build_block_diff_mask"]