
इनकार स्थानीयकृत होता है, क्षति स्थानांतरित होती है, कुछ-नमूना फाइन-ट्यूनिंग के अंतर्गत सुरक्षा परतें
त्वरित शुरुआत · उपयोग · CLI · परिणाम · पुनरुत्पादन · सामान्य प्रश्न · उद्धरण
कुछ दर्जन हानिकारक उदाहरण एक संरेखित मॉडल के हानिकारक अनुरोधों से इनकार को हटा सकते हैं। पूर्व कार्य सुरक्षा को विशिष्ट परतों और दिशाओं में स्थानीयकृत करता है, जो यह सुझाव देता है कि जो स्थान पाया गया उसकी रक्षा की जाए। यह रिपॉज़िटरी उस आधार की परीक्षा उसी तरह करती है जैसे एक अनुकूली हमलावर करता। यह पाता है कि इनकार कहाँ पुनर्प्राप्त किया जा सकता है, उस क्षेत्र को स्थिर करता है और फिर से हमला करता है, और यह वेट अपडेट की मरम्मत करता है और फिर हमलावर को उसे फैलाने देता है।
यह अध्ययन तीन मापों पर आधारित है।
यह रिपॉज़िटरी माप और दोनों रक्षाओं को एक छोटी लाइब्रेरी के रूप में प्रस्तुत करती है, साथ ही रन रिकॉर्ड और स्क्रिप्ट्स जो पेपर की तालिकाओं को पुनर्निर्मित करते हैं।
(a) लॉकस्टेप एक्टिवेशन पैचिंग समझौता किए गए मॉडल की परत आउटपुट को प्रीफिल और प्रत्येक डिकोडिंग चरण पर स्वच्छ स्थिति से अधिलेखित करती है। (b) मिलान किए गए Llama हमले में, परतों 0–17 को स्थिर करना आधी-सीमा संक्रमण को 15 से 27–28 पर स्थानांतरित कर देता है।
pip install "git+https://github.com/js-lee-AI/refusal-relocates.git"
| **`--no-update`** | Skip the automatic update check. |
| **`--no-color`** | Disable colored output. |
| **`--verbose`** | Enable verbose logging. |
| **`--quiet`** | Suppress all non-essential output. |
| **`--config <path>`** | Use a custom configuration file. |
| **`--timeout <seconds>`** | Set the network timeout in seconds. |
| **`--proxy <url>`** | Route requests through the specified proxy. |
| **`--output <format>`** | Set the output format (`json`, `yaml`, `table`). |
| **`--threads <n>`** | Number of concurrent worker threads. |
| **`--rate-limit <n>`** | Maximum requests per second. |
| **`--retry <n>`** | Number of retry attempts on failure. |
| **`--insecure`** | Skip TLS certificate verification. |
| **`--user-agent <string>`** | Set a custom User-Agent header. |
| **`--header <key:value>`** | Add a custom HTTP header. |
| **`--cookie <string>`** | Send cookies with each request. |
| **`--resolve <host:ip>`** | Override DNS resolution for a host. |
| **`--interface <name>`** | Bind to a specific network interface. |
| **`--log-file <path>`** | Write logs to the specified file. |
| **`--debug`** | Enable debug-level logging. |
| **`--dry-run`** | Simulate execution without making changes. |
| **`--force`** | Overwrite existing files without prompting. |
| **`--yes`** | Assume "yes" for all confirmation prompts. |
| **`--batch`** | Run in non-interactive batch mode. |
| **`--profile <name>`** | Load a named configuration profile. |
| **`--env <file>`** | Load environment variables from a file. |
| **`--seed <value>`** | Set the random seed for reproducibility. |
| **`--max-depth <n>`** | Maximum recursion or crawl depth. |
| **`--include <pattern>`** | Include only matching targets. |
| **`--exclude <pattern>`** | Exclude matching targets. |
| **`--input <file>`** | Read targets from the specified file. |
| **`--stdin`** | Read targets from standard input. |
| **`--json`** | Emit machine-readable JSON output. |
| **`--csv`** | Emit CSV-formatted output. |
| **`--silent`** | Print only results, no banners or status. |
| **`--version`** | Print version information and exit. |
| **`--help`** | Show the help message and exit. |
### Examples
```bash
# Basic usage
tool --target example.com
# Scan a list of targets from a file
tool --input targets.txt --threads 10
# Output results as JSON
tool --target example.com --json --output results.json
# Use a proxy with verbose logging
tool --target example.com --proxy http://127.0.0.1:8080 --verbose
# Run in batch mode with a custom config
tool --batch --config ./config.yaml --yes
The tool reads configuration from ~/.config/tool/config.yaml by default. A minimal example:
target: example.com
threads: 10
timeout: 30
output: json
verbose: false
proxy: null
headers:
User-Agent: "tool/1.0"
Accept: "*/*"
| Code | Meaning |
|---|---|
0 | Success. |
1 | General error. |
2 | Invalid arguments. |
3 | Network error. |
4 | Authentication failure. |
5 | Target not found. |
10 | Interrupted by user. |
--insecure to rule out certificate issues.--threads or increase --timeout.--debug and inspect the log file.Contributions are welcome. Please open an issue to discuss proposed changes before submitting a pull request. Ensure all tests pass and follow the existing code style.
This project is released under the MIT License. See the LICENSE file for details.```python
import numpy as np
import refusal