Architecture
~9 min readUpdated: November 2026

Ling-3.2-air: 124B-A5.5B Hybrid KDA-MLA MoE, 256K Context & Workflow Agent Serving

Ling-3.2-air 124B-A5.5B hybrid KDA and Gated MLA MoE architecture banner showing 35 linear streams, 7 Gated MLA nodes, and 512-expert sparse routing

Ling-3.2-air is inclusionAI's MIT-licensed 124B-parameter (5.5B active) hybrid-linear Mixture-of-Experts multimodal model built for workflow automation and document reasoning. Pairing 35 Kernel Delta Attention layers with 7 Gated MLA layers, 512 routed experts, native FP8 weights, and MTP speculative decoding, it connects directly to Smoke Monkey Harness.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

Ling-3.2-air: 124B-A5.5B Hybrid KDA-MLA MoE, 256K Context & Workflow Agent Serving: Ling-3.2-air is inclusionAI's MIT-licensed 124B-parameter (5.5B active) hybrid-linear Mixture-of-Experts multimodal model built for workflow automation and document reasoning. Pairing 35 Kernel Delta Attention layers with 7 Gated MLA layers, 512 routed experts, native FP8 weights, and MTP speculative decoding, it connects directly to Smoke Monkey Harness. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Exampleling-3-2-air-workflow-agent.ts
ling-3-2-air-workflow-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Connect Smoke Monkey Harness to SGLang (:30000) or vllm-ling-v3 (:8000) serving Ling-3.2-air
const agent = createAgent({
provider: 'openai',
baseUrl: process.env.LING_BASE_URL ?? 'http://127.0.0.1:30000/v1',
apiKey: process.env.LING_API_KEY ?? 'local-ling32',
model: process.env.LING_MODEL ?? 'inclusionAI/Ling-3.2-air',
agentId: 'build',
workspacePath: process.cwd(),
tools: ['filesystem', 'terminal', 'search', 'git', 'agent'],
permission: 'ask-default',
mcp: [
{
id: 'github',
name: 'GitHub MCP',
description: 'Inspect repository pull requests, CI workflows, and open issues',
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-github'],
enabled: true,
},
],
});
// Auto-allow read-only inspection and test verification while gating mutating terminal actions
agent.on('permission.required', (event) => {
const readOnlyAndTestTools = ['read_file', 'grep', 'glob', 'git_diff', 'git_status', 'run_test'];
const decision = readOnlyAndTestTools.includes(event.data.toolName) ? 'allow' : 'deny';
agent.resolvePermission(event.data.toolCallId, decision);
});
agent.on('phase.changed', (event) => {
console.log(`[Ling-3.2-air] Phase -> ${event.data.phase}`);
});
async function main() {
const result = await agent.run(
'Audit invoices/Q4-ledger.pdf against src/billing/reconcile.ts, fix rounding drift, and verify with npm test.'
);
console.log('Status:', result.status, 'Session:', result.sessionId);
}
main().catch(console.error);
Video Guides

Watch: Related Video Guides

Ling 3.2 Air: Not a Frontier Coder, But Strong at Workflow Automation

Inkling 2 Small & Ling 3.2 Flash – Two Powerful New AI Models

What Is Ling-3.2-air? Hybrid KDA and Gated MLA MoE Architecture

Ling-3.2-air is an MIT-licensed, native multimodal Mixture-of-Experts model from inclusionAI with 124B language parameters, 5.5B activated per token, and a 262,144-token context window. Sharing the BailingMoeV3VLForConditionalGeneration architecture with Ling-3.0-flash-VL, it interleaves 35 Kernel Delta Attention (KDA) layers with 7 Gated Multi-Head Latent Attention (MLA) layers for enterprise workflow automation.

Inspecting config.json and the 13-shard safetensors index reveals 127,920,654,544 total stored parameters (129.29 GB on disk): 126,609,211,392 weights in blockwise F8_E4M3 (128×128), 1,311,277,680 in BF16 (vision tower, embeddings, lm_head, projection gates, and MoE routers), and 165,472 in F32.

