strands-qwen3-vl-2b
A Strands-Agents-expert Qwen3-VL-2B that keeps learning after deployment.
Qwen/Qwen3-VL-2B-Instruct post-tuned (LoRA r=32, merged) on the full public
codebase and docs of strands-agents and
strands-labs (12 repos, ~5.6M tokens), designed to be wrapped with the
strands-slm plastic self-learning
layer: surprise-gated weight updates at inference, EMA-bounded plasticity, and
a provable off-switch (reset() is bit-identical to this base).
Code, demo notebook, and full experimental record: github.com/cagataycali/slm
Use — self-learning (recommended)
pip install strands-slm
As a Strands Agents model provider — every agent turn can change the weights:
from strands import Agent
from strands_tools import shell
from slm import SLM
model = SLM("cagataydev/strands-qwen3-vl-2b")
agent = Agent(tools=[shell], model=model)
agent("use the shell tool to run: echo hello") # this turn updated the weights
Or drive the learning loop directly:
from slm import StrandsPlasticQwen
m = StrandsPlasticQwen.from_pretrained("cagataydev/strands-qwen3-vl-2b", device="cuda")
print(m.chat("How do I create a custom tool in Strands Agents?"))
for doc in your_stream:
m.observe(doc, learn=True) # predicts; if surprised, rewrites its fast weights
m.reset() # bit-exact back to this base
Use — plain transformers (frozen expert)
from transformers import AutoModelForImageTextToText, AutoProcessor
model = AutoModelForImageTextToText.from_pretrained("cagataydev/strands-qwen3-vl-2b", dtype="bfloat16", device_map="cuda")
proc = AutoProcessor.from_pretrained("cagataydev/strands-qwen3-vl-2b")
Results
Measured on a single L40S, seed-replicated. The base is never updated by the plastic layer.
| claim | evidence |
|---|---|
| Domain expert | strands probe NLL 4.85 → 2.22, 8/8 probes improved; corpus holdout NLL 1.848 → 1.239 |
| Learns while running | continual OOD stream NLL 6.18 → 5.37, pure inference |
| Does not forget | strands expertise after OOD learning: Δ −0.01 |
| Agent competence grows | held-out tasks 0/4 → 4/4 after 18 curated lessons, 5/5 seeds |
| Fact memory | 15/15 facts at 100% verbatim recall |
| Provable off-switch | reset() is bit-identical to this base, Δlogits = 0 |
| Cost | +0.11–0.25 s/turn learning overhead |
Full results, honest limitations, and the demo notebook: github.com/cagataycali/slm
License: Apache-2.0 (inherits Qwen3-VL license terms).