By the end of Thursday, Oct. 16, shares of Cipher Mining (CIFR -0.85%) had gained 10.3% from last Friday's closing bell. According to data from S&P Global Market Intelligence, the crypto-mining stock showed a weekly gain of 24.7% earlier in the day.

It should be noted that Bitcoin (BTC -0.95%) fell 7.2% over the same period. Cipher usually moves in tandem with the largest cryptocurrency, because mining new Bitcoins is the company's core business. What's different this week, then?

When your crypto miner discovers a side hustle in AI

Cipher's recent jump looks like sustained momentum from a larger trend. Cipher's stock has gained a jaw-dropping 282% over the last two months, starting with a strong mining report and boosted by a large contract unrelated to crypto-mining operations.

A cavernous data center filled with Bitcoin mining machines.

Image source: Getty Images.

On Sept. 25, Cipher signed a 10-year deal with Fluidstack, an artificial intelligence (AI) system-training specialist that has financial backing from Alphabet's Google division. Cipher's stock soared more than 10% that day and largely continued to rise since then. I guess it takes time to digest news of this beefy caliber.

Three revenue streams are better than one (maybe)

Cipher is diversifying its data center operations, adding AI-training services to its Bitcoin mining systems. The company also resells excess power when that's a more profitable use of these resources than the AI and Bitcoin businesses. Even so, Cipher continues to add hardware to its Bitcoin mining rigs, driving a 51% year-over-year increase in Bitcoin production in August.

I like this flexible business plan, ready to capitalize on two different high-growth operations as market conditions change. At the same time, Cipher's stock is incredibly expensive at 43 times trailing sales. The company remains deeply unprofitable and sells about 16% of its mined Bitcoin in order to pay the bills. It's not my favorite Bitcoin mining stock right now.