{"type":"post","id":"code-jax-and-pytorch-kernels-available-at-caiyun-8042cc","slug":"code-jax-and-pytorch-kernels-available-at-caiyun-8042cc","title":"Code, JAX and PyTorch kernels available at Caiyun-AI/LoomFormer.","description":"Loom attention dynamically rewires head-to-head circuits at each token, combining vertical attention over earlier heads with horizontal attention over tokens.","retrieval_nugget":"Loom attention dynamically rewires head-to-head circuits at each token, combining vertical attention over earlier heads with horizontal attention over tokens. The repository includes official JAX and PyTorch training and inference code, and provides pretrained LoomPythia-2.8B and a matched mHC-Pythia comparison model. (github.com)","published_at":"2026-11-29","updated_at":"2026-11-29","record_date":"2026-11-29","date_kind":"published_at","topics":["models","compute"],"entities":["Caiyun-AI","LoomFormer","LoomPythia-2.8B"],"related_patterns":["hardware-adoption-is-routed-through-familiar-ai-software-stacks"],"novelty_label":"new_fact","what_changed":null,"prior_refs":[],"source_url":"https://github.com/Caiyun-AI/LoomFormer","source_urls":["https://github.com/Caiyun-AI/LoomFormer"],"production":{"schema":"newruntime-production-v1","desk":"newsroom","first_seen_at":"2026-11-29T01:08:59.645Z","independent_sources":1,"notes_synthesized":null,"writer_model":"gpt-6-luna","critic":null,"checks":["primary_source_verified","source_fresh","one_story","copy_contract"],"novelty":null,"editorial_value":"medium","human_review":"selective"},"citations":[{"claim":"","quotes":["We propose loom attention , … its horizontal attention over tokens."],"cite_url":"https://github.com/Caiyun-AI/LoomFormer#:~:text=We%20propose%20loom%20attention%20%2C,its%20horizontal%20attention%20over%20tokens.","source_url":"https://github.com/Caiyun-AI/LoomFormer","publisher":"github.com"},{"claim":"","quotes":["Vertical attention is instantiated efficiently … \\in \\mathbb{R}^{d_k \\times d}$ ).","pytorch/ : HuggingFace-compatible PyTorch implementations … scripts/convert_maxtext_to_hf.py ), and test suite."],"cite_url":"https://github.com/Caiyun-AI/LoomFormer#:~:text=Vertical%20attention%20is%20instantiated%20efficiently,%5Cin%20%5Cmathbb%7BR%7D%5E%7Bd_k%20%5Ctimes%20d%7D%24%20%29.&text=pytorch%2F%20%3A%20HuggingFace%2Dcompatible%20PyTorch%20implementations,scripts%2Fconvert_maxtext_to_hf.py%20%29%2C%20and%20test%20suite.","source_url":"https://github.com/Caiyun-AI/LoomFormer","publisher":"github.com"},{"claim":"","quotes":["Across model scales and token budgets: Scaling Efficiency : LoomFormer matches standard Transformers trained with $>3\\times$ compute ( $3.19\\times$ at Large scale) and outperforms recent residual-stream architectures (HC/mHC, MUDDFormer, AttnRes) trained with $1.7\\times\\text{--}2.8\\times$ compute .","Practical Throughput : With custom fused TPU Pallas training kernels and GPU Triton + CUDA-graph inference kernels, LoomFormer sustains $89%\\text{--}92%$ of matched-size Transformer training speed on TPU v5p and $84%\\text{--}92%$ of prefill/decode inference speed on GPU."],"cite_url":"https://github.com/Caiyun-AI/LoomFormer#:~:text=Across%20model%20scales%20and%20token%20budgets%3A%20Scaling%20Efficiency%20%3A%20LoomFormer%20matches%20standard%20Transformers%20trained%20with%20%24%3E3%5Ctimes%24%20compute%20%28%20%243.19%5Ctimes%24%20at%20Large%20scale%29%20and%20outperforms%20recent%20residual%2Dstream%20architectures%20%28HC%2FmHC%2C%20MUDDFormer%2C%20AttnRes%29%20trained%20with%20%241.7%5Ctimes%5Ctext%7B%2D%2D%7D2.8%5Ctimes%24%20compute%20.&text=Practical%20Throughput%20%3A%20With%20custom%20fused%20TPU%20Pallas%20training%20kernels%20and%20GPU%20Triton%20%2B%20CUDA%2Dgraph%20inference%20kernels%2C%20LoomFormer%20sustains%20%2489%25%5Ctext%7B%2D%2D%7D92%25%24%20of%20matched%2Dsize%20Transformer%20training%20speed%20on%20TPU%20v5p%20and%20%2484%25%5Ctext%7B%2D%2D%7D92%25%24%20of%20prefill%2Fdecode%20inference%20speed%20on%20GPU.","source_url":"https://github.com/Caiyun-AI/LoomFormer","publisher":"github.com"}],"schema_version":"newruntime-agent-readable-v0.2","stable_id":"post:code-jax-and-pytorch-kernels-available-at-caiyun-8042cc","status":"published","visuals":[],"editor":{"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]},"routes":{"html":"https://newruntime.com/posts/code-jax-and-pytorch-kernels-available-at-caiyun-8042cc/","markdown":"https://newruntime.com/posts/code-jax-and-pytorch-kernels-available-at-caiyun-8042cc.md","json":"https://newruntime.com/posts/code-jax-and-pytorch-kernels-available-at-caiyun-8042cc.json"},"markdown_url":"https://newruntime.com/posts/code-jax-and-pytorch-kernels-available-at-caiyun-8042cc.md","next_reads":[{"type":"topic","path":"/topics/models/","url":"https://newruntime.com/topics/models/","title":"Models","reason":"Explore the models topic hub.","media_type":"text/html","markdown_url":"https://newruntime.com/topics/models.md","json_url":"https://newruntime.com/topics/models.json"},{"type":"topic","path":"/topics/compute/","url":"https://newruntime.com/topics/compute/","title":"Compute","reason":"Explore the compute topic hub.","media_type":"text/html","markdown_url":"https://newruntime.com/topics/compute.md","json_url":"https://newruntime.com/topics/compute.json"},{"type":"collection","path":"/posts/","url":"https://newruntime.com/posts/","title":"Field Notes","reason":"Open the latest editorial analysis.","media_type":"text/html","json_url":"https://newruntime.com/posts.json"},{"type":"collection","path":"/sources/","url":"https://newruntime.com/sources/","title":"Sources","reason":"See the original sources this archive cites.","media_type":"text/html"}]}
