Instructions to use cagataydev/strands-qwen3-vl-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cagataydev/strands-qwen3-vl-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cagataydev/strands-qwen3-vl-2b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("cagataydev/strands-qwen3-vl-2b") model = AutoModelForMultimodalLM.from_pretrained("cagataydev/strands-qwen3-vl-2b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cagataydev/strands-qwen3-vl-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cagataydev/strands-qwen3-vl-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cagataydev/strands-qwen3-vl-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/cagataydev/strands-qwen3-vl-2b
- SGLang
How to use cagataydev/strands-qwen3-vl-2b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cagataydev/strands-qwen3-vl-2b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cagataydev/strands-qwen3-vl-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cagataydev/strands-qwen3-vl-2b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cagataydev/strands-qwen3-vl-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use cagataydev/strands-qwen3-vl-2b with Docker Model Runner:
docker model run hf.co/cagataydev/strands-qwen3-vl-2b
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).
- Downloads last month
- -