SubQ Savant 4M Context LLM: Subquadratic Sparse Attention Agents

SubQ Savant (subq-savant-1.4) is a reasoning LLM by Subquadratic with a 4-million-token context window powered by Subquadratic Sparse Attention (SSA). Reaching 92.6 on RULER at 4M tokens and 84.5 on AA-LCR multi-document reasoning, it prices input at $0.10/1M, cached input at $0.01/1M, and output at $0.50/1M—20x cheaper output than Sonnet 5.5.
SubQ Savant 4M Context LLM: Subquadratic Sparse Attention Agents: SubQ Savant (subq-savant-1.4) is a reasoning LLM by Subquadratic with a 4-million-token context window powered by Subquadratic Sparse Attention (SSA). Reaching 92.6 on RULER at 4M tokens and 84.5 on AA-LCR multi-document reasoning, it prices input at $0.10/1M, cached input at $0.01/1M, and output at $0.50/1M—20x cheaper output than Sonnet 5.5. 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.
- True 4M Context Window: 4x larger than 1M-class models (Sonnet 5.5, Haiku 5.5, Terra 6.1) with 92.6% accuracy on RULER at full 4M tokens.
- Subquadratic Sparse Attention (SSA): Drops 4M-scale compute to 2.0 PFLOP vs. 1,157 PFLOP for dense quadratic transformers.
- 20x Lower Output Economics: Costs $0.10 input / $0.01 cached input / $0.50 output per 1M tokens versus $2.00 / $0.10 / $10.00 on Sonnet 5.5.
- Drop-In OpenAI Responses API: Compatible with standard OpenAI client libraries via base_url https://api.subq.ai/v1 and model subq-savant-1.4.
import { createAgent } from '@smoke-monkey/harness';// Long-horizon monorepo reasoning agent using SubQ Savant's 4M context windowconst agent = createAgent({agentId: 'subq-savant-repo-auditor',provider: 'openai-compatible',baseUrl: 'https://api.subq.ai/v1',apiKey: process.env.SUBQ_API_KEY,model: 'subq-savant-1.4',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'ask',run_command: 'ask',},});async function main() {const result = await agent.run('Load the repository dependency graph and trace all cross-package auth middleware boundaries without truncating logs.');console.log('4M-context audit:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
DeepSeek Sparse Attention Explained: 80% Cheaper Long-Context AI
AI Interview #6 - 1M context window in LLM?
What Is SubQ Savant and Subquadratic Sparse Attention?
SubQ Savant (subq-savant-1.4) is a 4-million-token reasoning model developed by Subquadratic using Subquadratic Sparse Attention (SSA). Instead of computing dense all-to-all token attention—which scales quadratically to 1,157 PFLOP at long contexts—SSA selectively isolates high-signal token dependencies in 2.0 PFLOP, preserving complete multi-hour agent histories and entire repositories in context.
| Model | Max Context | RULER @ 4M | AA-LCR avg@3 | DeepSWE avg@4 | GPQA Diamond | Input / Cached / Output ($/1M) |
|---|---|---|---|---|---|---|
| SubQ Savant 1.4 | 4M | 92.6 | 84.5 | 66.4 | 92.4 | $0.10 / $0.01 / $0.50 |
| Sonnet 5.5 | 1M | — | 82.2 | 71.0 | 95.6 | $2.00 / $0.10 / $10.00 |
| Haiku 5.5 | 1M | — | 81.8 | 59.9 | 89.6 | $0.50 / $0.05 / $2.50 |
| Luna 6 | 1M | — | 84.2 | 66.6 | 90.5 | $0.20 / $0.02 / $0.75 |
| Hydrogen | 1M | — | 72.3 | — | 96.8 | $1.50 / $0.075 / $7.50 |
Eliminating Lossy Context Compaction in Coding Agents
Most coding harnesses fail on multi-hour tasks because sliding-window eviction or LLM summarization discards subtle stack traces and prior failed edits. At $0.01 per 1M cached input tokens, Savant makes full-history retention cheaper than running periodic summary passes:
- Zero-Eviction Tool Logs: Retain every compiler diagnostic,
git diff, and MCP response verbatim across 100+ turn debugging sessions. - Whole-Repo Cross-Referencing: On LongBench V2 (8K–2M range), Savant scores 68 while outperforming dense frontier models on AA-LCR multi-document reasoning (84.5 vs. 82.2 for Sonnet 5.5).
- Production Teams: Teams like Pen.dev and CRED run Savant for multi-document financial filing analysis and design-canvas agent memory at roughly 1/20th the token bill.
Structure Static Repo Context First for 90% Cache Savings
Place immutable repository files and schema definitions at the prefix of the prompt before dynamic user turns so subsequent harness iterations hit the $0.01/1M cached input rate.
Reproducible OpenAI SDK & cURL Integration
Call SubQ Savant using the standard openai Python or TypeScript SDK by overriding base_url to https://api.subq.ai/v1:
pip install openai
export SUBQ_API_KEY="your_subq_key"from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.subq.ai/v1",
api_key=os.environ["SUBQ_API_KEY"],
)
with open("monorepo_bundle.txt") as f:
entire_repo = f.read()
response = client.responses.create(
model="subq-savant-1.4",
input=entire_repo + "\n\nWhere is auth token verification handled across services?",
)
print(response.output_text)Frequently Asked Questions
Q:How does SubQ Savant achieve a 4M context window at $0.10 per 1M tokens?
SubQ replaces quadratic dense self-attention with Subquadratic Sparse Attention (SSA), which isolates only high-value token relationships and reduces compute from 1,157 PFLOP to 2.0 PFLOP.
Q:What API format does SubQ Savant use?
SubQ Savant exposes an OpenAI-compatible endpoint at https://api.subq.ai/v1 supporting client.responses.create with model subq-savant-1.4.
Q:Does accuracy hold up across the full 4 million tokens?
Yes. SubQ reports 92.6 on RULER at 4M tokens across 13 retrieval and aggregation tasks, and 84.5 on AA-LCR avg@3 multi-document reasoning.
Q:When should I still pair Savant with vector RAG?
Use vector retrieval when corpora exceed 4M tokens (hundreds of millions of rows) or require sub-50ms filtering; inside 4M tokens, Savant processes raw documents directly without chunking.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.