1. 27 Jun, 2026 2 commits
    • Andrey Filippov's avatar
      CLAUDE: emit model meta sidecar (.meta.json) on L1/L2 TorchScript export · 07c31b7d
      Andrey Filippov authored
      Each export now writes a small <model>.ts.pt.meta.json so the native side
      (tp_dnn.cpp / CuasDnnLocal, pieces 3-4) reads the model's params from a bundled
      sidecar instead of hardcoding them — single source of truth.
        L1: {N, P, vr, out_ch, velocity_mode, vmax}
        L2: {ch_hidden, vmax, grid, ch_in}
      Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
      07c31b7d
    • Andrey Filippov's avatar
      CLAUDE: export L2 (Layer2Net step) to TorchScript for native LibTorch · 7a351e9e
      Andrey Filippov authored
      Piece 1 of the native-JNA DNN path (no Python server). Adds export_l2_torchscript.py:
      wraps a trained Layer2Net's cell+head into a single-step L2Step module
      forward(x,h)->(h_new,det,vel) — exactly infer_server's per-scene recurrence
      (h=cell(x,h); det,vel=decode(h)) — so the C++ side just carries h and calls it
      per scene. Size-agnostic (circular pad + 1x1 head), runs on the full field.
      
      Validated: scripted==eager exact (0.0); C++ LibTorch (libtorch_probe/l2_probe)
      loads it on Blackwell CUDA and replays the recurrence with hidden-state match
      9.5e-7. Required disabling the TorchScript JIT fuser (nvrtc element-wise fusion
      fails on Blackwell -arch; production wants no runtime nvrtc) — folds into the
      native lib startup in piece 2.
      Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
      7a351e9e
  2. 26 Jun, 2026 6 commits