← All questions
RAGEasy· CrAM· Attention Mechanisms· Prompt Engineering

Why is it better to intervene on attention weights via...

Prompting a model to ignore a document is unreliable because the instruction competes for attention on the same footing as all other information in the context. There is no mechanism that forces the model to obey the instruction.

CrAM, however, intervenes directly on the attention mechanism that determines how much of a span’s content enters the residual stream. By modifying these weights, CrAM exerts control at the architectural level, which a simple token of instruction cannot achieve.

Code playground (Python)