DIY AI 2027: Local Models, Second Brain, RAG, Hermes Agent, and EvalsSection 1 · lesson 4 of 5
12345section 1 lessons
Section 1. Introduction to DIY AI — Ecosystem Architecture, Hardware, and Open Weights

Navigating Open Weights — Size Tiers and Specializations of Gemma, Qwen, DeepSeek, and Kimi

≈ 9 minNeuroBober

Almost every engineer hits the same trap at the start: opening the Hugging Face release feed, spotting a loud headline like "new 2.8-trillion-parameter open model beats closed flagships," downloading the first weights they see or trying to boot a giant on a home machine — and spending an hour drowning in incompatible builds, licenses, and out-of-memory errors.

Chasing every weekly release is pointless because next month's drop will top it anyway. A far better strategy is to lock in three clear hardware tiers matched to the memory pool you calculated in the last lesson, and pick two or three proven models per tier with clean architectures and clear licenses.

Three Hardware Tiers Instead of Chasing Hype Releases

Open weights differ not just by lab, but by fundamental network design. In dense models, 100% of parameters fire on every generated token, giving predictable adherence to complex code and strict rules at the cost of higher memory bandwidth demand.

In Mixture of Experts (MoE) models, hundreds of specialized blocks live inside one network while a lightweight router activates only a small slice per token — say, 4B to 104B active parameters out of hundreds of billions or trillions total. Model names often use total-Aactive notation: 26B-A4B, for instance, means 26B total weights with 4B active per token. This delivers fast replies and huge knowledge capacity, yet you must still load all total weights into RAM or VRAM. Because the router can pick a completely different set of experts on the very next token, any missing weights force disk swaps that instantly destroy throughput.

Following that memory physics, the open-weight landscape splits cleanly into three tiers:

  1. Tier 1 (8–24 GB RAM/VRAM — laptops and entry GPUs): compact 2B–12B dense models or tiny MoEs with ~3B active weights for local drafting, classification, field extraction, and offline notes.
  2. Tier 2 (24–64+ GB VRAM or Unified Memory — workstations): 26B–32B dense models and mid-sized MoEs for autonomous coding, tool calling, and local repository analysis on a single RTX 5090 or Mac Studio.
  3. Tier 3 (128 GB–1+ TB or budget open-weight APIs): server-grade frontier MoEs (matching leading closed flagships on reasoning and code) from 230B to 2.8T total parameters that do not fit on a typical home workstation.

The Golden Rule of MoE: Speed Follows Active Parameters, Memory Follows Total Parameters

Map of three open-weight hardware tiers: compact 2B–12B, workstation 26B–32B, and server MoEs 230B–2.8T

Compact and Mid-Range Tiers — Gemma 4 and Local Qwen Branches

If you are running a local node on a laptop, Mac Studio, or single RTX 5080/5090, the bulk of your daily work falls on two families — Google Gemma 4 and local branches of Alibaba Qwen.

Google's Gemma 4 lineup spans both Tier 1 and Tier 2. At the compact end sit E2B and E4B (E marks effective active-core size for memory-constrained edge devices): they support a 128K context window and natively ingest text, images, audio, and video. One step up is the 12B Dense model, while workstations unlock the 26B MoE with 4B active parameters (26B-A4B) and the flagship 31B Dense with a 256K context window and native tool calling.

The Qwen family splits into two branches serving distinct local roles:

  • Qwen 3.5 series (256K native context, extendable to 1M via ) spans dense models from 0.8B to 27B parameters alongside compact and mid-sized MoEs: 35B-A3B, 122B-A10B, and 397B-A17B.
  • Qwen 3.8 workhorse branch centers on the dense Qwen3.8-27B (Qwen/Qwen3.8-27B, ~17 GB in 4-bit quantization), featuring controllable reasoning depth (from disabled to deep analysis) and native , accelerating decode on consumer GPUs and Apple Silicon without sacrificing code coherence.
Dense vs. MoE on a Workstation

For strict coding, multi-step instruction following, and complex refactoring on a single 24–32 GB VRAM GPU, dense models like Qwen3.8-27B or Gemma 4 31B are preferable: they engage every weight on every token and slip less often on long constraint chains. Small MoEs (like Gemma 4 26B-A4B or Qwen 3.5 35B-A3B) win on latency for routine tasks — document triage, summarization, and snappy chat.

Server-Grade MoE Flagships — DeepSeek-V4.1-Flash, Kimi K3.1 Pro, and Ultra-Large Weights

