LPCombine-Qwen3.5-4B
Context combining for Qwen3.5
2 min readupdated
LPCombine-Qwen3.5-4B merges two independently captured contexts into a single resumable state. Built on the Qwen3.5-4B architecture by Simon Willani, the model uses a trained reader to propose tokens from the keys and values of the first full-attention layer and verifies candidates against the early cache. It is useful for developers working on efficient context management and caching in text-processing pipelines with the LatentPort library (a tool for working with model state caches).
Key features
- Merges two independent contexts (left and right caches) into a single state
- Supports BF16, NF4, and GGUF backends for cache operations
- Uses a trained reader attached on top of a frozen base model
- Passes equivalence tests against native token appending
What you can do
- Call the
combine()method to merge different contexts in Python using the LatentPort library - Load the model in NF4 or GGUF format to save VRAM when working with states
- Run session queries to extract information from combined contexts
Example
import latentport as lp
with lp.load_model("latentport/LPCombine-Qwen3.5-4B", backend="nf4") as model:
left = model.prefill("Nora belongs to team X.\n")
right = model.prefill("Team X uses the passcode cedar.\n")
merged = left.combine(right, model=model, method="cache")
with model.session(merged) as session:
print(session.ask("What is the passcode for Nora's team?").text)Read more
DetailsBackends: BF16, NF4, and GGUF with token retention support
Training: FP32 reader trained on 18,432 synthetic tokens with a frozen base model
Limitations: Requires right-context replay and verification of recovered tokens before updating the session
License: Apache-2.0










Comments