FOQ ARCHITECTURE : SYSTEM 1 FEED-FORWARD
RUNTIME : 100% LOCAL (GPU / CPU / APPLE SILICON) · MIN VRAM : 2.2 GB (8B PQ2_0)
Loading Telemetry...
∵ ⩆ WE TOOK THE OPPOSITE RESEARCH DIRECTION ⩆ ∵

Typed decisions,
not strings of text.

Traditional LLMs generate conversational prose for humans. Foq produces deterministic, typed decisions for software and autonomous agents. 25 ms latency. 0 tokens generated. $0 cost. 100% on your machine.

▶ Foq in 4 minutes: the launch film
4:19
One decision, timed. 25 ms. 100% local, open source.
◈ The Evolution of AI Paradigms
RLCD Architecture
01. LM BERTs, RoBERTa
Embeddings & masking (2018)
02. LLM GPT-3, LLaMA
Raw autoregressive pre-training (2020)
03. RLHF ChatGPT, Claude, Grok
Conversational chat models (2022)
YOU ARE HERE 04. RLCD Foq (System 1)
Typed decisions, Feed-Forward, ECE 0%
05. RLVR o1, o3, DeepSeek R1
System 2 deliberative reasoning models
25 ms
Latency per decision
Measured P50 (21-27 ms on standard GPU)
500×
Faster than LLMs
Zero autoregressive token-generation loop
$0.00
Cost per decision
1 million requests = $0 cloud bill
0 bytes
Outbound data
100% private, air-gapped, no account needed

Why pay to generate useless words?

Using a 70B parameter generative model in the cloud for routing, classification, or urgent triage is like chartering a commercial airliner to cross the street.

MACHINE-NATIVE MODEL

⚡ Foq 8B (Local System 1)

Ternary PQ2_0 Quantization · llama.cpp runtime

