Instructions to use Transluce/act_patch_qwen3_8b_qwen3_8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Transluce/act_patch_qwen3_8b_qwen3_8b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B") model = PeftModel.from_pretrained(base_model, "Transluce/act_patch_qwen3_8b_qwen3_8b") - Transformers
How to use Transluce/act_patch_qwen3_8b_qwen3_8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Transluce/act_patch_qwen3_8b_qwen3_8b")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Transluce/act_patch_qwen3_8b_qwen3_8b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Transluce/act_patch_qwen3_8b_qwen3_8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Transluce/act_patch_qwen3_8b_qwen3_8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Transluce/act_patch_qwen3_8b_qwen3_8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Transluce/act_patch_qwen3_8b_qwen3_8b
- SGLang
How to use Transluce/act_patch_qwen3_8b_qwen3_8b 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 "Transluce/act_patch_qwen3_8b_qwen3_8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Transluce/act_patch_qwen3_8b_qwen3_8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Transluce/act_patch_qwen3_8b_qwen3_8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Transluce/act_patch_qwen3_8b_qwen3_8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Transluce/act_patch_qwen3_8b_qwen3_8b with Docker Model Runner:
docker model run hf.co/Transluce/act_patch_qwen3_8b_qwen3_8b
Training Language Models To Explain Their Own Computations
This is a Qwen3-8B explainer model fine-tuned for the activation patching task for the Qwen3-8B target model, as described in this paper. In the activation patching task, explainer models learn to predict the effects of activation patching interventions on Qwen-3-8B using CounterFact data. By predicting how patching internal activations at specific layers and positions influences the output, the research aims to develop models that can faithfully describe their own internal causal structures.
Sample Usage
To evaluate the explainer model on the input ablation task, you can use the evaluation script provided in the GitHub repository.
uv run --env-file .env evaluate.py \
--config config/act_patch/qwen_qwen_act_patch_cf.yaml \
--target_model_path Qwen/Qwen3-8B \
--task act_patch \
--model_path Transluce/act_patch_qwen3_8b_qwen3_8b \
--output_dir /PATH/TO/RESULTS/ \
--batch_size 64
Citation
@misc{li2025traininglanguagemodelsexplain,
title={Training Language Models to Explain Their Own Computations},
author={Belinda Z. Li and Zifan Carl Guo and Vincent Huang and Jacob Steinhardt and Jacob Andreas},
year={2025},
eprint={2511.08579},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2511.08579},
}
- PEFT 0.17.0
- Downloads last month
- 8