Instructions to use litcoderr/CausalLens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use litcoderr/CausalLens with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/junho/lbk/Competency/com2025/full_merged_checkpoint") model = PeftModel.from_pretrained(base_model, "litcoderr/CausalLens") - Notebooks
- Google Colab
- Kaggle
CausalLens (Qwen3-VL-8B)
Weights for CausalLens: a Qwen3-VL-8B model with a LoRA adapter on the language model and a causal residual Q-Former on the visual tokens. The Q-Former applies a backdoor-adjustment style intervention over a fixed confounder dictionary and adds a small, gated residual to every visual token before it enters the language model.
Code and usage: https://github.com/litcoderr/CausalLens
Files
| Path | Content |
|---|---|
adapter_config.json, adapter_model.safetensors |
LoRA adapter (r=16, alpha=32; q/k/v/o/gate/up/down projections of the LLM) |
causal_qformer_adapter.pt, causal_qformer_config.json |
Causal residual Q-Former (weights + confounder dictionary 16384x256 + prior) |
tokenizer / preprocessor_config.json / chat_template.jinja |
Processor used for evaluation |
base/ |
Qwen3-VL-8B base checkpoint that the adapters were trained on (fine-tuned from Qwen/Qwen3-VL-8B-Instruct, weights merged) |
Usage
git clone https://github.com/litcoderr/CausalLens.git && cd CausalLens
./setup_env.sh # Python 3.11 venv with pinned dependencies
./download.sh # this repository -> checkpoints/CausalLens (base -> checkpoints/CausalLens/base)
./run_mmvet.sh # MM-Vet inference (data setup: see the GitHub README)
From Python (inside the CausalLens repository):
from causallens import load_model_and_processor
model, processor = load_model_and_processor(
base_model="checkpoints/CausalLens/base",
checkpoint="checkpoints/CausalLens",
)
- Downloads last month
- -
Model tree for litcoderr/CausalLens
Base model
Qwen/Qwen3-VL-8B-Instruct