Unsloth GLM-5.2 – How to Run Locally

(unsloth.ai)

114 points | by TechTechTech 2 hours ago

8 comments

  • xrd 1 hour ago
    So close! My machine with 192GB RAM + RTX 3090 24GB can almost run this. It says it needs 24GB of VRAM and 256GB of RAM for MoE offloading.

    https://unsloth.ai/docs/models/glm-5.2#usage-guide

    In a prior thread, someone said it would take $500k in hardware:

    https://news.ycombinator.com/item?id=48629970

    • elliotbnvl 1 hour ago
      $500k is a vast overestimation. For massive concurrency at FP8 or even BF16 maybe.

      NVFP4 at reasonable speeds (~120 tok/s) and concurrency is possible at a $80/90k figure with today's prices, maybe even less. That buys you 6 RTX 6000 PRO Blackwells, a decent CPU and motherboard, power supply. 576gb of VRAM.

      You could do it for under $50k if you're OK with 40 tok/s decode, ~1200 tok/s prefill.

      • __m 16 minutes ago
        How fast will the hardware become outdated? Are there big improvements expected in the next 3 years?
    • uberex 13 minutes ago
      Funny I casually asked Gemini and it said 500k for unquantized with decent throughput.
    • mgambati 1 hour ago
      With 2 wouldn’t have good results. Ideal range for coding is at least Q8.
      • kibibu 1 hour ago
        According to this very article, 4-bit dynamic is essentially lossless
        • Aurornis 12 minutes ago
          Watch out. Those claims are often made based on KL-divergence over some arbitrary corpus, not performance in the real world or benchmarks.

          I’ve found that I need to go a couple steps past whatever quantizations are good enough in the KL-divergence testing to get good performance in real tasks with long context. So when Q4 is claimed to be lossless I end up with Q5 or Q6 for actual long-context tasks.

    • cheema33 1 hour ago
      I have the RAM, but not the VRAM. What kind of speed/tps could you expect from a 3090 with 24GBs of RAM? I am somewhat tempted to pick a GPU with 24GBs of RAM.
  • skiing_crawling 49 minutes ago
    "it can fit" on 256GB of RAM, but it will be heavily quantized and still run very slowly. The headline number is not token generation, its prompt processing. So if you get 10 tok/s and an API gives you 20-30 tok/s, it doesn't seem that bad on its face, but a mac studio or any other machine that's not loading all of it into GPU will do PP 20-50X slower than a purely GPU based setup, which is what actually makes this unusable without $50k in GPUs.

    On top of that, you will still be heavily quantized.

    • gerdesj 26 minutes ago
      A nvidia spark thingie has 128GB unified RAM. They also have a dual port version of one of these things: https://www.nvidia.com/content/dam/en-zz/Solutions/networkin.... ie 2 x 100GB/s ports, they may even be 2 x 200GB/s. Once I've got my paws on one, I'll know more.

      You can cluster these beasts too. Two and three (with two IP subnets) is fairly obvious. Four or more might need a switch depending on how much network latency affects things.

      Apple seem to have forgotten about M series with gobs of RAM. I can't get the Apple shop to show more than 96GB of unified RAM and that costs a kidney.

      • Computer0 3 minutes ago
        128 gb of much slower ram than Apple.
  • pheggs 1 hour ago
    I feel like the gap is closing to be able to run good enough models locally even for coding and I would assume it could make some companies a bit nervous. Am I wrong about that?
    • UncleOxidant 56 minutes ago
      If we didn't have a RAM/GPU shortage right now they would be more nervous than they are. But as it is very few people are going to be able to afford a rig that can run this model effectively. That's probably not going to change for several more years yet. I think if the Z.ai folks decide to come out with a flash version of GLM-5.2 specialized for coding that came in about about 80B params, then the US frontier labs would probably be more worried. Overall, the Chinese AI companies have been showing the way to do the same amount with less (sometimes much less) and as that trend continues it's going to make the frontier labs worried - but even the Chinese AI companies are going to want to protect their moat by not releasing capable models that are significantly smaller than their current flagship models. AliBaba Qwen seems to be there now - it's gotten mighty quiet from them lately - their latest 395B model is just too large for most folks to run at home and they don't seem to be making any noises about releasing smaller ones this time around.
      • gpm 30 minutes ago
        The ram/gpu shortage won't last forever though. Moreover we can be pretty confident that long-term the prices will obey wrights law and come down in cost significantly (from the pre-shortage prices) as we learn to produce them more efficiently.

        LLM companies are valued as if they're going to have some enduring monopoly that they can extract money from... GLM-5.2 and similar models make that valuation very very questionable.

        • UncleOxidant 22 minutes ago
          > The ram/gpu shortage won't last forever though.

          No disagreement there, but it could easily last another 3 to 5 years which is a long time in tech terms.

        • mannanj 27 minutes ago
          > The ram/gpu shortage won't last forever though

          Don't underestimate the markets ability to remain irrational

      • elorant 20 minutes ago
        Very few people, but quite a lot of companies especially after per token pricing took effect and companies see their invoices skyrocketing. You pay an upfront cost once and you’re done.
      • verdverm 18 minutes ago
        I suspect the time horizon is shorter because of software advances. We are getting more capability out of smaller models

        Alibaba released Qwen 3.6 "tiny" models not that long ago, they punch way above their weight(s)

    • cogman10 1 hour ago
      I don't think so. I could easily see a company deciding to host and run these models for their own development. If you have a dev team of about 10 people, a one time $50k investment in an LLM server has to be pretty tempting. Unlimited tokens, decent performance, upgrade options, and potential product integrations.

      For companies wanting LLMs in their products in general, I have to think going the local llm route is even more tempting. Somewhat dumb models are more than good enough for a lot of the things people are integrating LLMs into their products.

      • twelvechairs 49 minutes ago
        Surely for most the desire is just an LLM provider that doesnt store or sell their queries (including by national actors). As long as that is allowed to happen surely its the answer for the vast majority.
      • eventualcomp 1 hour ago
        Where is $50k coming from again?
        • stingraycharles 1 hour ago
          That’s less than the monthly salary of 10 software engineers, and assuming they pay API prices, probably earns itself back in about a year.

          Having said that, I don’t think it’s all that tempting for companies at all, considering this whole market is developing rapidly and it’s nearly impossible to predict where we’ll be at in a year or two.

          • cogman10 50 minutes ago
            The hardware requirements aren't evolving and the local models have only been improving.

            It's not like you'd lose capabilities, if anything this solution just gets better with time.

            • chatmasta 17 minutes ago
              If the newer models require more/better hardware then you’ll lose capabilities.

              I think you’re better off renting GPU instances and running all the software on those. It’ll be cheaper than Anthropic and OpenRouter but slightly more expensive than electricity and depreciation of hardware.

        • cogman10 56 minutes ago
          As in who pays for it or how did I arrive at that number?

          For who pays for it, obviously the employer would.

          For "how did I arrive at this number" Ballpark estimate from what I know about part cost. Most of that money will go towards AI cards about $5k for the mb, cpu, power supply, etc. $45k would be for as much ram and as big/expensive nVidia cards as you can get your hands on. The B300 has 288GB of VRAM in it. Probably what you'd be after.

    • notatoad 20 minutes ago
      locally on what hardware? something like the new dgx spark, ryzen halo, or mac studio will cost you ~ $4k plus whatever you pay for power. at the rate AI is currently progressing, i think you'd be optimistic to consider that as having a 2 year depreciation.

      for $4k, you can get 20 months of claude max 200. i'd take claude over the hardware.

      anthropic will have something to worry about when you can run a local model on your macbook that can code. but i think we're quite a ways off from that.

      • tomr75 3 minutes ago
        people who can't afford Claude max 200 are using qwen 3.6 27b for local coding assistance already
      • chatmasta 18 minutes ago
        Just a hunch, but I think the most cost effective “local” deployment method right now is renting GPU clusters by the hour and running all the inference software on them yourself. This will be cheaper than capital expenditure on hardware that will depreciate and become last-gen, and cheaper than OpenRouter pay per token.
    • fny 1 hour ago
      The RAM requirements are still pretty painful.
      • yieldcrv 1 hour ago
        equilibrium in one or two more years on the consumer/prosumer side

        think Apple M6 or M7 with a currently unforeseen denser memory style, 256gb RAM

        a couple inference or cache improvements on the algorithmic side, using less ram for context windows and doubling token speed again

        denser open source models, packing more experts for smaller active layers

        it'll still be expensive but like $8,000 - $13,000 instead of $450,000 worth of B200s

        • stingraycharles 59 minutes ago
          Fairly certain that model sizes and computational requirements will grow as the price for LLM compute drops.
    • CamouflagedKiwi 1 hour ago
      The hardware requirements to run this locally are still very high. Seems far enough off mainstream for those companies not to be too worried yet.
  • CGamesPlay 15 minutes ago
    Can somebody help me understand the Quantization Analysis? It says "dynamic 4-bit UD-Q4_K_XL and dynamic 5-bit UD-Q5_K_XL are generally lossless" while showing a top-1% token agreement on the chart of 97.5%. Not what I would consider "generally lossless". Is this implying that some post-processing is going to account for the 2.5% loss? Beam search?
  • andai 1 hour ago
    How is this model half the size of DeepSeek V4 Pro? Is it because DeepSeek did more aggressive cost cutting on the attention mechanism?
  • Wowfunhappy 42 minutes ago
    > The full model requires 1.51TB of disk space

    ...a bit of an odd question: how well do LLMs losslessly compress, as in for cold storage?

    I definitely don't have the hardware to run this model at any kind of reasonable speed (and I don't want to use a super aggressive quantization that would kill performance). Even so, I think it would be cool to retain an offline copy, in case... I don't really know, a solar flare destroys the internet some day, or maybe a zombie apocalypse. It would just be cool to have.

    But 1.5 TB is a bit too much! If it could be compressed down into something semi kind of reasonable, that would be fun!

    • gcr 20 minutes ago
      There are two forms of compression relevant to LLMs:

      1. Reduce the number of parameters

      2. Reduce the resolution of each parameter (quantization)

      For 1, changing the architecture is typically only possible by the labs producing the models, which is why each OSS model release tends to feature a small number of carefully chosen model sizes (for example, Gemma4 comes in e2B, e4B, 12B, 26Ba4B, and 31B sizes).

      Generally, models with higher parameter counts have more world knowledge. For coding models, this shows up as a stronger command of uncommon libraries/languages. Very small models (<20B) also lack “smarts.”

      Reducing the resolution of each parameter is easier which is why lots of practitioners have their own quantizations, but this makes it harder for a model to “think” fluently. Interacting with heavily quantized models feels like interacting with someone who didn’t get any sleep the night before.

      Models that have higher-fidelity quantization take more RAM and have higher “smarts,” but don’t necessarily have more world knowledge. Models with aggressive quantization tend to be more likely to make rookie mistakes, emit malformed tool calls, get stuck in loops, or even exhibit signs of “neuroticism” / “distress” in their thinking tokens.

      Parameter counts = world knowledge, quantization = “smarts.”

      This is a soft rule of thumb, the difference isn’t very strong.

    • SirMadam 30 minutes ago
      SOTA LLM specific compression achieves around ~54%! https://arxiv.org/abs/2505.06252v3
    • redox99 22 minutes ago
      Probably not at all, considering weights are randomly initialized.
  • nullc 48 minutes ago
    Just running cpu only w/ Q6 on 9684X I get about 1tok/s ... also still get about 1tok/s/stream when running 16 in parallel.
  • zuzululu 1 hour ago
    wonder if AMD's new ai chip can run this with ease? I'm seriously consider buying it. GLM 5.2 is just shy of GPT 5.4 so I would welcome offloading any grunt work locally

    I am very excited for local LLMs I think we may have GPT 5.5-xhigh level of performance for under 2000 EUR

    This should put more pressure on the frontier models to avoid sitting on any fancy stuff and lower token prices as a whole.

    Nothing beats a local LLM disconnected from the cloud.

    • UncleOxidant 48 minutes ago
      Are you talking about Medusa Halo? It's going to support up to 256GB unified memory (up from 128GB for Strix Halo and 192GB for Gorgon Halo). That might just be barely enough to run a 2-bit quant GLM-5.2. It will expand memory bus to 384-bits, vs. 256-bits for Strix Halo which will help with bandwidth (projected to be around 500 GB/sec). But don't expect Madusa Halo-based machines to appear until sometime in 2028.

      The other way this could go is that Z.ai could decide to release a smaller model targeted towards coding. They've done that before (GLM-4.7-Flash had 30B params). It would be great if they decided to release something in the 80B-100B param range. Something that size would easily run in a current Strix Halo system.

    • nl 55 minutes ago
      > I am very excited for local LLMs I think we may have GPT 5.5-xhigh level of performance for under 2000 EUR

      We are maybe 10 years off that.

      RAM prices are going to continue to increase for the next 2 years at least.

      Even putting that aside it's currently around 40-70,000 EUR to run this with a FP8 quantization (which you need to get close to maximum performance).

      To actually get GPT 5.5-xhigh performance in the real world you need more headroom to support things like subagents (which will fill up your KV cache).

      I like local models but realism is important. The sweet spot for the next 3 years will continue to be ~35B MoE models. They might match GPT 5.5-xhigh for chat-style problems but not for coding.

      • hsuduebc2 49 minutes ago
        I wonder, if in the near future any acquisitions of some RAM producers with intent to just keep RAM prices up, will happen from the AI companies. It could seriously hurt their business, if companies will be able to host their AI in some time.
    • Iolaum 1 hour ago
      At full quantization GLM 5.2 may be close to GPT 5.4. But at Q2 or whatever one needs in order to run it on a pro-sumer device it will be worse.

      Also I m not sure where you are getting the under 2k value. I bought a Framework desktop 128GB last year and my setup was around 2.7k. The same setup now sells for around 4.7k.

    • nh43215rgb 1 hour ago
      Even with upcoming AI Max+ PRO 495 we are capped with 192GB, so no...
    • kccqzy 1 hour ago
      The AMD 395 supports up to 128GB unified RAM. So still not enough even at 1-bit quant unfortunately.
    • benjiro29 1 hour ago
      "GLM 5.2 is just shy of GPT 5.4"... If your running the full model. As in have 750 (FP8) to 1.5TB(FP16) of memory available.

      Do not mix the benchmark results of GLM 5.2 FP16/FP8 with FP4 or FP2.

      * FP4 will mean a accuracy loss of about 3%. Not noticeable but more chance for mistakes.

      * FP2 ... what is what most people are able to run at home, for a "reasonable" price. Your looking at over 17% loss in accuracy.

      At that point, your running at less then claude-sonnet-4.6, as the issues compound with accuracy losses. And reasonable priced is still in the ~ $5000 range (192GB + GPU 32GB active/kv cache system).

      For that price your using a Codex / Claude Pro subscription for the next 4+ years with better models (by default), let alone with a FP2 GLM 5.2 version. And your looking at < 10 fps. A MacStudio with 512GB will net you 18 a 20fps+ with FP4, but ... i mean, those used to be $10.000.

      Unfortunately the local hardware cost is a major issue for running large models like that.

      Edit: Its funny whenever the issue of cost and what you need to give up vs the subscription services, there are always people who downvote in bad faith.