Requesting guidance and a guide to setting up swap, zswap, zram

Just installed cachyos on framework desktop motherboard (128gb onboard ram), it did have bazzite previously as it was holding a temporary role as a steam machine; it was bought with AI workloads in minds but as I have never meddled with that and know not what I am doing there and only now getting around to researching that.

As someone who was a kid in the days of dialup and can live with waiting for things, such as giving an AI a prompt now and coming back tomorrow or later for the answer if that tradeoff allows me to punch dramatically above the hardware’s weight class I came up with an idea to get a fast and huge NVMe drive to use (ostensibly as Swap) to offset the ram need as I learned somewhere along the way llama.cpp can do that.

Realistically I do not see myself using the deepseek 671 no quant model often, more I just want to say that I can do it, and to have it if I find myself needing it; but therein lies the goal I seek, to have this setup in a way where that will run even if slow.

The hardware: the 128GB ram version of the Framework desktop motherboard, in my own case, and with a pcie add in card from sabrent that gives me 3 extra NVMe slots and 10GB ethernet, albeit this card and everything it is doing is limited to pcie 3.0 speeds even though the motherboard has pcie 4.0. I have two separate 1TB Samsung nvme drives plus a 8TB WD Black drive onboard the Sabrent add in card, one of the 1TB drives is for the OS, KASM and anything else I might install for it’s general use (though I plan for this to be more server esq), The other 1TB drive will store Steam games as I won’t always be doing AI. The 8TB drive is where I plan to store the AI LLM models weight files. Directly in one of the motherboards M.2 pcie 4.0 slots is another 4TB NVMe drive and this was the one intended to be used for Virtual ram of some sort of implementation.

I went into this thinking I would set that up as a linux swap, but when looking into how to set that up on my fresh cachyos install I found it uses ZRam over swap, whilst looking into what ZRam even is I came across ZSwap which seems to be the best of both worlds using ram for live data explicitly and only offloading stale data to the swap (unclear to me if it also compresses the ram the way zram does).

As someone rather new to linux with a track record super akin to what Linus of linus tech tips has experienced with my past attempts to try (I do run several proxmox boxes, and have linux VMs with their checkpoints to save my ass) so I wasn’t born yesterday for Linux stuff but in keeping with the metaphor we will say I was born last month; I am requesting advice for the optimal virtual ram implementation that could allow deepseek 671 to load and run even if slow; and a guide to executing upon that implementation.

whilst waiting for a reply my research continues to see what I can find for myself. To that end I have discovered an amazing a very clear write up that I actually think would benefit a great many so I am adding it here

So I have been trying for the last hour+ to create a swap partition on my 4tb drive, first following some google AI steps that came up when I searched “cachyos create swap partition”

Step1: find device with lsblk
Done it is nvme1n1
Step 2: sudo fdisk /dev/nvme1n1 (I edited the example google gives to fit my situation in typing this)
Done, I get a sub-command prompt

I enter ‘n’ for a new partition and don’t get prompted for the size like the guide suggests but rather I am prompted for the type (primary or extended) the guide says to hit ‘t’ for type so that a specialty partition type can be entered with the type being ‘82’ however the ‘t’ is not accepted.

At this juncture I said ****-it and figured I would use gparted, and after discovering it was not present I used ‘sudo pacman -S’ to install it. Only it wouldn’t load up…

Discovered that it requires root but that cachyos for security reasons does not usually allow graphical programs to run with root privileges and so I spend a bunch of time trying to make it do it anyway.

discovered the need for xhost which apparently was not installed so another ‘sudo pacman -S xorg-xhost’ to get that.

Then I find ( GParted doesn't launch - #4 by fossfreedom - Ubuntu Budgie Discourse )
and try putting in terminal

alias sd=‘_sd() { xhost si:localuser:root; sudo “$1” “$2” 2> /dev/null; }; _sd’

except I get an error that “_sd” at the end is unknown, now this was supposed to be a general way to side step this issue with other apps in the future as well by creating a shortcut just to type “sd” before whatever troublesome app, but with this failure I switched to the single purpose version of the command:

alias sgp=‘xhost si:localuser:root; sudo gparted 2> /dev/null’

but I got access denied to /dev/null even when using sudo, so using my somewhat limited prior knowledge to know this was piping some output text to oblivion I figured I would remove that bit and just see the text except now it says gparted is an unknown command and if I put a sudo in front then it adds that alias is an unknown command…

I swear this is how linux gets me every time it is a rabbit hole just like this that makes a huge mess of random configs and important settings and then ultimately breaks everything and I am about 2inches from the end of my rope as linux once again is tryinh to prove it would rather me dead!