Core Architectural Modules

  • 5:1 Hybrid KDA and Gated MLA Stack: Across 42 decoder layers (layer_group_size: 6), layers 0–4, 6–10, 12–16, 18–22, 24–28, 30–34, and 36–40 run KDA linear recurrent attention with short_conv_kernel_size: 4, linear_silu: true, no_kda_lora: true, and kda_safe_gate: true (kda_lower_bound: -5.0). Every sixth layer (5, 11, 17, 23, 29, 35, 41) runs Gated MLA (kv_lora_rank: 512, qk_nope_head_dim: 128, qk_rope_head_dim: 64, v_head_dim: 128, use_qk_norm: true, head-wise g_proj output gating, partial_rotary_factor: 0.5, rope_theta: 6000000, mrope_section: [8, 12, 12]).
  • Fine-Grained 512-Expert Sparse MoE: Layers 0 and 1 (first_k_dense_replace: 2) use dense 6,144-wide SwiGLU FFNs. Layers 2–41 route tokens in hidden_size: 2560 across 512 routed experts (moe_intermediate_size: 768) plus 1 shared expert (768-dim), activating top-8 routed experts via n_group: 8 / topk_group: 4 sigmoid routing (router_dtype: fp32, moe_router_enable_expert_bias: true, routed_scaling_factor: 2.5, norm_topk_prob: true).
  • Native Multimodal Vision Tower (`qwen3_moe_vit`): A 27-layer ViT (hidden_size: 1152, intermediate_size: 4304, 16 heads, patch_size: 16, spatial_merge_size: 2, temporal_patch_size: 2, out_hidden_size: 4608) injects image (<|image_pad|>) and video (<|video_pad|>) tokens directly into the shared backbone.
  • Bundled 1-Layer MTP Draft Head (`layer 42`): num_nextn_predict_layers: 1 embeds a native Multi-Token Prediction head for NEXTN speculative decoding in SGLang and 3-token mtp drafting in vllm-ling-v3.
Architectural ParameterLing-3.2-air (config.json & Safetensors Index)
Architecture & LicenseBailingMoeV3VLForConditionalGeneration (bailing_hybrid), MIT
Parameter Scale124B language (127.92B total w/ ViT + MTP) / 5.5B active
Weight Precision Breakdown126.61B F8_E4M3 + 1.31B BF16 + 165.5K F32 (129.29 GB)
Decoder Layer Topology42 layers (2 dense + 40 MoE; 35 × KDA + 7 × Gated MLA, 5:1)
Attention & MLA KV Rank32 heads (head_dim: 128), kv_lora_rank: 512, qk_rope_head_dim: 64
MoE Routing & Experts512 routed (top-8, 8×4 group) + 1 shared, 768 width, 157,184 vocab
Vision Encoderqwen3_moe_vit (27 layers, 1152 hidden, 4608 merged output, 2×2 spatio-temporal)
Native Context Window262,144 tokens (rope_theta: 6,000,000, mrope_section: [8, 12, 12])

Ling-3.2-air Benchmarks: Workflow Automation, Document Reasoning & Terminal Tasks

Ling-3.2-air targets multi-step enterprise workflows and quantitative document parsing rather than pure competitive coding. Across inclusionAI's official evaluation suite and Artificial Analysis tracking, AutomationBench-AA jumps nearly 4x from 15.7% to 61%, AA-Briefcase v1.1 climbs +353 Elo to 1340, and Terminal-Bench 4.0 moves from 0% to 27%.

Because both models share identical BailingMoeV3VL inference footprints, those gains come purely from post-training on long-horizon tool trajectories, multi-document PDF cross-referencing, and structured spreadsheet/legal synthesis—without raising active parameter FLOPs beyond 5.5B.

Predecessor Comparison & Specialized Benchmark Matrix

Benchmark SuiteLing-3.0-flash-VL (Predecessor)Ling-3.2-airDelta / Domain Scope
AutomationBench-AA15.7%61.0%+45.3pp multi-step SaaS & workflow automation
AA-Briefcase v1.1 (Elo)9871340+353 Elo real-world workspace tool & file tasks
Terminal-Bench 4.00.0%27.0%+27.0pp CLI shell, build, and debugging loops
GDP.pdf (All-Pass Rate)8.4%16.0%+7.6pp (1.9x) complex quantitative PDF analysis
Harvey LAB-AA v1.1 (Criterion)–87.7%Legal criterion pass rate (8.3% all-pass pre-check, 0.8% post-hallucination check)
AA Intelligence Index v5.0.1–23Composite reasoning, coding, and agentic score

