Efficient Detection of Toxic Prompts in Large Language Models