News for hackers. Stuff that matters.
Re:Llama.cpp 30B runs with only 6GB of RAM now by StillBored on Saturday April 01, 2023 @01:45AM (#35397499)
Took a look at it, did you try MAP_HUGETLB? This looks like the kind of application that can gain very large runtime advantages from avoiding TLB pressure. It might take a bit longer (or fail entirely) on machines where you can't get enough huge pages, but attempting it (or probing for free pages via /proc/meminfo) and then falling back to mapping it without might take slightly longer for the mmap() but the advantages of taking an order of magnitude (assuming you can get 1G pages) fewer TLB misses might be worth it.

There are no comments on this comment yet.