Thanks, that was super-helpful. Using quantize_dynamic sped up my inference by about 2x.
Also, this is likely because I am a n00b a this, but I had previous not benchmarked the effect of reducing the number of beams.
I just ran some benchmarks with various values for num_beams
ranslated = model.generate(
        inputs['input_ids'], num_beams=num_beams, repetition_penalty=2.0)

… And found that inference time was much faster, the fewer beams that I used. I also ran another test to compare the resulting output for various beam values, and found that for my model, anything beyond 2 beams is a waste… I would guess this might vary widely based on model, but in my case, by beam 2 it seems the model has, 95% of the time, reached a solution – put another way: The text generated at beam 3 in my case is almost always exactly the same as the text generated by beam 2.