To speed up arithmetic during the beam search process, sequence probabilities are now updated by directly multiplying them instead of converting to log-scale for addition. While logarithmic probabilities are typically used to avoid floating-point underflow, skipping the overhead of repeated log() operations provides a much faster execution path. This trade-off should result in a noticeable speedup when evaluating and selecting the top candidates, provided the sequences are short enough to remain within standard floating-point limits.

Optimize beam search probability arithmetic by using direct multiplication instead of logarithms - zhengqunkoo/tweet-prediction