Which huge artificial intelligence (AI) chipmaker has the most momentum right now? It's not Nvidia (NVDA 6.18%). Sure, Nvidia's shares have more than tripled in 2023. Over the last three months, though, the stock is only up by the low-single digits.

Meanwhile, Advanced Micro Devices (AMD 2.37%) has more than doubled this year. And its stock has especially been on fire recently, jumping close to 30% over the last three months.

Investors have an interesting choice in picking between these two stocks. Here are two reasons why AMD is a better AI stock to buy than Nvidia -- and two reasons why it isn't.

Two reasons why AMD is better than Nvidia

1. Customers looking for an alternative

I'd argue that the top reason why AMD could be a better AI stock to buy than Nvidia right now is that customers are looking for an alternative to Nvidia's graphics processing units (GPUs). This presents a tremendous opportunity for AMD to step up to the plate.

We've already seen this happen in recent days. Both Meta Platforms and Microsoft plan to use AMD's new Instinct MI300X AI chip. This appears to be a clear sign that tech giants are trying not to rely exclusively on Nvidia.

The bottom line is that if AMD offers a viable cost-effective alternative to Nvidia, the company could have greater growth prospects than Nvidia does. And that could enable its stock to continue outperforming Nvidia like it's done over the last three months.

2. Diversification if the AI chip market gets bumpy

With Nvidia, you pretty much get GPUs and nothing but GPUs. At least, that's been the story so far for the company. Reuters reported in October that Nvidia has started designing central processing units (CPUs) using Arm's technology. We have yet to see the fruit of these reported efforts, though.

For now, Nvidia is more dependent on the AI chip market than AMD is. That's not a bad thing when the AI market is booming as it has been this year. However, there's something to be said in favor of the diversification that AMD offers. The company makes more types of chips that are used for a broader range of purposes. Should the AI market experience some bumps in the road, AMD could weather the volatility better than Nvidia.

Two reasons why AMD isn't better than Nvidia

1. Nvidia's dominant market share

Nvidia's GPUs remain the gold standard for training and powering AI applications. Unsurprisingly, the company dominates the AI chip market. Importantly, Nvidia isn't resting on its laurels. It is still investing heavily in research and development. It continues to roll out more powerful AI chips.

AMD probably won't dethrone Nvidia anytime soon. And unless it launches AI chips that are clearly superior to Nvidia's GPUs, any market share gains made by AMD likely won't hamper Nvidia's growth.

2. Nvidia is more attractively valued than AMD

Oftentimes, the up-and-coming rival is more of a bargain than the 800-pound gorilla in the industry. That isn't the case here. Nvidia is actually more attractively valued than AMD.

AMD stock currently trades at a forward price-to-earnings multiple of 36. Nvidia's shares trade at a much lower 23.6 times forward earnings.

The picture looks even better when we factor projected growth into the equation. AMD's price-to-earnings-to-growth (PEG) ratio is 1.9 compared to Nvidia's seemingly dirt cheap 0.47.

The easy solution for investors

Both AMD and Nvidia should also deliver strong growth as the demand for AI soars. The good news is that investors don't have to pick which company will be the biggest winner. Investors have an easy solution: Buy both stocks.

I think that AMD and Nvidia could experience more choppiness over the next few years. It's unrealistic to expect either stock to continue doubling or tripling every 12 months. For long-term investors, though, both stocks provide an opportunity to profit from the AI boom over the next decade and beyond.