{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2605-17842","title":"SNLP: Layer-Parallel Inference via Structured Newton Corrections","arxiv_id":"2605.17842","date":"2026-05-18","proceeding":null,"authors":["Ligong Han","Kai Xu","Hao Wang","Akash Srivastava"],"abstract":"Autoregressive language models execute Transformer layers sequentially, creating a latency bottleneck that is not removed by conventional tensor or pipeline parallelism. We study whether this layerwise dependency can be relaxed by treating the hidden-state trace across layers as the solution of a nonlinear residual equation and solving it with parallel Newton-style updates. While this view is principled, exact Newton corrections require expensive Jacobian-vector products and naive fixed-point iterations are unstable on trained Transformers. We introduce Structured Newton Layer Parallelism (SNLP), a training and inference framework that replaces exact layer Jacobians with cheap architecture-induced surrogate dynamics. In residual Transformers, this yields Identity Newton (IDN), where the correction reduces to a prefix-sum-like update; in mHC-style architectures, HC Newton (HCN) uses the model's residual mixing matrix. We also study SNLP-aware training, including pretraining regularization and direct SNLP-forward SFT. Experiments on Nanochat-scale Transformers show that SNLP exposes a practical speed-quality frontier: on 0.5B models, it reaches up to 2.58x wall-clock speedup, and a less aggressive configuration reaches 1.40x speedup without increasing PPL. The useful tradeoff comes from the biased finite-iteration computation induced by IDN/HCN rather than exact recovery of the sequential trace. We further show that SNLP-forward SFT can preserve downstream task accuracy, and that SNLP can serve as a drafter for self-speculative decoding while a sequential verifier preserves output correctness.","url_abs":"https://arxiv.org/abs/2605.17842","url_pdf":"https://arxiv.org/pdf/2605.17842","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2605.17842","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.17842"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/phymhan/nanochat-snlp","reach":null}],"summary":{"ran":13,"unverified":5},"by_repo_kind":{"found_in_text":{"samples":18,"ran":13,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"b2bd5fa8c03a6428","entry":"compute_init","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/common.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/common.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2bd5fa8c03a6428"}},{"code_sha256_prefix":"92fc8302af99cbbc","entry":"eval_with_timeout","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/engine.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/engine.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"92fc8302af99cbbc"}},{"code_sha256_prefix":"9e3da799c83cef94","entry":"find_largest_model","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/checkpoint_manager.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/checkpoint_manager.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9e3da799c83cef94"}},{"code_sha256_prefix":"205ad125bcdc5c79","entry":"get_peak_flops","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/common.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/common.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"205ad125bcdc5c79"}},{"code_sha256_prefix":"5eb5385406dd05c3","entry":"has_ve","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/gpt.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/gpt.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5eb5385406dd05c3"}},{"code_sha256_prefix":"1c6b637f7f44ab80","entry":"load_checkpoint","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/checkpoint_manager.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/checkpoint_manager.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1c6b637f7f44ab80"}},{"code_sha256_prefix":"4e63e6195b90a817","entry":"norm","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/gpt.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/gpt.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e63e6195b90a817"}},{"code_sha256_prefix":"6519cb0a9ba0f137","entry":"render_prompts_lm","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/core_eval.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/core_eval.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6519cb0a9ba0f137"}},{"code_sha256_prefix":"038adb078ed905c9","entry":"render_prompts_mc","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/core_eval.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/core_eval.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"038adb078ed905c9"}},{"code_sha256_prefix":"d72ac88289f6e9aa","entry":"render_prompts_schema","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/core_eval.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/core_eval.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d72ac88289f6e9aa"}},{"code_sha256_prefix":"3a4ba6fb51f58a00","entry":"sample_next_token","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/engine.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/engine.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3a4ba6fb51f58a00"}},{"code_sha256_prefix":"646932e0f69786cd","entry":"sinkhorn_log","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/gpt.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/gpt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"646932e0f69786cd"}},{"code_sha256_prefix":"421f97f36be56d23","entry":"use_calculator","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/engine.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/engine.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"421f97f36be56d23"}},{"code_sha256_prefix":"09f5482fc32be226","entry":"download_file_with_lock","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/common.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09f5482fc32be226"}},{"code_sha256_prefix":"1605019d7ca32d10","entry":"evaluate_bpb","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/loss_eval.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/loss_eval.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1605019d7ca32d10"}},{"code_sha256_prefix":"686a4f93a88bb3d2","entry":"execute_code","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/execution.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/execution.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"686a4f93a88bb3d2"}},{"code_sha256_prefix":"cece41e34913bcb8","entry":"flash_attn_func","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/flash_attention.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/flash_attention.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cece41e34913bcb8"}},{"code_sha256_prefix":"683d5f02142b51c7","entry":"flash_attn_with_kvcache","repo":"phymhan/nanochat-snlp","repo_kind":"found_in_text","path":"nanochat/flash_attention.py","file_url":"https://github.com/phymhan/nanochat-snlp/blob/HEAD/nanochat/flash_attention.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"683d5f02142b51c7"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}