
#!/usr/bin/env sh
set -eu
export CUDA_VISIBLE_DEVICES=0
CONDA_BIN=${CONDA_BIN:-}
if [ -z "$CONDA_BIN" ]; then
  if command -v conda >/dev/null 2>&1; then
    CONDA_BIN=$(command -v conda)
  elif [ -x /opt/miniconda/bin/conda ]; then
    CONDA_BIN=/opt/miniconda/bin/conda
  fi
fi

if [ -n "$CONDA_BIN" ]; then
  eval "$("$CONDA_BIN" shell.bash hook)"
  conda activate focallora
else
  echo "[Ident_H_00_remove_existing_knoweledge.sh] Warning: conda not found; running in current environment." >&2
fi

export CUDA_VISIBLE_DEVICES=0

SCRIPT=./Ident_H_00_remove_existing_knoweledge.py
MODEL=../../models/Llama-3.1-8B-Instruct
DATA=../1_raw_dataset/topicattack/data/crafted_instruction_data_squad_injection_qa.json

DATA2=../1_raw_dataset/topicattack/data/crafted_instruction_data_squad_conversation_attack_complete.json
SYSTEM=../1_raw_dataset/topicattack/prompts/generator_system_prompt.txt
OUTPUT=../1_raw_dataset/topicattack/data/crafted_instruction_data_squad_injection_qa_llama_filtered.json
OUTPUT2=../1_raw_dataset/topicattack/data/crafted_instruction_data_squad_conversation_attack_complete_llama_filtered.json

DATA=../1_raw_dataset/topicattack/data/crafted_instruction_data_tri_injection_qa.json
DATA2=../1_raw_dataset/topicattack/data/crafted_instruction_data_tri_conversation_attack_complete.json
OUTPUT=../1_raw_dataset/topicattack/data/crafted_instruction_data_tri_injection_qa_llama_filter.json
OUTPUT2=../1_raw_dataset/topicattack/data/crafted_instruction_data_tri_conversation_attack_llama_filter.json

python "$SCRIPT" \
  --victim_model_path "$MODEL" \
  --data_path "$DATA" \
  --data_path2 "$DATA2" \
  --victim_system_path "$SYSTEM" \
  --output_path "$OUTPUT" \
  --output_path2 "$OUTPUT2" \
  --batch_size 12 \
  --data_size -1 \
  --max_new_tokens 256
