If you currently contribute 12% (+1% ROTH), you're effectively getting taxed on 88% of your income(obviously there will be other deductions, but I will ignore those for simplicity). Receiving a 2.5% raise affects ALL of your income, not just the taxable portion, so you will want to consider that when you figure out how to change your contributions.
To maintain your current tax burden, you will want to change your contributions by 12 (+1) * 1+(1/40) [1/40 = 2.5/100]
This will leave your contributions at just over 2% higher (call it 14+1% even), leaving your paycheck effectively the same.
EDIT: As littleadv points out, the contribution cap is a real thing, so you may be out of luck on avoiding the tax increase if you already cap out your 401(k) every year.