Measured latency (P50) 24.8 ms
Cost per million decisions $0.00 (your hardware)
Tokens generated per request 0 tokens (Feed-forward prefill)
Output format 100% typed (Choice, Score, Pydantic)
Statistical calibration (ECE) 0.23% (confidence matches reality)
Behavior under uncertainty Native needs_review (says 'I don't know')
Data privacy 100% local (0 bytes sent)
Network / API dependency None (runs offline 24/7)

☁️ Frontier Heavyweight LLM (Cloud API)

OpenAI o1 / Claude 3.5 Opus / GPT-4 Turbo / Llama 3.1 405B

Measured latency (P50) 2,500 to 12,300 ms
Cost per million decisions $10,000 to $35,000
Tokens generated per request 150 to 1,500 tokens (incl. reasoning & formatting)
Output format Free text or parsed JSON with drift risk
Statistical calibration (ECE) Uncalibrated (overconfidence bias)
Behavior under uncertainty Hallucinates wrong answers with confidence
Data privacy Payload sent to third-party servers
Network / API dependency Blocks on outage or quota exceed

The Open-Source Alternative to Jev

The exact same System 1 typed decision primitives running 100% locally on your hardware with 0 cloud dependencies, open weights, and native fail-safe review.

CAPABILITY ⚡ FOQ (OPEN SOURCE) 🔒 JEV (TYPESAFE AI) ☁️ GENERATIVE LLM API
Typed 1-pass decision ✅ 25 ms measured (local GPU) ✅ 150-300 ms (+ network round-trip) ❌ 1-3 s token-by-token loop
Calibrated probabilities ✅ Published RLCD + ECE 0.23% ⚠️ Undisclosed black box ❌ Uncalibrated overconfidence
Says 'I don't know' ✅ Native needs_review fail-safe ❌ Always answers blindly ❌ Hallucinates with confidence
Known-error repair ✅ Auditable patches (patched_by) ❌ Impossible (closed vendor) ❌ Single regressions cannot be fixed
Data privacy ✅ 100% on-premise (0 bytes leak) ❌ Every payload sent to US cloud ❌ Every payload sent to cloud
Cost ✅ $0.00 / €0 forever (your hardware) ❌ Expensive subscription + usage fees ❌ Per-token billing forever
Offline / Air-gapped ✅ 24/7 without internet or account ❌ Fails if network or API is down ❌ Fails without network
Adapts to your domain ✅ 12-min local LoRA (+10.7 pts) ❌ Wait for vendor roadmap ❌ Fine-tuning takes weeks/thousands $
Weights & License ✅ Open (MIT Code + Apache 2.0 Weights) ❌ Proprietary closed-source ❌ Proprietary closed-source
01 // PROVABLE DATA

Trust is measured, not promised

Our benchmarks replay directly on your machine with open-source scripts; closed alternatives like Jev require blind faith in vendor claims.

02 // FAIL-SAFE ENGINE

The only engine that knows when to say 'I don't know'

Below your programmable threshold, Foq triggers needs_review = True instead of returning an ungrounded guess, routing the decision safely.

03 // LOCAL DOMAIN TUNING

Adapts to your business in 12 minutes

The LoRA training pipeline is bundled. The +10.7 points accuracy boost on domain-specific classification is measured, reproducible, and private.

04 // ZERO CLOUD RISK

Air-gapped and sovereign by design

Zero outgoing telemetry or cloud dependencies. Operates strictly inside isolated on-premise clusters with guaranteed compliance.

Why 8 Billion Parameters Matter: Foq vs Laya

We benchmarked Foq head-to-head against Laya (Convai's 420M ModernBERT router) on an RTX 3060. Real measurements on accuracy, adversarial robustness, throughput, and the real memory paradox.

Memory Paradox: Foq 8B vs Laya Memory Profiling
The Memory Paradox: Foq uses 44% less total memory (4.8 GB vs 8.6 GB) despite 19x more parameters, thanks to native C++ and 1.58-bit ternary quantization.
Robustness: Foq 8B vs Laya on Adversarial Tests
Adversarial Robustness: Sub-billion models collapse on negations (14.6%) and prompt injections (7.9%), and fail critical emergency triage with 100% false confidence.
Performance: Foq 8B vs Laya Latency and Throughput
Throughput & Latency: Foq achieves 102.0 dec/s (+134% throughput) and 20.7 ms median latency via C++ prompt caching.
Mathematical Calibration: Foq RLCD vs Sub-Billion Confidence
Mathematical Calibration: Foq achieves ECE 0.23% via RLCD, while sub-billion models hallucinate on out-of-distribution inputs with 100% false confidence.
TEST / OPERATIONAL METRIC ⚡ FOQ 8B (PQ2_0, C++) 🔷 LAYA (MODERNBERT 420M) PRODUCTION IMPACT
Real-World Accuracy ✅ 100.0% (9/9 correct) ⚠️ 77.8% (7/9 correct) Foq is flawless on operational benchmarks; Laya hallucinates on critical paths.
Emergency Triage ('DB down') ✅ 100% Urgent (Safe) ❌ 0% (Hallucinated False / 100% conf) Catastrophic failure: Laya classifies critical database outage as non-urgent.
Prompt Injection Resistance ✅ 100% Immune (99.8% conf) ❌ 7.9% Confidence (Collapsed) Foq strictly isolates the payload; Laya is completely destabilized by prompt attacks.
Complex Negations ('is NOT billing') ✅ 98.2% Accurate & Confident ❌ 14.6% Confidence (Collapsed) 420M encoders lose semantic grounding on simple negations.
Multilingual Ticket Routing ✅ 100% Accurate (De -> De) ❌ 50% (German sent to English) Laya router misroutes non-English tickets.
Sequential Throughput ✅ 102.0 dec/sec (Prompt-cache) 43.5 dec/sec (PyTorch) +134% sustained throughput advantage for Foq via C++ KV slot reuse.
Median Latency (P50 RTX 3060) ✅ 20.7 ms 22.6 ms Foq is faster than a 420M model while having 19x more capacity.
System RAM (RSS) ✅ 2.54 GB (2,538 MB) 3.35 GB (3,352 MB) Native C++ avoids heavy PyTorch / HuggingFace runtime overhead.
GPU VRAM Reserved ✅ ~2.80 GB (2.25 GB allocated) 5.31 GB (4.47 GB allocated) 1.58-bit ternary compression vs keeping 3 FP16 models resident.
Total Real Memory (RAM + VRAM) ✅ ~4.8 GB Total ❌ ~8.6 GB Total Foq uses 44% less memory in real operations while being 19x larger.
JSON / Pydantic Extraction ✅ Full 'extract' schema support ❌ Classifier only Foq extracts structured data; Laya is restricted to fixed labels.
01 // ZERO-HALLUCINATION TRIAGE

No dangerous blind guesses

When tested on an emergency database outage, Laya declared the incident not urgent with 100% overconfidence. Foq correctly flagged it as critical in 20 ms.

02 // THE REAL MEMORY PARADOX

44% less memory despite 19x more params

Sub-billion models seem light on paper, but multi-domain routing requires multiple models in memory (~8.6 GB RAM+VRAM). Foq's native C++ PQ2_0 ternary engine runs in just ~4.8 GB total.

03 // LINGUISTIC RESILIENCE

Immunity to negations and attacks

Add 'is NOT' or an adversarial prompt injection, and Laya's confidence collapses to 7-14%. Foq 8B possesses the full linguistic intelligence to parse context accurately.

04 // +134% FASTER THROUGHPUT

102 decisions/second sustained

Through llama.cpp's custom C++ prompt cache and KV slot reuse, Foq processes over 102 decisions per second on a single consumer GPU, more than double Laya's 43.5 dec/s.

REPRODUCIBLE BENCHMARK All numbers are 100% empirical and verifiable on your own hardware using our reproducible test suite:
python examples/benchmark_foq_vs_laya.py

Test Foq live in action

Select a scenario below or enter your own custom text. Watch the instant execution, calibrated probability distribution, and the native needs_review fallback trigger.

SYSTEM 1 ENGINE RESULT 24.1 ms
TYPED CHOICE: CRITICAL_URGENT
CALIBRATED CONFIDENCE: 98.4%
FAIL-SAFE STATUS: needs_review = False (VALIDATED)

        

Measure the impact on your bills and response latency

Compare your current cloud API budget with running Foq locally on your existing servers or developer hardware.

50k 1M 5M 10M
$420,000
Net annual financial savings with Foq
40917 hours (1704.9 days)
User waiting time and network latency eliminated
11.4 GB kept 100% on-premise
Confidential customer data kept on-premise (0 leaks)

The 4 Superpowers of Foq

Mathematically built for deterministic decision-making and direct integration into mission-critical software pipelines.

[ PILLAR 01 ]

Zero generated tokens (Prefill-Only)

Traditional LLMs waste 95% of their compute in sequential token-by-token decoding loops. Foq evaluates context in a single feed-forward pass (autoregressive short-circuiting) and immediately projects the internal state onto allowed typed classes.

[ PILLAR 02 ]

Mathematical Calibration via RLCD (ECE 0%)

Uncalibrated LLMs claim 99% confidence even when completely hallucinating. Foq incorporates Temperature Scaling T* and RLCD: when it reports 80% confidence, the verdict is factually accurate in exactly 80% of real-world trials.

[ PILLAR 03 ]

The only engine that knows when to say 'I don't know'

Below your programmable confidence threshold (e.g. 85%), Foq never guesses blindly. It automatically triggers needs_review = True to escalate the case to human oversight or a tier-2 deliberation agent.

[ PILLAR 04 ]

Auditable weight patches (patched_by)

Every edge-case failure or production regression becomes a documented, auditable patch in weights and projection rules, accompanied by automated regression tests in the benchmark suite.

Every number is measured and verifiable

Marketing claims are cheap. The metrics below are generated by open-source benchmark scripts in the repository across 150 real production test cases.

Latency benchmark chart Foq vs LLM API
Fig 1. Client-side P50 latency: Foq 8B (25 ms) vs Cloud LLM API (2,000 ms) vs Reasoning LLM (12,300 ms).
Cost benchmark chart per million queries
Fig 2. Cumulative cost per million decisions: Foq ($0) vs commercial LLM API (up to $10,000).
RLCD calibration ECE benchmark chart
Fig 3. Expected Calibration Error (ECE): reduced from 6.65% to 0.23% after RLCD statistical tuning.
Production exam accuracy test scores chart
Fig 4. Production exam accuracy (security, prompt injections, triage): 100% across 150 cases.

Three lines of code to automate

Integrate Foq into your Python backend, Docker microservices, or TypeScript worker without any network overhead.

from foq import FoqEngine, Choice

# Initialize System 1 Engine (100% local on port 8089)
engine = FoqEngine("http://127.0.0.1:8089")

# Instant typed decision (< 25 ms, 0 tokens generated)
verdict = engine.decide(
    context="Login attempt with ' OR '1'='1 from IP 194.26.29.11",
    schema=Choice["BLOCKED", "ALLOW", "CHALLENGE"],
    min_confidence=0.85
)

print(verdict.choice)          # 'BLOCKED'
print(verdict.confidence)      # 0.9984 (Calibrated ECE 0.23%)
print(verdict.needs_review)    # False
print(verdict.latency_ms)      # 24.2 ms
print(verdict.cost)            # $0.00

We give a FAQ

Direct engineering answers, zero buzzwords.

What is a 'System 1' Model? +
Referring to Daniel Kahneman’s dual-process theory, System 1 denotes fast, instinctive, and automatic decision-making, in contrast to System 2 (slow, deliberative, step-by-step reasoning). Traditional conversational LLMs (GPT, Claude) are forced to deliberate word-by-word. Foq is trained specifically to classify and decide in a single feed-forward compute pass (prefill-only), dropping latency to ~25 ms.
Is Foq just a compressed small LLM? +
No. A small quantized LLM still sequentially decodes text tokens and still suffers from hallucination and JSON syntax breaks. Foq completely bypasses the autoregressive decoding loop: output heads project internal representations directly onto typed primitives (Choice, Score) calibrated via RLCD (ECE 0.23%).
How is this different from JSON Mode or Structured Outputs? +
Cloud API structured outputs force a generative model to generate a JSON syntax character by character: you pay for every bracket and quote, wait 2 to 3 seconds of network and decoding latency, and receive uncalibrated probabilities. Foq returns the typed object directly in memory in 24 ms with zero syntax overhead.
What hardware is required? +
The reflex model Foq 8B (ternary PQ2_0 quantization) takes only 2.2 GB of storage and runs smoothly on any consumer GPU with 4 GB of VRAM (or even directly on x86/ARM CPU). For complex arbitration, the judge model 27B requires ~7.2 GB VRAM (runs on RTX 3060, 4060, or Apple Silicon Macs).
Why is statistical calibration (RLCD) critical? +
In automated software pipelines, if an AI predicts an action with 95% confidence, it must be correct in exactly 95% of cases. Without calibration, LLMs output 99% confidence on wildly inaccurate predictions. With RLCD, Expected Calibration Error (ECE) drops to 0.23%, enabling safe, automated decision thresholds.
Is Foq an open-source alternative to Jev (TypeSafe.ai)? +
Yes. Foq is designed as the direct, 100% local, open-source alternative to Jev by TypeSafe AI. It provides the exact same typed decision primitives (Choice, Boolean, Score) running locally on your hardware with 25 ms latency, 0 generated tokens, zero cloud subscriptions, and fully inspectable Apache 2.0 weights.
Can I migrate existing Jev code to Foq? +
Yes. Foq maintains 1:1 conceptual compatibility with Jev primitives. Instead of sending API calls to a remote cloud, you query the local Foq daemon via REST (port 8089) or Python SDK (from foq import FoqEngine, Choice). The payload formats, typed results, and confidence scores are immediately familiar.
Why choose Foq 8B over lightweight BERT-based routers like Laya? +
While sub-billion models (like Laya's 420M ModernBERT) look lightweight on paper, empirical testing shows they collapse on negations (14.6% confidence), fail critical emergency triage with 100% false confidence, and are vulnerable to prompt injections (7.9% confidence). Foq's 8B base model retains human-level linguistic comprehension and immunity to prompt attacks, operating with 100% accuracy on operational benchmarks.
What is the 'Memory Paradox' between Foq and multi-model routers? +
Multi-domain routers like Laya require keeping separate FP16 models resident in PyTorch for each classification task, consuming ~8.6 GB total memory (3.35 GB system RAM + 5.31 GB GPU VRAM). In contrast, Foq uses 1.58-bit ternary quantization (PQ2_0) within a single native C++ binary, using only ~4.8 GB total (2.54 GB RAM + 2.25 GB VRAM). Foq is 44% lighter in total memory while having 19x more parameters.