Note the engineering trade-off surfaced by Harvey LAB-AA v1.1 and Terminal-Bench 4.0: while Ling-3.2-air achieves an 87.7% criterion pass rate on structured legal extraction and strong workflow orchestration (61% on AutomationBench-AA), its 0.8% post-hallucination all-pass score and 27% Terminal-Bench score mean production pipelines should pair it with deterministic AST, schema, and compiler verification in Smoke Monkey Harness rather than trusting unverified single-shot outputs.

KV Cache Math, FP8 Weight Layout & GGUF Quantization Matrix

Because 35 of Ling-3.2-air's 42 decoder layers use constant-state Kernel Delta Attention (KDA), only the 7 Gated MLA layers allocate a sequence-length KV cache. In BF16, each token consumes 8,064 bytes (~7.88 KiB) across all 7 MLA layers—totaling just ~1.97 GiB at full 262,144-token context.

Exact KV Cache & VRAM Footprint Math

Each Gated MLA layer stores compressed latent vectors of size kv_lora_rank + qk_rope_head_dim = 512 + 64 = 576 elements per token. Multiplying across the 7 MLA layers (indices 5, 11, 17, 23, 29, 35, 41) yields 4,032 stored elements per token regardless of the 32 query heads:

text
MLA KV Cache per Token (7 layers)  = 7 × (512 + 64) = 4,032 elements/token
BF16 KV Cache Bandwidth / Token    = 4,032 × 2 bytes = 8,064 bytes (~7.88 KiB/token)
FP8 KV Cache Bandwidth / Token     = 4,032 × 1 byte  = 4,032 bytes (~3.94 KiB/token)

262,144-Token Context KV Total     = ~1.97 GiB (BF16)  |  ~0.98 GiB (FP8)
Official FP8 Checkpoint + MTP      = 129.29 GB disk (~130 GiB loaded across TP=4 or TP=8)

Notice the modules_to_not_convert list in config.json: inclusionAI keeps model.visual, word_embeddings, lm_head, linear_proj, every KDA b_proj, every MLA g_proj, and all 41 mlp.gate routers (including MTP layer 42) in unquantized BF16/FP32 while block-quantizing routed/shared FFN experts to F8_E4M3 ([128, 128] blocks). This preserves routing stability during multi-turn tool calls.

Official FP8 & Community GGUF Deployment Matrix

Repository / QuantizationPrecision & FormatArtifact SizeHardware Target
inclusionAI/Ling-3.2-airNative F8_E4M3 + BF16 ([128,128])129.29 GB4× 141 GB (H200/H20-3e/B300) or 8× 80 GB (H100/H800)
bartowski/Ling-3.2-air-GGUF (Q8_0)8-bit GGUF + mmproj-bf16 (0.88 GB)135.63 GBDual-socket EPYC/Xeon CPU+GPU or 192 GB+ Unified Memory
bartowski/Ling-3.2-air-GGUF (Q6_K)6-bit K-quant GGUF (imatrix)111.43 GB128 GB Mac Studio / workstation (> 115 GB free RAM)
bartowski/Ling-3.2-air-GGUF (Q4_K_M)4-bit K-quant GGUF (default balanced)80.39 GB96 GB Unified Memory Mac or 128 GB RAM + 1× 24 GB GPU
bartowski/Ling-3.2-air-GGUF (IQ4_XS)4.25-bpw i-matrix GGUF71.11 GB96 GB RAM hosts w/ full 256K KV room
bartowski/Ling-3.2-air-GGUF (Q3_K_M / IQ2_XS)Low-RAM 3-bit / 2-bit GGUF61.50 / 40.34 GB48–64 GB local workstations (reduced precision)
bloomer010/Ling-3.2-air-REAP-408-GGUFPruned MoE (512 -> 408 experts)Varies by quant~20% expert-count reduction for tighter RAM budgets

