Feature Extraction
PEFT
Safetensors
English
lora
multimodal
embedding
retrieval
chain-of-thought
qwen3-vl
Instructions to use zhanglx/TWN-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use zhanglx/TWN-4B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| base_model: Qwen/Qwen3-VL-4B-Instruct | |
| library_name: peft | |
| license: apache-2.0 | |
| language: | |
| - en | |
| tags: | |
| - lora | |
| - multimodal | |
| - embedding | |
| - retrieval | |
| - chain-of-thought | |
| - qwen3-vl | |
| pipeline_tag: feature-extraction | |
| # TWN-4B | |
| The 4B version of [Think When Needed (TWN)](https://github.com/winterfell00/Think-When-Needed), a framework for adaptive reasoning-driven multimodal embeddings. TWN introduces a dual-LoRA architecture on top of [Qwen3-VL-4B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct) with a learned routing gate that adaptively activates chain-of-thought reasoning. | |
| ## Weight Structure | |
| ``` | |
| TWN-4B/ | |
| reasoning/ # LoRA adapter for CoT generation | |
| adapter_config.json | |
| adapter_model.safetensors | |
| embedding/ # LoRA adapter for embedding extraction | |
| adapter_config.json | |
| adapter_model.safetensors | |
| gate_mlp.pt # Routing gate MLP weights | |
| queries.pt # Learnable query embeddings | |
| ``` | |
| ## Citation | |
| ```bibtex | |
| @article{zhang2026thinkneeded, | |
| title={Think When Needed: Adaptive Reasoning-Driven Multimodal Embeddings with a Dual-LoRA Architecture}, | |
| author={Longxiang Zhang and Weilong Dai and Guanghao Zhang and Hao Jiang and Pipei Huang}, | |
| year={2026}, | |
| eprint={2605.14448}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CV}, | |
| url={https://arxiv.org/abs/2605.14448}, | |
| } | |
| ``` | |