Recent works have shown that attaching prompts to the input is effective at conditioning Language Models (LM) to perform specific tasks. However, prompts are always included in the input text during inference, thus incurring substantial computational and memory overhead. Also, there is currently no straightforward method of utilizing prompts that are longer than the maximum input length of the LMs without incurring additional costs during inference. We formulate a new problem called Prompt Injection (PI) that focuses on injecting the prompt into the parameters of an LM to be an efficient alternative to attaching fixed prompts to the input. We show that in scenarios with long fixed prompts, PI can be up to 280 times more efficient in terms of total FLOPs than previous approaches. We further explore methodologies for PI and show promising results in persona-dependent conversation, semantic parsing, and zero-shot learning with task instructions. Through these explorations, we show that PI can be a promising direction for conditioning language models, especially in scenarios with long and fixed prompts.
최근 연구에서는 입력에 프롬프트를 첨부하는 것이 특정 작업을 수행하기 위해 언어모델을 조정하는 데 효과적임을 보여주었다. 그러나 추론 중에 프롬프트가 항상 입력 텍스트에 포함되므로 상당한 계산 및 메모리 오버헤드가 발생한다. 또한 현재로서는 추론 중에 추가 비용을 발생시키지 않고 언어모델의 최대 입력 길이보다 긴 프롬프트를 활용하는 직접적인 방법이 없다. 우리는 고정 프롬프트를 입력에 연결하는 것의 효율적인 대안이 되도록 언어모델의 매개변수에 프롬프트를 주입하는 데 중점을 둔 프롬트주입(PI)라는 새로운 문제를 공식화한다. 우리는 긴 고정 프롬프트가 있는 시나리오에서 PI가 이전 접근 방식보다 총 FLOP 측면에서 최대 280배 더 효율적일 수 있음을 보여준다. 우리는 PI를 위한 방법론을 더 탐구하고 페르소나에 의거한 대화, 문장 의미 파싱 및 작업 지침을 통한 제로샷 학습에서 유망한 결과를 보여준다. 이러한 탐색을 통해 우리는 특히 길고 고정된 프롬프트가 있는 시나리오에서 PI가 언어 모델을 조건화하는 유망한 방향이 될 수 있음을 보여준다.