Production Serving Recipes: SGLang (NEXTN), vLLM-ling-v3 & Thinking Controls

Deploy Ling-3.2-air on multi-GPU nodes using the day-zero lmsysorg/sglang:dev-Ling-3.0-flash-VL container or inclusionAI/vllm-ling-v3 with --mamba-cache-mode align and MTP speculative decoding. Both engines load the Bailing V3 Jinja template and expose OpenAI-compatible reasoning and tool-calling parsers via ling3 across 262,144-token sessions.

1. SGLang Container Deployment (Recommended, 256K Context + NEXTN)

On 4× 141 GB GPUs (H20-3e, H200, B300, or GB300), run tensor-parallel 4; on 80 GB cards (H100 / H800), scale to --tp 8:

bash
docker pull lmsysorg/sglang:dev-Ling-3.0-flash-VL

docker run --rm --gpus all --ipc=host --shm-size 32g \
  -p 30000:30000 \
  lmsysorg/sglang:dev-Ling-3.0-flash-VL \
  python3 -m sglang.launch_server \
    --model-path inclusionAI/Ling-3.2-air \
    --tp 4 \
    --context-length 262144 \
    --speculative-algorithm NEXTN \
    --trust-remote-code \
    --reasoning-parser auto \
    --tool-call-parser auto \
    --host 0.0.0.0 \
    --port 30000

2. vLLM Deployment (inclusionAI/vllm-ling-v3 + 3-Token MTP)

bash
uv venv ~/my_ling_env && source ~/my_ling_env/bin/activate
git clone https://github.com/inclusionAI/vllm-ling-v3.git
cd vllm-ling-v3
VLLM_USE_PRECOMPILED=1 uv pip install --editable . --torch-backend=auto

vllm serve inclusionAI/Ling-3.2-air \
  --port 8000 \
  --trust-remote-code \
  --served-model-name inclusionAI/Ling-3.2-air \
  --tensor-parallel-size 4 \
  --gpu-memory-utilization 0.85 \
  --enable-prefix-caching \
  --mamba-cache-mode align \
  --enable-auto-tool-choice \
  --tool-call-parser ling3 \
  --reasoning-parser ling3 \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3}'

3. Bailing V3 Chat Template, Sampling & Tool-Call Format

Per generation_config.json and chat_template.jinja, set temperature=1.0, top_p=0.95, and top_k=20 with enable_thinking: true (inserts detailed thinking on in the <role>SYSTEM</role> block and opens <think>). Importantly, preserve_thinking defaults to true, retaining earlier <think> chains across multi-step <role>OBSERVATION</role> tool responses (<tool_response>...</tool_response>). Pass "chat_template_kwargs": {"enable_thinking": false} for low-latency non-thinking classification calls.

bash
# Multimodal + thinking verification call against SGLang (:30000)
curl -s http://127.0.0.1:30000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "inclusionAI/Ling-3.2-air",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "image_url", "image_url": {"url": "https://example.com/invoice-scan.png"}},
        {"type": "text", "text": "Extract line-item totals as JSON."}
      ]
    }],
    "chat_template_kwargs": {"enable_thinking": true},
    "temperature": 1.0,
    "top_k": 20,
    "top_p": 0.95
  }'

Critical Flag for vLLM Hybrid KDA State Alignment

Always pass --mamba-cache-mode align when serving Ling-3.2-air in vllm-ling-v3 alongside --enable-prefix-caching. Because 35 layers store recurrent KDA states rather than KV blocks, aligning recurrent state slots with paged KV blocks prevents prefix-cache desynchronization across multi-turn agent loops.

Orchestrating Ling-3.2-air in Smoke Monkey Harness & Canvas

Smoke Monkey Harness integrates with Ling-3.2-air over standard OpenAI /v1/chat/completions exposed by SGLang (:30000/v1) or vllm-ling-v3 (:8000/v1). Its deterministic 6-phase loop (Explore -> Plan -> Edit -> Verify -> Recover -> Complete) compensates for single-shot hallucination risk with local compiler, test, and MCP verification.