When a task demands complex repository planning, million-token context, or autonomous Linux terminal work, a local 27B–32B model runs out of headroom. That is where Tier 3 connects through your hybrid gateway — open server MoE flagships running on rented clusters or cheap open-weight APIs:

  • DeepSeek-V4.1-Flash (deepseek-ai/DeepSeek-V4.1-Flash on DeepSeek's Hugging Face): built on a architecture with 552B total parameters and asymmetric activation — just 8B active on input and 16B on output — a 1M context window, and a compressed KV cache (~4× less HBM than the prior generation), explaining its rock-bottom gateway pricing.
  • Kimi K3.1 Pro (moonshotai/Kimi-K3.1-Pro on Moonshot AI's card): a MoE flagship with 2.8T total and 104B active parameters. On each token, the router picks 16 of 896 specialized experts plus 2 always-on shared experts (maintaining baseline logic and coherence) across a 1M window. On Terminal-Bench 4.0 — where models autonomously solve real Linux terminal tasks (environment setup, builds, debugging) — Kimi K3.1 Pro scores 65.7%, rivaling closed leaders in autonomous engineering.
  • MiniMax-M2.5 and MiniMax-M3 (on MiniMaxAI's page): built for coding and long agentic tasks, from M2/M2.5 (230B total / 10B active) to multimodal MiniMax-M3 (428B total / 23B active, 1M context, MiniMax , and three reasoning modes: enabled, disabled, and adaptive, where the model decides when to spend tokens on hidden reasoning versus replying directly).
  • Mistral Large 4 / Le Chonk (mistralai/Mistral-Large-4-1T-A52B on Mistral AI's card): a European multimodal flagship at ~1T total and ~49B–52B active parameters with 1M context; notable for top cybersecurity benchmark scores and avoiding false refusals during legitimate vulnerability audits — unlike many closed models whose over-tuned filters block routine permission checks or attack-log analysis.
  • Qwen3.8-2.4T-A95B: Alibaba's ultra-large server branch at 2.4T total and 95B active parameters for heavy R&D and cluster deployments.

The table below maps all key families across tiers, memory, and licensing.

TierModel & RepositoryParameters (Active / Total)ContextLicenseWhere to Run
1. CompactGoogle Gemma 4 (E2B, E4B, 12B)2B–12B (dense)128KApache 2.0Laptops 8–24 GB RAM/VRAM,
2. Local workhorseGoogle Gemma 4 (26B-A4B, 31B)4B / 26B (MoE), 31B (dense)256KApache 2.024–32 GB VRAM GPU (Q4) or Mac Studio 64+ GB
2. Local workhorseQwen 3.5 (up to 27B / 35B-A3B) & Qwen3.8-27B3B / 35B (MoE), 27B (dense)256K (1M YaRN)Apache 2.0RTX 4090/5090 24–32 GB, Mac Studio 36–128 GB
3. Server MoEDeepSeek-V4.1-Flash8B in, 16B out / 552B1MMITGPU cluster or budget open-weight API (ZDR)
3. Server MoEMiniMax-M3 (& M2.5 230B-A10B)23B / 428B1MCustom MiniMaxMulti-GPU server or open-weight API
3. Server MoEMistral Large 4 (Le Chonk)~52B / 1T1MMistral Open-WeightServer rack (8× H100/B200) or API
3. Server MoEQwen3.8-2.4T-A95B & Kimi K3.1 Pro95B / 2.4T & 104B / 2.8T1MCustom / Modified MITData-center cluster or cloud gateway

Licenses and Specialization — What to Check Before Downloading Weights

"Open model" does not mean one uniform set of legal rules. In 2026–2027, the market split into two camps, and you should inspect the before building a product around any weights.

Fully permissive licenses — Apache 2.0 and MIT — allow virtually any commercial or internal use, fine-tuning, and product embedding with zero royalties or revenue caps. A major shift came from Google: while Gemma 1–3 used restrictive Gemma Terms of Use, the entire Gemma 4 family moved to clean Apache 2.0; Qwen 3/3.5 and DeepSeek-V4.1-Flash also ship under Apache 2.0 and MIT.

The second camp is Modified MIT and custom licenses, including the Kimi K3.1-Pro License, Mistral Ecosystem Open-Weight License, Qwen3.8-Max License, and MiniMax Model License. They are completely free for local experiments and internal company use, but place conditions on commercial resale of API access () and massive scale: Kimi K3.1 Pro, for example, requires a separate agreement for commercial MaaS if group revenue exceeds $20M over 12 months, and attribution above 100M or $20M monthly revenue.

Picking your baseline pair for the hardware mapped in Lesson 03 is now straightforward:

  1. Lock in one local workhorse from Tier 1 or Tier 2 sized to your memory (Gemma 4 E4B/12B for 8–16 GB; Qwen3.8-27B, Gemma 4 31B, or Gemma 4 26B-A4B for 24–64+ GB).
  2. Pick one or two fallback open-weight backends from Tier 3 for your gateway (DeepSeek-V4.1-Flash for cheap bulk code and analysis; Kimi K3.1 Pro or Mistral Large 4 for complex agentic work and security audits).
  3. Record those two or three models in your starter kit alongside memory sizing and license type — that is your ready input set for configuring inference engines in the next section.

Before moving on to installing inference servers, one final step remains in this introductory module: honestly checking where even a well-matched local setup physically loses to industrial cloud clusters, and why a hybrid beats dogmatic 100% autonomy.

![Navigating open weights: size tiers and specializations of Gemma, Qwen, DeepSeek, Kimi, and MiniMax (Hugging Face — Official Qwen Organization: Qwen 3 / 3.5 / 3.8)](../../images/sections/1 Введение в DIY AI — архитектура экосистемы, железо и открытые веса/04 Навигация в открытых весах — классы размеров и специализация Gemma, Qwen, DeepSeek и Kimi-official-ref.webp)

Task for an AI Agent

Inspect the model list in this project's configs (or assess my available VRAM/RAM and typical tasks) and classify them into the three open-weight tiers: pick one local workhorse (dense or compact MoE) for my memory budget and one or two server open-weight backends for the gateway, check their licenses (Apache 2.0 / MIT vs. Modified MIT / custom MaaS terms), and output a starter-kit table.

Sources · 5

Based on digests