PyRIT icon indicating copy to clipboard operation
PyRIT copied to clipboard

FEAT: Remove dependency on fastchat for model conversation templates

Open varshini2305 opened this issue 5 months ago • 1 comments

Replace FastChat’s custom prompt logic with Hugging Face’s apply_chat_template() and tokenizer_config.json.

  • Enable use_fast = True in the tokenizer.
  • Update _update_ids() in pyrit/auxiliary_attacks/gcg/attack/base/attack_manager.py to call apply_chat_template(), generating model-specific prompts according to the conversation template.

varshini2305 avatar Aug 05 '25 20:08 varshini2305

@romanlutz

varshini2305 avatar Aug 05 '25 20:08 varshini2305