Dynamically adapt LLM depth per input at test time by skipping, repeating, or reordering layers using MCTS search, correcting 60% of initially wrong predictions and processing 75% of correct predictions with shorter architectures without retraining.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
cola-test-time-depth-adaptation-llm
title
Skip a Layer or Loop it? Test-Time Depth Adaptation of Pretrained LLMs
version
0.0.2
engine
skillxiv-v0.0.2-claude-opus-4.6
license
MIT
url
https://arxiv.org/abs/2507.07996
keywords
["LLM Architecture","Depth Adaptation","Test-Time Optimization","Monte Carlo Tree Search","Layer Reordering"]
description
Dynamically adapt LLM depth per input at test time by skipping, repeating, or reordering layers using MCTS search, correcting 60% of initially wrong predictions and processing 75% of correct predictions with shorter architectures without retraining.
CoLa: Chain-of-Layers Architecture Search for Test-Time Adaptation
Standard language models apply all layers sequentially. But not every input needs every layer. Difficult examples benefit from depth, easy examples waste computation. CoLa (Chain-of-Layers) reframes inference as an architecture search problem: for each test input, find the optimal layer sequence by skipping unnecessary layers, repeating useful ones, or reordering them. Monte Carlo Tree Search efficiently explores this space without training, finding custom architectures that improve accuracy or reduce latency.
The method reveals that over 75% of correctly predicted samples could be processed through shorter paths, and over 60% of initially incorrect predictions become correct through architectural reconfiguration. This enables substantial efficiency gains or accuracy improvements depending on your objectives.
Core Concept
The key insight is that transformer layers are relatively independent modules. A sequence of layers is not sacred; the same model can process inputs via different layer orderings. CoLa searches for the optimal "chain of layers" for each input: which layers to include, which to skip, which to repeat. This search happens at test time via MCTS, a planning algorithm that balances exploration (trying new architectures) and exploitation (focusing on promising ones).
For easy inputs, this finds shorter paths. For hard inputs, it identifies beneficial layer reorderings or repetitions. The method imposes no training overhead and works with frozen pretrained models.
Architecture Overview
Layer Manipulation Space: Skip, repeat, or reorder individual layers or layer blocks
MCTS Search: Exploration-exploitation via Upper Confidence Bound over architecture space
State Representation: Current layer index, already-processed layers, input progress
Action Space: Skip 1-4 layers, repeat 1-4 layers, continue with next layer
Reward Signal: Model accuracy on input (did you predict correctly?)
Simulation Budget: 200 MCTS simulations per input, ~5x inference time typical
Compatible Layers: Works with LLaMA-3, OLMoE, and other transformer families
Implementation
Step 1: Define Layer Manipulation Operations
Create the action space: all valid ways to modify layer sequences: