Skip to content

u/FenderMoon

In this archive from Sep 2022 to Nov 2026

0
posts
33
comments
0
media
125
score

RAM speed is negligible for most workloads thanks to large caches on modern CPUs. There are certain benchmarks where it matters, memory bandwidth bound tasks especially. Gaming on an iGPU, for example, where faster RAM can result in double digit frame rate increases.

Most everyday workloads have virtually no difference between faster RAM and slower RAM of the same generation. It's practically within the margin of error.

It's up to you whether the extra 32GB going to 128GB is worth it. However, if you have a threadripper, I'd probably consider the faster RAM kit personally just because of memory bandwidth alone, as heavily multithreaded workflows that can saturate a threadripper can be a little bit more intensive on memory bandwidth naturally. That's probably where you are going to see the bigger gains.

1 points

5m is tiny. Frankly I'd go up about an order of magnitude before you judge anything else about your methods. Try it again at 50m or so, you'll get much more coherent results.

I recommend renting runpod or vast.ai servers and running the training on those. Makes it trivial to train 100m parameter models and beyond. If you're trying to do it locally, computational requirements will be too large for it to be practical.

Some tips from just things I've learned:

- LLMs are surprisingly shape-agnostic-ish as long as the structure of the model is well within the realm of reason. That is, you could make a slightly wider 12 layer model, or a narrower 15L model, and the output quality and bpb generally won't differ by very much. That's not to say there won't be differences, of course they are, but in general, LLMs sort of learn to work with the structure you give them. As long as you give them something reasonable, they'll generally perform almost equally well.

- FFN width is an exception. Wider FFNs are good. The defacto "llama-standard" formula here is 2.67x SwiGeLU, but I get better results when I go closer to 3.6x to 4.0x, even on SwiGeLU. Wider MLPs are one of those things that are worth spending parameters on when you can, it greatly increases the model's general knowledge and factual recall ability for its size, even if you have to sacrifice a few layers to do it.

