LPBridge

Cross-model inference state transfer.

Let a small model read the context, then hand its working state to a compatible larger model. LPBridge transfers attention KV, recurrent memory, convolution history, and hidden state so the target can continue without rereading the historical prefix.

Qwen3.5-4B to Qwen3.8-27B 0 historical tokens replayed by the target
ReadProcess the source context
TranslateTransform the captured inference state
ContinueGenerate with the target model

Choose a model pair.

Each checkpoint translates in one direction between pinned source and target models. Translation requires dense source state with complete alignment metadata. Use the model card to check supported backends and state requirements.

Qwen3.5-4B → Qwen3.5-9B

Try the smaller target with the Python example below. The original paper studies the contribution of recurrent and convolution state alongside attention KV for a 4B-to-9B handoff.

4B to 9B model card

Qwen3.5-4B → Qwen3.8-27B

The published bridge includes separate corrections for thinking enabled and disabled. The 2.19× warm first-token result at about 16K context came from earlier research weights.

4B to 27B model card

Get started

Hand off a snapshot in Python.

Set up the BF16 backend, then load the 4B-to-9B bridge. Capture the context on the 4B model, translate it, and ask a question in a session on the 9B target.

Transfer working memory · Python
import latentport as lp

bridge = "latentport/LPBridge-Qwen3.5-4b-Qwen3.5-9b"

with lp.load(bridge, backend="bf16") as port:
    state = port.source.capture([("user", "The ticket is red.")])
    transferred = port.bridge.translate(state)
    with port.target.session(transferred) as session:
        print(session.ask("What color is the ticket?").text)