Ternlang is the high-performance ternary runtime supporting Albert, our sovereign MoE-13 Ternary LLM.
The Ternary Intelligence Stack (TIS) provides a fundamental architectural shift for Explainable AI (XAI) and European technological sovereignty by moving beyond the binary limitations of current systems.
Built by RFI-IRFOS · Graz, Austria · Whitepaper [https://osf.io/cyn28/files/8hzux]
→ ternlang-root/README.md (Full explanation, technical details, and compiler specs)
→ ROADMAP.md (Phases 1–20, MoE-13 structure, priority matrix)
→ Ternlang Studio Preview — Our work-in-progress SDK
→ Agent Albert — terminal-native, model-agnostic AI agent built in pure Rust
Ternlang is a systems programming language, compiler, and high-performance inference runtime built on balanced ternary logic.
The core type is trit: three values — −1 (reject), 0 (hold), +1 (affirm). This allows for Deterministic Uncertainty, where the zero state is a first-class routing instruction: "insufficient confidence — do not act yet."
- Explainable AI (XAI) by Design: Auditable decision paths fulfilling EU AI Act Articles 13, 14, and 15.
- Post-Binary Architecture: Custom Instruction Set Architecture (ISA), triadic networking, and memory-efficient ternary encoding.
Albert is our sovereign MoE-13 (Mixture-of-Experts) ternary model. Unlike binary LLMs that "hallucinate confidence," Albert uses 13 domain-specific experts to deliberate on every decision.
- 13 Deliberation Axes: Safety, Ethics, Logic, FactCheck, and more, each voting with ternary signals.
- Safety Hard Gate: A mandatory Axis-6 veto that can terminate any execution path before action is taken.
- Local-First Sovereignty: Designed to run entirely on local infrastructure via Ollama or custom ternary hardware.
Albert is also the terminal-native interface for the TIS. He runs entirely in your terminal, connects to local models (Ollama) or commercial bridges, and never “phones home.”
# Install Albert (brings the full agent engine with it)
cargo install albert-cli
# Launch
albert-cli| Capability | Details |
|---|---|
| Autonomous agent loop | /loop <mission> — runs up to 10 tool-use turns to complete a goal |
| Local-First | Native Ollama support for completely offline and free operation |
| Model-agnostic | Connect to Gemini, Claude, GPT-4o, or Grok as "capability bridges" |
| Self-reflection memory | Commits key facts to local storage to maintain long-term context |
| Feature | Performance Gain | Industry Comparison |
|---|---|---|
| Data Density | 1.25x improvement | 5-trit block packing (8-bit) |
| Logic Consistency | 100% Deterministic | Eliminates binary timeout/null-guessing |
| Safety Latency | < 1ms hard-veto | Axis-6 Veto Hard Gate |
cargo install ternlang-cliThe ternlang binary provides the compiler, REPL, and test runner:
ternlang my_program.tern # → run a .tern file directly
ternlang build my_program.tern # → compile to .bet bytecode| Directory | Contents |
|---|---|
ternlang-root/ |
All Rust crates — compiler, VM, API, MCP server, ML stack |
agent_albert_cli/ |
Agent Albert — terminal-native CLI + TernStudio intelligence layer |
ternlang-root/stdlib/ |
293 open-core .tern modules (Tier 1 — free) |
eriirfos-eng/ternlang-premium (private) |
28,495+ proprietary .tern modules — Tier 2 / 3 / 4 |
# Health check
curl https://ternlang.com/health
# MoE-13 ternary decision via MCP (no key required)
curl -X POST https://ternlang.com/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"moe_orchestrate","arguments":{"query":"Should I proceed?"}}}'| Tier | Price | Details |
|---|---|---|
| Community (LGPL-3.0) | Free | Compiler, VM, CLI, LSP, 293 stdlib modules + 30 MCP tools |
| Pro Standard (BSL-1.1) | €99/month | REST API, server-side memory, Tier 2 stdlib |
| Industrial (BSL-1.1) | €349/month | QNN, SEC, T-HAL, TernAudit + Tier 3 stdlib |
| Enterprise (Proprietary) | From €2,500/month | On-premise, FPGA, custom SLA + Tier 4 stdlib |
The Ternary Intelligence Stack is built by a core team of three co-founders from RFI-IRFOS, Graz:
- Simeon Kepp: Head of Research & Systems Architect.
- Nikoletta Csonka: Head of Strategic Outreach & EU Relations.
- Zabih Karimi: Principal Network & ML Engineer.
- Lisa Scharler: Head of Social Technology & Ecocentric Systems.
- Louis Ehrig: Louis Paul Ehrig Corporate Secretary and Press & Media Relations.
→ Read our BIO and Mission in LEADERSHIP.md
