nanochat/tests
junran 4011f5e3d5 Fix torch.compile graph breaks with Engram module
Refactor Engram data structures for torch.compile compatibility:
- Replace nn.ModuleDict (string-keyed) with nested nn.ModuleList (integer-indexed)
- Precompute hash powers in __init__ and re-materialize in init_weights to
  eliminate torch.tensor() construction during forward
- Remove hash_seeds and table_sizes dicts (info embedded in _powers / embed_tables)
- Add _patch_removed_state_keys for old engram checkpoint backward compat

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 08:18:50 +08:00
..
test_attention_fallback.py delete autocast, an unnecessary thorn in my side, manage dtypes directly 2026-03-04 23:55:30 +00:00
test_engine.py Fix MockModel's device definition (#535) 2026-02-17 16:03:46 -08:00
test_engram.py Fix torch.compile graph breaks with Engram module 2026-04-28 08:18:50 +08:00