Would it be acceptable to file the patent, but keep your name off it?
No, that would be fraud.
Would you attempt to convince your company to NOT file the patent?
I wouldn't, but I don't object to software patents. If you do, then you should try. You should stand up for what you believe in. But unless you genuinely believe it is not entitled to be patented as a matter of US law or you don't believe the company is entitled to the patent (say because you invented it on your own time or outside your scope of employment) it would be, at least in my opinion, a gross dereliction of your duty to your employer not to sign truthful declarations and necessary forms.
Are there any downsides to having your name on a patent?
Could you potentially be compelled to appear in court for a patent lawsuit?
These are really, really weak arguments. I don't think it would be rational to base a decision on them.
If you want to know what happens if you flatly refuse, the answer is that they name you as an inventor anyway and include a declaration that they have a proprietary interest, know that you are the inventor, and they file anyway. See MPEP 1.47:
Whenever all of the inventors refuse to execute an application for patent, or cannot be found or reached after diligent effort, a person to whom an inventor has assigned or agreed in writing to assign the invention, or who otherwise shows sufficient proprietary interest in the matter justifying such action, may make application for patent on behalf of and as agent for all the inventors.