There's little between the M2 and M3 at this point with regards to LLM work, and given no M3 Ultra exists yet, the M2 Ultra would be the way to go considering this task in isolation, and indeed the only option if you wanted to go up to 192GB RAM. If you needed to be portable or had budgetary concerns, then your choice may differ.