MCPcopy Index your code
hub / github.com/a1600012888/LaCT

github.com/a1600012888/LaCT @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
707 symbols 2,193 edges 80 files 252 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LaCT

Test-Time Training Done Right

<a href="https://tianyuanzhang.com/">Tianyuan Zhang</a><sup>1</sup>,
<a href="https://sai-bi.github.io/">Sai Bi</a><sup>2</sup>,
<a href="https://yiconghong.me/">Yicong Hong</a><sup>2</sup>,
<a href="https://kai-46.github.io/website/">Kai Zhang</a><sup>2</sup>,
<a href="https://scholar.google.com/citations?user=NLxrmYQAAAAJ">Fujun Luan</a><sup>2</sup>,
<a href="https://sustcsonglin.github.io/">Songlin Yang</a><sup>1</sup>,
<a href="http://www.kalyans.org/">Kalyan Sunkavalli</a><sup>2</sup>,
<a href="https://billf.mit.edu/">William T. Freeman</a><sup>1</sup>,
<a href="https://www.cs.unc.edu/~airsplay/">Hao Tan</a><sup>2</sup>



<sup>1</sup>MIT <sup>2</sup>Adobe Research

Paper | Website | Models (HuggingFace)


Minimal Implementations

We provide minimal implementations for a LaCT layer in minimal_implementations/. This implementation serves as a starting point for understanding, modifying, and creating your own version of LaCT.

News

November 18: Added Triton kernels for the fused TTT layer (see lact_llm/lact_model/ttt_operation_fused_kernel.py for implementation, with a updated moddel config in configs/760M_lact_swiglu_nh4_fwlow_rank_momentum_fused_kernel.json). This reduces training memory consumption. The triton kernel fuse several matmul with epilogues to reduce read and writes in global mememory.

Plans

  • ~~Release Language model code.~~ [Done] (will also release inside this great repo: https://github.com/fla-org/flame)
  • ~~Release novel view synthesis training code and model by June 12.~~ [Done]
  • ~~Release video model finetuning code (build on top of Wan T2V) by June 24.~~ [Done]

Citations

If you find this codebase useful for your research, please kindly cite our paper:

@article{zhang2025test,
  title={Test-time training done right},
  author={Zhang, Tianyuan and Bi, Sai and Hong, Yicong and Zhang, Kai and Luan, Fujun and Yang, Songlin and Sunkavalli, Kalyan and Freeman, William T and Tan, Hao},
  journal={arXiv preprint arXiv:2505.23884},
  year={2025}
}

Core symbols most depended-on inside this repo

flash_attention
called by 32
lact_ar_video/minVid/models/wan/wan_base/modules/attention.py
device
called by 27
lact_ar_video/minVid/models/wan/wan_warpper.py
report_error
called by 24
lact_llm/lact_model/lact_triton_kernels/benchmark.py
update
called by 22
lact_ar_video/minVid/utils/ema_param_utils.py
instantiate_from_config
called by 20
lact_ar_video/minVid/utils/config_utils.py
print_rank0
called by 13
lact_ar_video/minVid/utils/dist_utils.py
zeropower_via_newtonschulz5
called by 12
lact_ar_video/minVid/models/blocks/functions.py
_sigma_to_alpha_sigma_t
called by 10
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py

Shape

Method 348
Function 233
Class 120
Route 6

Languages

Python100%

Modules by API surface

lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py43 symbols
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py39 symbols
lact_ar_video/minVid/models/wan/wan_base/modules/model.py39 symbols
lact_ar_video/minVid/models/wan/wan_base/modules/t5.py37 symbols
lact_ar_video/minVid/models/wan/wan_base/modules/clip.py32 symbols
lact_ar_video/minVid/models/wan/wan_warpper.py22 symbols
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py22 symbols
lact_llm/lact_model/modeling_lact.py21 symbols
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py19 symbols
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py19 symbols
lact_nvs/model.py17 symbols
lact_ar_video/minVid/models/wan/wan_base/utils/prompt_extend.py16 symbols

For agents

$ claude mcp add LaCT \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact