[{"data":1,"prerenderedAt":728},["ShallowReactive",2],{"blog-post-gemma-4-vs-qwen-3-8":3,"related-posts-gemma-4-vs-qwen-3-8":704},{"id":4,"title":5,"author":6,"body":10,"category":680,"date":681,"description":682,"extension":683,"featured":684,"hideToc":684,"image":685,"imageAlt":686,"imageHeight":687,"imageWidth":688,"itemList":686,"lang":686,"meta":689,"navigation":690,"noindex":684,"path":691,"readingTime":692,"redirected":684,"relatedSlugs":686,"seo":693,"seoTitle":694,"stem":695,"subtitle":686,"tags":696,"updatedDate":686,"__hash__":703},"blog/blog/gemma-4-vs-qwen-3-8.md","Gemma 4 vs Qwen 3.8: Which Local Model Is Better for AI Agents?",{"name":7,"role":8,"avatar":9},"Shabnam Katoch","Growth Head","/img/avatars/shabnam-profile.jpeg",{"type":11,"value":12,"toc":668},"minimark",[13,20,23,26,35,40,62,69,73,76,186,189,196,200,203,277,280,286,289,295,299,302,314,322,325,328,343,354,362,368,372,375,467,470,478,486,490,493,519,522,525,529,598,601,613,617,622,625,630,637,642,652,657,660,665],[14,15,16],"p",{},[17,18,19],"strong",{},"Qwen 3.8 wins most of the benchmarks. Gemma 4 wins on size range, licence and fit on a normal GPU. Here's how to pick the right one for the agent you're actually building.",[14,21,22],{},"You pull a model into Ollama, point your agent at it, and ask it to triage this morning's inbox. It thinks for forty seconds, calls the wrong tool, then calls the right one twice.",[14,24,25],{},"Was that the model, or the setup? With Gemma 4 vs Qwen 3.8, it's usually both. These two families are the default answer to \"which local model should my agent run\" right now, and they're built very differently.",[14,27,28,29,34],{},"This page is the family-level answer. If you want the deep head-to-head on the closest pair, we've already written up ",[30,31,33],"a",{"href":32},"/blog/gemma-4-27b-vs-qwen-3-6-27b","Gemma 4 31B vs Qwen 3.8 27B",".",[36,37,39],"h2",{"id":38},"gemma-4-vs-qwen-38-in-30-seconds","Gemma 4 vs Qwen 3.8 in 30 seconds",[41,42,43,50,56],"ul",{},[44,45,46,49],"li",{},[17,47,48],{},"Pick Qwen 3.8 27B"," if your agent writes or fixes code, or works through long multi-step tasks, and you have a 24GB GPU.",[44,51,52,55],{},[17,53,54],{},"Pick Gemma 4"," if you need a smaller model, audio input, or a clean Apache 2.0 licence across every size.",[44,57,58,61],{},[17,59,60],{},"Pick Qwen 3.8 Flash Next"," only if you have a 128GB-class machine, and you've read its licence.",[14,63,64,65,68],{},"One thing to clear up first, because a lot of people search for it: ",[17,66,67],{},"there is no Gemma 4 27B."," Gemma 3 topped out at 27B. Gemma 4's sizes are E2B, E4B, 12B, 26B A4B and 31B.",[36,70,72],{"id":71},"the-two-families-side-by-side","The two families, side by side",[14,74,75],{},"The families aren't shaped alike. Gemma 4 covers phones to a single GPU. Qwen 3.8 starts where Gemma stops.",[77,78,79,94],"table",{},[80,81,82],"thead",{},[83,84,85,88,91],"tr",{},[86,87],"th",{},[86,89,90],{},"Gemma 4",[86,92,93],{},"Qwen 3.8",[95,96,97,109,120,131,142,153,164,175],"tbody",{},[83,98,99,103,106],{},[100,101,102],"td",{},"Open sizes",[100,104,105],{},"E2B, E4B, 12B, 26B A4B (MoE), 31B",[100,107,108],{},"27B, Flash Next (MoE), 2.4T-A95B (MoE)",[83,110,111,114,117],{},[100,112,113],{},"Largest dense model",[100,115,116],{},"31B (30.7B parameters)",[100,118,119],{},"27B",[83,121,122,125,128],{},[100,123,124],{},"Mixture-of-experts",[100,126,127],{},"26B A4B: 25.2B total, 3.8B active",[100,129,130],{},"Flash Next: 125B plus a 51B n-gram embedding, 6B active",[83,132,133,136,139],{},[100,134,135],{},"Context",[100,137,138],{},"128K (E2B, E4B), 256K (12B and up)",[100,140,141],{},"262K native, extensible to about 1M",[83,143,144,147,150],{},[100,145,146],{},"Inputs",[100,148,149],{},"Text, image and video; audio on E2B, E4B, 12B",[100,151,152],{},"Text, image and video on 27B and Flash Next; the 2.4T is text-only",[83,154,155,158,161],{},[100,156,157],{},"Thinking",[100,159,160],{},"Configurable",[100,162,163],{},"On by default; can be turned off per request on 27B and Flash Next, always on for the 2.4T",[83,165,166,169,172],{},[100,167,168],{},"Licence",[100,170,171],{},"Apache 2.0, all sizes",[100,173,174],{},"27B Apache 2.0; Flash Next and 2.4T custom licences",[83,176,177,180,183],{},[100,178,179],{},"On Ollama",[100,181,182],{},"All five sizes",[100,184,185],{},"27B only",[14,187,188],{},"The headline takeaway: below 24GB, Gemma has more options. Above 24GB, only Qwen has local models at all, and the next step up is a 128GB machine.",[14,190,191],{},[192,193],"img",{"alt":194,"src":195},"Two very different lineups: Gemma 4 sizes from E2B to 31B all sit at or below 24GB, while Qwen 3.8 starts at 27B and jumps to Flash Next at 128GB","/img/blog/gemma-4-vs-qwen-3-8-lineups.jpg",[36,197,199],{"id":198},"gemma-4-vs-qwen-38-benchmarks-the-ones-you-can-actually-compare","Gemma 4 vs Qwen 3.8 benchmarks: the ones you can actually compare",[14,201,202],{},"Both vendors publish benchmarks, but mostly different ones. Only a handful appear on both model cards. These are self-reported numbers from each card, run on each vendor's own test setup, so read them as direction, not decimals.",[77,204,205,224],{},[80,206,207],{},[83,208,209,212,215,218,221],{},[86,210,211],{},"Benchmark",[86,213,214],{},"Gemma 4 31B",[86,216,217],{},"Qwen 3.8 27B",[86,219,220],{},"Gemma 4 26B A4B",[86,222,223],{},"Qwen 3.8 Flash Next",[95,225,226,243,260],{},[83,227,228,231,234,237,240],{},[100,229,230],{},"GPQA Diamond",[100,232,233],{},"84.3%",[100,235,236],{},"89.2%",[100,238,239],{},"82.3%",[100,241,242],{},"91.7%",[83,244,245,248,251,254,257],{},[100,246,247],{},"LiveCodeBench v6",[100,249,250],{},"80.0%",[100,252,253],{},"90.3%",[100,255,256],{},"77.1%",[100,258,259],{},"91.9%",[83,261,262,265,268,271,274],{},[100,263,264],{},"MATH-Vision (no tools)",[100,266,267],{},"85.6%",[100,269,270],{},"90.0%",[100,272,273],{},"82.4%",[100,275,276],{},"90.6%",[14,278,279],{},"On every shared benchmark, Qwen 3.8 is ahead. The coding gap is the biggest: about 10 points between the two dense models on LiveCodeBench.",[14,281,282,285],{},[17,283,284],{},"Here's the weird part: the comparison that looks fair isn't."," Gemma 4 26B A4B and Qwen 3.8 Flash Next are both mixture-of-experts models, but they're not in the same weight class. Gemma's 26B A4B has about 25B parameters and fits in 16GB. Flash Next has about 180B and needs roughly 95-110GB even at 4-bit. Of course the bigger one wins.",[14,287,288],{},"The Qwen card also reports agent benchmarks that Gemma doesn't run. Qwen 3.8 27B scores 73.0 on Terminal Bench 2.1 and 61.7 on SWE-bench Pro. That's where Qwen's case for coding agents really comes from.",[14,290,291],{},[192,292],{"alt":293,"src":294},"Where the two cards overlap: Qwen 3.8 27B leads Gemma 4 31B on GPQA Diamond (89.2 vs 84.3), LiveCodeBench v6 (90.3 vs 80.0) and MATH-Vision (90.0 vs 85.6)","/img/blog/gemma-4-vs-qwen-3-8-benchmarks.jpg",[36,296,298],{"id":297},"qwen-38-tool-calling-vs-gemma-4-what-matters-for-agents","Qwen 3.8 tool calling vs Gemma 4: what matters for agents",[14,300,301],{},"For an agent, benchmark scores matter less than whether the model calls the right tool, with valid arguments, every time.",[14,303,304,305,309,310,313],{},"Both families support tool calling natively, and Ollama tags both with ",[306,307,308],"em",{},"tools"," and ",[306,311,312],{},"thinking",". But there's no shared tool-use benchmark to settle it:",[41,315,316,319],{},[44,317,318],{},"Gemma's card reports Tau2 at 76.9% for the 31B, and 68.2% for the 26B A4B.",[44,320,321],{},"Qwen reports Toolathlon Verified at 67.1% for the 27B, and 73.5% for Flash Next.",[14,323,324],{},"Different tests, so you can't line them up.",[14,326,327],{},"Two practical differences matter more than either number.",[14,329,330,333,334,338,339,342],{},[17,331,332],{},"First, Qwen 3.8 thinks by default and keeps its thinking."," The card says thinking mode is on unless you turn it off. \"Preserved thinking\" also keeps reasoning from every earlier turn in context. In a 30-step agent loop, that history adds up fast. If your agent's context keeps ballooning, set ",[335,336,337],"code",{},"preserve_thinking"," to ",[335,340,341],{},"false",", or turn thinking off for simple tool steps.",[14,344,345,348,349,353],{},[17,346,347],{},"Second, a lot of \"Qwen tool calls hang\" reports aren't the model."," If your agent stalls on Qwen 3.8 27B in Ollama while a raw curl works fine, read our ",[30,350,352],{"href":351},"/blog/qwen-3-8-27b-tool-calling-fails-agents-fix","Qwen 3.8 27B tool calling fix"," before you switch models.",[355,356,357],"blockquote",{},[14,358,359],{},[306,360,361],{},"Benchmarks tell you how smart a model is. Your agent's context bill tells you whether you can afford to let it think.",[14,363,364],{},[192,365],{"alt":366,"src":367},"Thinking adds up: with preserve_thinking true, reasoning from every turn stays in context until it hits the limit; with preserve_thinking false, only the current turn's thinking is kept","/img/blog/gemma-4-vs-qwen-3-8-thinking.jpg",[36,369,371],{"id":370},"vram-and-quantisation-what-runs-on-your-machine","VRAM and quantisation: what runs on your machine",[14,373,374],{},"Here's what Ollama actually downloads for the default 4-bit builds:",[77,376,377,390],{},[80,378,379],{},[83,380,381,384,387],{},[86,382,383],{},"Model",[86,385,386],{},"Ollama tag",[86,388,389],{},"Download",[95,391,392,405,418,430,442,454],{},[83,393,394,397,402],{},[100,395,396],{},"Gemma 4 E4B",[100,398,399],{},[335,400,401],{},"gemma4:e4b",[100,403,404],{},"6.6GB",[83,406,407,410,415],{},[100,408,409],{},"Gemma 4 12B",[100,411,412],{},[335,413,414],{},"gemma4:12b",[100,416,417],{},"7.7GB",[83,419,420,422,427],{},[100,421,220],{},[100,423,424],{},[335,425,426],{},"gemma4:26b",[100,428,429],{},"16GB",[83,431,432,434,439],{},[100,433,214],{},[100,435,436],{},[335,437,438],{},"gemma4:31b",[100,440,441],{},"19GB",[83,443,444,446,451],{},[100,445,217],{},[100,447,448],{},[335,449,450],{},"qwen3.8:27b",[100,452,453],{},"18GB",[83,455,456,459,464],{},[100,457,458],{},"Qwen 3.8 27B (q8_0)",[100,460,461],{},[335,462,463],{},"qwen3.8:27b-q8_0",[100,465,466],{},"30GB",[14,468,469],{},"Add room for context on top of the weights. A 24GB card runs either 31B-class model at 4-bit, with a modest context window. A 16GB card is Gemma territory: the 26B A4B is the strongest model you'll fit, and because only 3.8B parameters are active, it's fast too.",[14,471,472,473,477],{},"Qwen 3.8 Flash Next isn't on Ollama. Its 4-bit builds run roughly 95-110GB depending on the quant, so it needs a 128GB unified-memory machine and a runtime like vLLM, SGLang or MLX. Our ",[30,474,476],{"href":475},"/blog/openclaw-local-model-hardware","local model hardware guide"," covers which boxes can carry it.",[14,479,480,481,485],{},"If you'd rather point an agent at a model on your own machine without exposing it to the internet, that's what ",[30,482,484],{"href":483},"/downloads","BetterClaw Desktop"," is for. It connects Ollama, LM Studio or llama.cpp to your cloud agents, with no open ports.",[36,487,489],{"id":488},"the-licence-line-most-comparisons-skip","The licence line most comparisons skip",[14,491,492],{},"This is where most people get it wrong. \"Qwen is Apache 2.0\" is only true for some of Qwen 3.8.",[41,494,495,501,507,513],{},[44,496,497,500],{},[17,498,499],{},"Gemma 4:"," Apache 2.0 for every size.",[44,502,503,506],{},[17,504,505],{},"Qwen 3.8 27B:"," Apache 2.0.",[44,508,509,512],{},[17,510,511],{},"Qwen 3.8 Flash Next:"," a custom \"Qwen Community\" licence.",[44,514,515,518],{},[17,516,517],{},"Qwen 3.8 2.4T-A95B:"," a separate \"qwen3.8-max\" licence.",[14,520,521],{},"The Flash Next licence has two strings attached. If you or any affiliate run an AI coding or office-productivity product, or offer the model as a service to third parties, you need a separate licence from Qwen before any commercial use. Purely internal use, where neither the model nor its outputs reach a third party, is exempt. And above 100 million monthly users or US$20 million in monthly revenue, you must show the model name in your product.",[14,523,524],{},"For one team's internal agents, none of that bites. For a SaaS that puts the model in front of customers, it decides the choice before benchmarks do.",[36,526,528],{"id":527},"which-one-wed-run-for-which-agent","Which one we'd run for which agent",[77,530,531,544],{},[80,532,533],{},[83,534,535,538,541],{},[86,536,537],{},"Agent job",[86,539,540],{},"Our pick",[86,542,543],{},"Why",[95,545,546,556,566,577,588],{},[83,547,548,551,553],{},[100,549,550],{},"Coding or repo agent, 24GB GPU",[100,552,217],{},[100,554,555],{},"Best coding numbers at this size",[83,557,558,561,563],{},[100,559,560],{},"Inbox, support or triage agent",[100,562,220],{},[100,564,565],{},"Fast, fits 16GB, solid tool-use scores",[83,567,568,571,574],{},[100,569,570],{},"Voice or audio input",[100,572,573],{},"Gemma 4 E4B or 12B",[100,575,576],{},"Only Gemma has native audio",[83,578,579,582,585],{},[100,580,581],{},"Laptop or phone-class hardware",[100,583,584],{},"Gemma 4 E2B or E4B",[100,586,587],{},"Qwen 3.8 has nothing this small",[83,589,590,593,595],{},[100,591,592],{},"Strongest local model, 128GB box",[100,594,223],{},[100,596,597],{},"Check the licence first",[14,599,600],{},"The bigger lesson isn't which family wins. Local models are now good enough that the bottleneck is everything around them: context length, thinking settings, tool schemas and the agent loop itself. Pick the model that fits your hardware and your licence, then spend your time there.",[14,602,603,604,608,609,34],{},"If any of this resonated, give BetterClaw a try. Run your agents in the cloud on any of 28+ providers, or on your own local Gemma or Qwen through BetterClaw Desktop. The free plan gives you one agent and 100 credits a month, with no card. Basic is $19 a month, and Pro is $49 a month for five agents. ",[30,605,607],{"href":606},"/free-plan","Start free"," or ",[30,610,612],{"href":611},"/pricing","see full pricing",[36,614,616],{"id":615},"frequently-asked-questions","Frequently Asked Questions",[14,618,619],{},[17,620,621],{},"What is the difference between Gemma 4 and Qwen 3.8?",[14,623,624],{},"Gemma 4 is Google DeepMind's open family, with five sizes from E2B to 31B, all Apache 2.0 and all on Ollama. Qwen 3.8 is Alibaba's newest open family: a 27B dense model, the 180B-class Flash Next MoE, and a 2.4T flagship. Qwen scores higher on every benchmark both cards report. Gemma covers smaller hardware and audio input.",[14,626,627],{},[17,628,629],{},"How does Gemma 4 31B compare to Qwen 3.8 27B?",[14,631,632,633,636],{},"On the benchmarks both cards share, Qwen 3.8 27B leads: 89.2% vs 84.3% on GPQA Diamond, and 90.3% vs 80.0% on LiveCodeBench v6. Both fit a 24GB GPU at 4-bit (19GB vs 18GB on Ollama). Gemma reports a strong Tau2 tool-use score, which Qwen doesn't run. Our ",[30,634,635],{"href":32},"full 31B vs 27B comparison"," goes deeper.",[14,638,639],{},[17,640,641],{},"How do I run Gemma 4 or Qwen 3.8 locally?",[14,643,644,645,608,648,651],{},"With Ollama, run ",[335,646,647],{},"ollama run gemma4:26b",[335,649,650],{},"ollama run qwen3.8:27b",", then point your agent at the local endpoint. For Qwen in agent loops, consider turning off preserved thinking so context doesn't balloon. Qwen 3.8 Flash Next isn't on Ollama, so it needs vLLM, SGLang or MLX on a 128GB machine.",[14,653,654],{},[17,655,656],{},"Is Qwen 3.8 free for commercial use?",[14,658,659],{},"The 27B is Apache 2.0, so yes. Flash Next uses a custom Qwen Community licence. AI coding or office-productivity products, and model-as-a-service businesses, need a separate licence from Qwen for commercial use, though internal use is exempt. Gemma 4 is Apache 2.0 at every size.",[14,661,662],{},[17,663,664],{},"Is Gemma 4 or Qwen 3.8 reliable enough for production agents?",[14,666,667],{},"Both are, with the right setup. Keep context under control, test tool calls against your real schemas, and give risky actions an approval step. Most agent failures with these models come from long thinking histories, schema mismatches or the serving layer, not from the model itself.",{"title":669,"searchDepth":670,"depth":670,"links":671},"",2,[672,673,674,675,676,677,678,679],{"id":38,"depth":670,"text":39},{"id":71,"depth":670,"text":72},{"id":198,"depth":670,"text":199},{"id":297,"depth":670,"text":298},{"id":370,"depth":670,"text":371},{"id":488,"depth":670,"text":489},{"id":527,"depth":670,"text":528},{"id":615,"depth":670,"text":616},"Comparison","2026-10-14","Gemma 4 vs Qwen 3.8 compared on benchmarks, tool calling, coding, VRAM and quantisation. Which local model to run for your AI agent in October 2026.","md",false,"/img/blog/gemma-4-vs-qwen-3-8.jpg",null,512,1024,{},true,"/blog/gemma-4-vs-qwen-3-8","7 min read",{"title":5,"description":682},"Gemma 4 vs Qwen 3.8 (Oct 2026): Best Local Agent Model?","blog/gemma-4-vs-qwen-3-8",[697,698,699,700,701,702],"gemma 4 vs qwen 3.8","qwen 3.8 vs gemma 4","gemma 4 27b vs qwen 3.8 27b","qwen 3.8 tool calling","best local llm for agents","gemma vs qwen","jzB6SVEOLgJottFi5uyqzAAcaa2SdZwww7LJQCSj6IE",[705,713,721],{"stem":706,"title":707,"description":708,"date":709,"image":710,"category":680,"redirected":684,"author":711,"readingTime":712},"blog/gemini-spark-alternatives","Gemini Spark Alternatives: What It Is, What It Can't Do, and 3 Options Worth Trying","Gemini Spark is $100/mo, US-only, and still in beta. Here are 3 AI agent alternatives you can use today, including one with a free plan.","2026-05-29","/img/blog/gemini-spark-alternatives.jpg",{"name":7,"role":8,"avatar":9},"11 min read",{"stem":714,"title":715,"description":716,"date":717,"image":718,"category":680,"redirected":684,"author":719,"readingTime":720},"blog/ollama-vs-lm-studio","LM Studio vs Ollama (Oct 2026): MLX, MCP and Agent Backends","LM Studio vs Ollama, October 2026: Ollama now runs MLX on Macs and both run headless. Where each wins on GPU Docker, concurrency, MCP and agent backends.","2026-06-04","/img/blog/ollama-vs-lm-studio.jpg",{"name":7,"role":8,"avatar":9},"16 min read",{"stem":722,"title":723,"description":724,"date":725,"image":726,"category":680,"redirected":684,"author":727,"readingTime":712},"blog/claude-code-chatgpt-rate-limit-alternatives-2026","Claude Code Limits Drop 17% Sept 14: 4 Ways Around the Rate Limits","Claude Code weekly limits dropped 17% on Sept 14 and ChatGPT Plus got its 5-hour Codex cap back Aug 25. The alternatives, the math, and the BYOK routing fix.","2026-09-09","/img/blog/claude-code-chatgpt-rate-limit-alternatives-2026.jpg",{"name":7,"role":8,"avatar":9},1791978815274]