1from huggingface_hub import hf_hub_download
2import os
3
4os.makedirs('model/isrm', exist_ok=True)
5os.makedirs('vectors', exist_ok=True)
6
7# Download encoder
8encoder_path = hf_hub_download(
9 repo_id="Amirmahdiii/ISRM",
10 filename="pad_encoder.pth",
11 local_dir="model/isrm"
12)
13
14# Download steering matrices
15pad_matrix_path = hf_hub_download(
16 repo_id="Amirmahdiii/ISRM",
17 filename="pad_matrix.pt",
18 local_dir="vectors"
19)
20
21bdi_matrix_path = hf_hub_download(
22 repo_id="Amirmahdiii/ISRM",
23 filename="bdi_matrix.pt",
24 local_dir="vectors"
25)
1from src.alignment import NeuralAgent
2
3# Initialize agent
4agent = NeuralAgent(
5 isrm_path="model/isrm/pad_encoder.pth",
6 llm_model_name="Qwen/Qwen3-4B-Thinking-2507",
7 injection_strength=2.0,
8 bdi_config={"belief": 0.9, "goal": 0.6, "intention": 0.7, "ambiguity": 0.3, "social": 0.5}
9)
10
11# Generate
12response, _, state = agent.generate_response("", "Tell me about AI safety.")
13print(response)
Results show steering effects with analytical and skeptical personas achieving significant alignment.