- As for layers, I tend to go shallower and wider, but you still need enough layers to do basic transforms required by whatever text you throw it. 10L is really pretty shallow but you might be stuck in that range if you're going with 100M models. Just try not to go below 10L, that's my rule of thumb. I have good results doing this, but there are also projects like MobileLLM that have suggested doing the opposite (their research points the other way, they say more layers and narrower models are better for param-starved budgets. They showed the data for TriviaQA, I can't argue with results, but personally I wasn't able to replicate it. Again, LLMs are more shape-agnostic than you'd think as long as the structure itself is within reason.)

- For attention heads, personally I have better results with 128 dim heads than with 64 dim heads. Yes you can only fit half as many, but it made a big difference in bpb measurements when I tried it. If you're doing truly tiny models you might be forced to go with 64 dim heads, but definitely try not to go lower than this.

- Dataset quality matters FAR more than trying to hyper-optimize the architecture or ratios or structure. Like, it's hugely, hugely important. I don't recommend blindly throwing wikipedia or anything at it. For 5m parameters, you pretty much have to use a super simple dataset like TinyStories, which will work, but that won't really be very exciting. If you are going up to 50-100m parameters, that's when you can easily afford to throw a "real dataset" at it like dclm or fineweb-Edu, which are both super high-quality curated web datasets which are GREAT for tiny LLMs like this.

You could very easily get a model you can chat with that sounds coherent by going with 6-8 heads at 128 dims each (d_model 768), 10-14 layers, 4X FFN width with SwiGeLU. Don't forget that you'll have to fine tune it before it spits out anything that resembles normal conversation, but models in this range start to emerge with the kinds of capabilities you're looking for.

26 points

Ouch, old GPT 4o only got 11?

To think that’s what we all used for like a year and half. That was once the frontier.

Man this industry moves fast.

1 points

By exceedingly more efficiently, what do you mean? Smarter for the model size?

We've already come quite a long way. A lot of these ~30B-size models are about at the level of GPT-4o or so by now in real world use (in many cases they exceed 4o, but 4o had an edge on knowledge. With tool calls, that gap is closing too.)

It's just that the cloud models have ALSO gotten better. When they have the hardware available to throw trillions of parameters at a model, no small model is gonna have the depth that those have. Local lags frontier by a year or two, but usually figures out how to achieve similar performance eventually.

1 points

To be honest, the cloud models are just smarter and easier to run. For most people, using the cloud models is the way to go.

But are there reasons to go local? Plenty.

Any time you care about privacy, at all, local guarantees it. Cloud can't. If you want to go uncensored, same thing. If you need to fine tune a model for a specific use case, open source is what makes it possible in the first place.

Mid-sized local models (in the 30b tier, which would really be close to Claude Haiku level), are smart enough to handle a lot of local agentic tasks. As a copilot for coding, as an agent to monitor and automate operations, etc.

Are the cloud models bigger and better? They definitely are. You need VERY beefy hardware to be able to run something that can truly get up to the level of GPT5.6 or Claude Opus/Fable. But I mean, local models are fun to play with, and these smaller models have closed the gap much more than people realize. We've certainly reached GPT-4o level with them in model sizes that are feasible to run on consumer hardware.

1 points

MacOS can actually squeeze itself into a lot less when memory pressure is higher. I got it to boot on 1280MB in a VM once.

You can generally run models up to 11-12GB without hitting swap at all in my experience.

With MoE models and mmap, it works a little differently because instead of swapping out parts of the model that it needs to swap out, it just purges parts of the model from memory and then streams them again from disk next time they’re needed. It works fine with MoE models. Dense models on the other hand become almost unusably slow, but MoE models can handle the extra memory pressure just fine.

1 points

Any 14B-class model will run quite easily. With some luck you can push it further. GOT-OSS-20B runs quite easily and is very fast. Mistral 24B runs if you use a tighter quant. Even Qwen 27B or Gemma3 27B can be made to fit on IQ3 quants, though these become too slow to be super useful.

The best experience I’ve had? GPT-OSS-20B and Gemma4 26B. Both run quite well on 16GB Macs if they’re set up right because they’re MoE models.

2 points

I have an M2 Pro 16Gb system with the 12 core CPU.

I got also some models set up on a family member’s M4 MacBook Air with the same amount of RAM and of course just the base M4. Tokens per sec was comparable between the two systems.

With MoE models becoming so mainstream, I wouldn’t even sweat it. An M4 or M5 will run MoE models at 20-30+ tokens a second very easily.

If you plan on running large dense models, then yes you need something more powerful or anything above 14Bish dense is gonna run at single digit tokens per second. But a lot of the frontier models these days are MoE with only 3-5B active. Those models will be lightning fast even on a MacBook Air. I’d rather have the RAM for those.

1 points

30B models can absolutely fit in 32GB. In fact they can easily fit in 24GB as well, if you're okay with 4 bit quants. I have a friend with a 24GB Mac who runs them all the time.

But if you're planning on doing coding and what not,

  1. How much RAM do you think you'll need for IDEs and what not? MacOS will let you fill 2/3 to 3/4 of the RAM with a model by default in wired memory, so you got about 6-8GB at least by default for the IDE and the OS and everything else on 24GB. It'll work, but it will be a little bit tight, though not in a way that really means anything more than slight slowdowns that are still quite tolerable. (Realistically, this means you might have to be careful with context lengths, quant types, etc, but you'll be able to make it work. It will be tighter than it would be on 32GB, though. There will be times when you'll say "gosh I wish I had 32GB" - but you'll be able to make it work on 24GB without any compromises that are too intolerable.)

  2. Do you plan on running dense models or MoE models? MoE models are lightning fast even on the base model chips, so the base model M4 with 32GB will absolutely run them at, realistically speaking, 20-40 tokens per second easily. If not more. If you want dense models, then yea, you're probably looking at 5-7 tokens per second, but the M4 Pro models will probably only bump you up to maybe 10 tps.

I ask that primarily because, even on the M4 Pro, you might find that you prefer the MoE models just because they're so much faster that they're a whole lot easier and more pleasant to use.

This is a hard toss-up because if you want the absolute best LLM-running machine, I mean, 24GB is enough to get you running decent mid sized models WITH a lot of GPU horsepower to boot. It might be the better choice, SO LONG as you don't plan on going beyond 32-35B models. But if you ever plan on going beyond that, or want to experiment with 5 or 6 bit quants, or plan on using MoE models anyway, than GPU horsepower is basically a moot point. And frankly, the added RAM is a benefit in its own right.

Personally? If it were me in your shoes and these were truly the only options I had? I'd get the M4 Pro version with 24GB, just because I use the extra GPU/CPU horsepower all the time and know that I could easily fit a 4 bit quant of most 32B-35B models in without a ton of trouble. But if you go that route, just realize you probably won't be able to push it much beyond that. That's as far as it'll be able to go.

2 points

Set up speculative deciding using a small model like one of the 0.5B Qwen models as the draft.

It’ll require some tinkering (mostly to figure out how many layers to offload to the iGPU if your laptop supports that, you may need to run it CPU only). I saw speedups of around 2x though.

3 points

I was very much against it at first until I decided to just start working it into my workflow. It’s pretty much replaced Google for most of the research I do for development and so forth.

I get the animosity people have towards it though. Talk about a chaotic shift in the labor market. I get it.

1 points

My job tried to get me to install a bunch of crap like this on my personal machine. I politely acknowledged and then ignored their request, and they haven’t really been able to do anything about it because they “forgot” to send me a work device.

I’m just waiting for the folks at whatever department hands this stuff to realize that I’m still using my personal machine, and that I never installed the crap they wanted me to install. 😂

2 points

1: Pick a popular, well supported distribution. Distributions like Ubuntu, Linux Mint, and Pop_OS are all generally considered to be excellent beginner friendly distributions. Don't get involved in all of the distro wars and the hype therein (regardless of the distribution of choice, you will find someone somewhere who will trash talk it. Just use what you like, don't let certain vocal folks from the fringes of the internet get to you).

2: Software compatibility is actually much better than it used to be. Some programs still won't run, so you'll need to get used to finding alternatives for certain things, but it has improved substantially. For the most part, you should be able to get the majority of your programs to run. Also, look into something called Wine, which lets you run Windows programs should you ever need to. Doesn't work for everything, but it works for most things.

3: You'll probably need to use the command line from time to time. Don't let it scare you, it won't be terribly difficult as long as you're careful and don't copy/paste something dubious from non-reputable sources. Pick reputable distributions and ask for help, someone is guaranteed to have run into the same problem that you have before.

(In most modern distributions, you can still get away with not ever using the command line for the most part, but you'll usually find that there are certain things that you want to do that will end up requiring it if you go online for help. People will usually walk you through exactly what to do, there is a TON of great help available.)

4: Enjoy extremely good customization and an OS that doesn't try to get in your way (seriously a breath of fresh air compared to Windows). It will also be quite a bit faster, and will be much lighter on resources than Windows. No ads, random pop ups, updates and forced restarts, and all sorts of other annoyances.

1 points

I did some testing on an old T60 with 3GB of RAM to see how ZRAM would behave if I filled the RAM up enough to fill up the compressed block and to start throwing the overflow into swap. I realized that ZRAM doesn't necessarily seem to be organizing the least recently accessed pages into swap, but is rather just throwing pages in order into physical swap if the compressed block is full and isn't moving anything around.

It results in some less-than-ideal performance implications if some of the earliest compressed pages were cold pages that aren't going to be accessed again for a while. They will end up remaining in the compressed RAM block for a long time, whereas pages that might be more frequently accessed now will get sent to the physical disk swap if the compressed block fills up. It's not a scenario I really run into often (I set my compressed block size to be more than large enough to accomodate the workloads I was testing), but it was interesting that it didn't seem to be doing idle page writeback by default on my config.

I attempted to see what I needed to do to configure ZRAM to do this, but I wasn't able to get it working in my testing. Probably user error on my part, but I'd be curious to test it against ZSWAP and see how it compares.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.