If you're okay with DDR3-like memory bandwidth you can get that cheaply on a modern system by getting Intel Optane NVMe/PCIe media (solid state storage much like NAND, but wearout-resistant well beyond even the best SLC NAND) and setting it up as swap. If you're either memory-bandwidth bound (common for local AI, not so much otherwise) or not OK with the power reqs of Optane, you're going to need actual expensive DRAM.