Instructions to use SamJoshua/injection-guard-fix-recipe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SamJoshua/injection-guard-fix-recipe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="SamJoshua/injection-guard-fix-recipe")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SamJoshua/injection-guard-fix-recipe", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 566 Bytes
8c0ce05 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/usr/bin/env bash
# Train + evaluate recipes sequentially: scripts/screen.sh SEED RECIPE [RECIPE ...]
set -u
trap 'trap - INT TERM; kill 0; exit 130' INT TERM
cd "$(dirname "$0")/.."
seed=$1; shift
mkdir -p work/logs
for r in "$@"; do
echo "=== $(date -u +%H:%M:%S) $r s$seed" | tee -a work/logs/screen.txt
python -m guardtune.train --recipe "$r" --seed "$seed" 2>&1 \
| grep --line-buffered -v -i -E "unauth|Loading weights|Writing model shards" > "work/logs/${r}_s${seed}.log"
tail -n 1 "work/logs/${r}_s${seed}.log" | tee -a work/logs/screen.txt
done
|