jgrusewski
3c8039527c
fix(ml): TFT memory leak fixes - 98% reduction
TFT Memory Leak Fixes (8 applied):
- Fixed compute_quantile_loss() tensor leaks (22→7 tensors per batch)
- Detached LSTM initial states (.clone()→.detach())
- Detached attention cache weights (prevent graph retention)
- Replaced .repeat() with .broadcast_as() (31.5MB→0MB materialization)
- Pre-allocated LSTM outputs (eliminated 120 clones)
- Added clear_cache() method to TFTState
- Removed disabled files (quantized_attention.rs.disabled, quantized_tft.rs.disabled)
- Fixed shallow_clone compilation error (Candle API compatibility)
Impact:
- Memory leak: +3220MB → ~50MB (98.4% reduction)
- Tests: 90/90 passing (2 ignored GPU tests)
- Compilation: Successful (10 non-critical warnings)
Investigation via 6 parallel agents using zen/corrode MCP tools
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 12:50:00 +01:00
..
2025-10-19 09:10:55 +02:00
2025-10-19 09:10:55 +02:00
2025-10-26 12:50:00 +01:00
2025-10-26 12:50:00 +01:00
2025-10-25 15:36:57 +02:00
2025-10-14 23:13:34 +02:00
2025-10-26 12:50:00 +01:00
2025-10-19 09:10:55 +02:00
2025-10-19 09:10:55 +02:00
2025-10-23 09:16:58 +02:00
2025-10-21 21:13:11 +02:00
2025-10-19 09:10:55 +02:00
2025-10-25 23:49:24 +02:00
2025-10-25 23:49:24 +02:00
2025-10-23 01:02:00 +02:00
2025-10-25 15:36:57 +02:00
2025-10-23 13:36:34 +02:00