Production Agent Workflow Patterns

  1. Document-to-Code Automation Pipelines: Combine Ling-3.2-air's qwen3_moe_vit vision tower (<|image_pad|>) and 61% AutomationBench-AA capability to parse scanned PDFs, invoices, and compliance tables, then validate generated SQL or TypeScript mutations via run_test and git_diff inside @smoke-monkey/harness.
  2. Preserved Thinking Across Multi-Tool Loops: Because chat_template.jinja sets preserve_thinking: true by default across <role>OBSERVATION</role> turns, @smoke-monkey/harness retains reasoning continuity across consecutive MCP calls (GitHub, Postgres, Playwright) without forcing the 5.5B-active router to re-derive workspace constraints.
  3. Multi-Agent Canvas Routing: Launch Smoke Monkey Canvas (npx @smoke-monkey/canvas start) to pair a Ling-3.2-air workflow coordinator (enable_thinking: true) with specialized code-verification or triage workers (enable_thinking: false for fast routing).
Google Search Questions & Answers

Frequently Asked Questions

Q:How many parameters does Ling-3.2-air have and how many are active per token?

Ling-3.2-air has 124B total language parameters and 5.5B activated parameters per token, routing each token through 8 of 512 routed experts plus 1 shared expert across 40 MoE layers (preceded by 2 dense layers). Including the 27-layer qwen3_moe_vit vision tower and 1-layer MTP head, the Hugging Face checkpoint contains 127.92B parameters (129.29 GB in native FP8 E4M3 + BF16).

Q:How does Ling-3.2-air achieve a sub-2 GiB KV cache at 262,144 tokens?

Ling-3.2-air uses a 5:1 hybrid attention stack across 42 decoder layers: 35 layers use constant-state Kernel Delta Attention (KDA) with no growing KV cache, and only 7 layers (indices 5, 11, 17, 23, 29, 35, and 41) use Gated Multi-Head Latent Attention (MLA) with kv_lora_rank=512 and qk_rope_head_dim=64. That stores 8,064 bytes per token in BF16 (~1.97 GiB at 262,144 tokens) or ~0.98 GiB in FP8.

Q:What GPUs are required to serve Ling-3.2-air in SGLang or vLLM?

With a 129.29 GB native FP8 E4M3 checkpoint, Ling-3.2-air runs at full 262,144-token context on 4x 141 GB GPUs (H20-3e, H200, B300, or GB300) using --tp 4, or on 8x 80 GB GPUs (H100 or H800) using --tp 8. For single-node workstations, bartowski/Ling-3.2-air-GGUF provides Q4_K_M (80.39 GB) and IQ4_XS (71.11 GB) checkpoints.

Q:How do SGLang and vLLM parse Ling-3.2-air thinking traces and tool calls?

Both lmsysorg/sglang:dev-Ling-3.0-flash-VL and inclusionAI/vllm-ling-v3 ship the ling3 reasoning and tool-call parsers (--reasoning-parser ling3 --tool-call-parser ling3). They parse <think>...</think> blocks and XML <tool_call> tags from the Bailing V3 template into standard OpenAI reasoning_content and tool_calls fields.

Q:What improvements did Ling-3.2-air make over Ling-3.0-flash-VL?

While keeping the exact BailingMoeV3VL architecture, Ling-3.2-air improved AutomationBench-AA from 15.7% to 61%, AA-Briefcase v1.1 from 987 to 1340 Elo (+353 points), GDP.pdf all-pass from 8.4% to 16%, and Terminal-Bench 4.0 from 0% to 27%, while earning 87.7% criterion pass rate on Harvey LAB-AA v1.1.

Q:How do I connect Ling-3.2-air to Smoke Monkey Harness and MCP tools?

Start SGLang on port 30000 (or vllm-ling-v3 on port 8000 with --mamba-cache-mode align), then pass provider: 'openai', baseUrl: 'http://127.0.0.1:30000/v1', and model: 'inclusionAI/Ling-3.2-air' to createAgent in @smoke-monkey/harness with permission: 'ask-default' and your stdio or HTTP MCP servers.

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness