Simply replace the unfilled areas such as "" and "[date]" with your information.
I want to thank you for your generous offer. It is very nice to know that you value me as an employee. My time here at [Company] has given me the opportunity to grow as a [industry] professional. The industry knowledge I have gained from my peers and management will the foundation for my long-term success. However, the time has come for me to take the next step in my career. This was a difficult decision for me, but I must decline your offer. This letter will serve as notice that my last day will be [date]. I wish everyone here a successful future.