Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
SLDR β€” Defense framework that mitigates malicious fine-tuning of LLMs using selective layer recovery and dynamic routing, with training, harmfulness scoring, and jailbreak evaluation scripts. | Kitploit
Tools/GitHubGitHub/stardust457/sldr
Defensive ToolsMachine LearningPapers & ResearchAI SecurityAdversarial Attack
GitHubstardust457/sldr

SLDR

Defense framework that mitigates malicious fine-tuning of LLMs using selective layer recovery and dynamic routing, with training, harmfulness scoring, and jailbreak evaluation scripts.

View Repository
211001 month agoNot yet reviewed
Share

[NeurIPS 2026] SLDR: Defending Against Malicious Fine-tuning via Selective Layers Recovery and Dynamic Routing

πŸ”§ Environment Setup

Clone the repository, create and activate the Conda environment, then install the required dependencies:

git clone https://github.com/Stardust457/SLDR.git
cd SLDR

conda create -n sldr python=3.12 -y

conda activate sldr

python -m pip install --upgrade pip

python -m pip install -r requirements.txt

πŸ”‘ Accessing and Downloading Llama Models

Llama models require an access request on Hugging Face.

Before using a model, log in to Hugging Face, visit the desired model's page under Meta Llama, accept the terms of use, and submit an access request. Once access is granted, use the same account to create an Access Token with read access to the target model on the Access Tokens settings page. For details, see the Hugging Face gated model guide.

First, configure the HF-Mirror in a Bash terminal:

export HF_ENDPOINT="https://hf-mirror.com"

Then, run the following command to log in:

hf auth login

Enter your newly created Hugging Face Access Token when prompted.


πŸš€ Training and Evaluation

Run the following commands from the repository root to train and evaluate each model:

Llama 3.1

bash scripts/run_llama31_downstream.sh

Llama 3

bash scripts/run_llama3_downstream.sh

Qwen 2.5

bash scripts/run_qwen25_downstream.sh

Mistral

bash scripts/run_mistral_downstream.sh

Llama Guard Deployment and Harmfulness Scoring

After collecting model responses, deploy Llama Guard and start the service in a terminal:

bash scripts/run_llama_guard.sh serve

Keep this terminal running and wait until the service is ready. Then, open another terminal, activate the sldr environment, and run the following command from the repository root to score the harmfulness of the model responses:

bash scripts/run_llama_guard.sh score

⚠️ Important Reminder: Alpaca Evaluation

Before running Llama 3.1 evaluation on the Alpaca dataset, configure the GPT judge's API base URL and API key in the same terminal:

export GPT_JUDGE_BASE_URL='your base url'
export OPENAI_API_KEY='your API key'

Replace the placeholders with your API base URL and API key before starting the evaluation.

Additional Harmful Benchmark Evaluation

After generating the corresponding downstream checkpoints, run the following command to evaluate Llama 3.1 on additional harmful benchmarks, including DirectHarm4, HarmBench, and HEx-PHI:

DATASETS="sst2" \
POISON_RATIOS="0.1" \
SEEDS="42" \
VARIANTS="defended" \
bash /root/scripts/run_llama31_harm_benchmarks.sh

Zulu and IJP Jailbreak Evaluation

Run the following command to evaluate Llama 3.1 against the Zulu and IJP jailbreak attacks using the corresponding downstream checkpoints:

DATASETS="sst2" \
POISON_RATIOS="0.1" \
TRAIN_SAMPLES="1000" \
SEEDS="42" \
VARIANTS="defended" \
JAILBREAK_ATTACKS="zulu ijp" \
bash /root/scripts/run_llama31_jailbreak.sh

Note: Model responses generated for the Zulu dataset must be translated into English before their harmfulness is evaluated using Llama Guard.


Download Tool

Most Popular

View all β†’

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    618
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    407
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    324
  • 5

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    279
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    AI powered OSINT engine to discover and map 7,700+ social media identities across the web

    270

Explore all tools

Browse our collection of tools

View all tools β†’