Skip to content
View NikolasMarkou's full-sized avatar
🎯
Focusing
🎯
Focusing

Block or report NikolasMarkou

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
NikolasMarkou/README.md

Nikolas Markou

Machine Learning & AI: Strategy, Architecture, Implementation

Mission-critical AI systems fail for two reasons: flawed architecture or flawed implementation. I correct both.

LinkedIn Electi Consulting Email

About

Managing Partner & Head of AI at Electi Consulting (Limassol / London). 14+ years building and fixing AI systems across shipping, telecom, IoT, autonomous driving, computational photography, blockchain, and finance for clients including the European Central Bank, MSC Mediterranean Shipping, Hellenic Bank, and EuroBank. Each domain enforces different engineering constraints. The accumulation is what makes the solutions hold.

Technical range spans real-time computer vision and object detection pipelines, novel neural architectures, GPU-optimized inference in C++/CUDA/TensorRT, LLM/RAG frameworks, agentic system architecture, and containment for high-stakes GenAI deployments. I also conduct AI due diligence for M&A and startup valuations.

35+ open-source repositories. I ship code, not papers. US patent holder. MSc with Distinction from Imperial College London. Expert Advisor to the Cyprus National AI Taskforce and published AI National strategy here.

When to Reach Out

Most engagements fall into one of four shapes:

AI audit or technical due diligence. You need a defensible, forensic read on an ML pipeline, model, or data system. Typical triggers: pre-funding, M&A target assessment, post-incident review, or a board asking hard questions about a production model.

Remediation of a failing system. Silent model drift, pipelines that break under load, a GenAI deployment that cannot ship safely, unstable training runs, or reproducibility loss. I diagnose root cause and re-architect what actually needs to change, not what is merely easy to change.

GenAI architecture for high-stakes use cases. LLM, RAG, or agentic systems where accuracy, privacy, or reputational risk matter. Evaluation harnesses, containment, prompt-injection defense, and system design from day one rather than bolted on later.

GPU and inference optimization. Models work but are too slow or too expensive in production. CUDA, TensorRT, ONNX, graph surgery, quantization, and architecture refactoring.

If any of that fits, email me with a short description of the problem and the constraints. I respond within 48 hours.

Core Technologies

Languages

Python C++ C CUDA JavaScript

ML / Deep Learning

TensorFlow Keras PyTorch ONNX TensorRT

Infrastructure & Tools

Docker gRPC Linux Git

Open Source

Frameworks

Keras 3 / TensorFlow 2.18 library that consolidates research scattered across papers and one-off repositories into one tested codebase: 100+ model packages, ~380 layer modules, 56 loss modules, and 90+ training pipelines. Apache 2.0, sponsored by Electi Consulting.

  • Models across 13 families. Language (Gemma, Qwen3, Mamba, Zamba2, ModernBERT, ColBERT, Byte Latent Transformer, HRM, Tiny Recursive Model), vision (ConvNeXt V1/V2, DINO v1-v3, Swin, BEiT, MAE, YOLOv12, DETR, Depth Anything, SuperPoint/LightGlue), vision-language and generative (CLIP, MobileCLIP, FastVLM, SAM 1/2/3, SD3 MMDiT, DiT), time series (TiRex, N-BEATS, DeepAR, xLSTM), world models (Video-JEPA, LeVJEPA, LEWM), plus graph, KAN, neural computer, and tabular architectures.
  • Registry-driven layer factories. Swap components by string key: 37 attention mechanisms, 22 FFN variants, 19 normalizations, 25 activations, 16 embeddings, 12 transformer blocks, plus MoE, normalizing flows, and mixture density layers.
  • Losses and optimizers. AnyLoss turns 16 confusion-matrix metrics (F1, MCC, balanced accuracy) into differentiable losses for imbalanced data. Calibration-aware and domain-specific losses, and custom optimizers (Muon, VSGD, SGLD, Gefen) alongside WW-PGD, a WeightWatcher spectral projection applied during training.
  • ModelAnalyzer. Multi-model diagnostics across weight health, calibration, information flow, training dynamics, spectral analysis (WeightWatcher-style generalization estimates without test data), and diagonal Fisher information.
  • Verified, not asserted. 1,700+ test modules mirroring the source tree. Ports are checked numerically against reference implementations, some committed as executable oracles. Backed by 130 research write-ups and 5 LaTeX papers built against the codebase.

Python framework for conversations and agents that must follow a fixed structure. The flow is a finite state machine in JSON; the LLM only does the language work inside each state. Transitions are deterministic and unit-testable, and the model is consulted only when two rules tie. v0.12, Apache 2.0, Python 3.10 to 3.12.

  • Two-pass turn model. Pass 1 extracts data into context, JsonLogic rules pick the next state, Pass 2 replies from the state the conversation actually landed in. Handlers at 8 lifecycle points, FSM stacking for sub-flows, intent classification and routing, streaming, session save and restore, and native tool calling or JSON-schema output per state.
  • Agents. 18 patterns behind one factory (ReAct, ReWOO, Reflexion, plan-and-execute, debate, orchestrator, swarm, maker-checker, native function calling, and more), plus agent graphs, human approval, memory, MCP, A2A, and a meta-builder that designs FSMs, workflows and agents by chat.
  • Reasoning and workflows. A solver that selects one of 9 reasoning strategies, runs it as stacked FSMs, validates and retries. An async workflow engine with 11 step types (LLM, agent, conversation, parallel, retry, switch, timer, event).
  • Knowledge and skills. Reads, validates and writes Open Knowledge Format bundles, and loads Agent Skills (SKILL.md) folders as read-only agent tools. All bundle and skill text is treated as untrusted data and never executed.
  • Operations. Any LiteLLM provider behind a single LLM layer with usage counters, internal and secret-looking context keys kept out of prompts, a FastAPI monitoring dashboard with optional OpenTelemetry export, and CLI tools for chat, validation, visualization and evaluation.
  • Measured honestly. 11,400+ offline tests on a fake model, 100 runnable examples in 8 categories that double as evaluation baselines, and an eval harness reporting pass rates with Wilson confidence intervals over repeated scripted runs.

Research and Novel Architectures

NumPy library for building and manipulating regular N-dimensional simplexes as maximally separated, symmetric vector sets for neural networks. In a regular N-simplex the N+1 vertices are equidistant and every pair meets at cos θ = -1/N, so they approach orthogonality as N grows. v0.2, MIT, 70+ tests from 1D to 1000D.

  • Exact eigenvalue calibration. Auto-calibration sets the edge length to d = sqrt(2N), so the scaled Gram matrix MMᵀ/N has a maximum eigenvalue of exactly 1.0, keeping signal scale stable when the structure is stacked in deep networks.
  • N-dimensional rotations. Rotation matrices built from Givens rotations applied directly to rows, O(N³) instead of the earlier O(N⁵), plus a chainable Simplex class to rotate and offset the vertex set.
  • Two documented ways to use it in Keras. A frozen simplex classification head that is always full rank and correctly scaled, or trainable representations with a Gram-determinant volume loss that discourages dimensional collapse in open-set, contrastive and self-supervised setups.
  • Framework-agnostic output. Plain NumPy arrays, usable from any deep learning framework.

Hierarchical VAE that decomposes images into a pyramid of per-scale latent representations, a learnable alternative to wavelet decomposition. Each resolution level has its own encoder and decoder with configurable blocks (Squeeze-Excite, MobileNet V2/V3, Self-Attention, ResNet). Reconstructs coarse-to-fine via residual merging with a composite multi-component loss.

Bias-free CNN library for blind image denoising, based on the CVPR 2020 bias-free CNN paper. Removing all bias terms makes every output a pure weighted combination of input pixels, providing full interpretability. Multi-scale processing via Laplacian and Gaussian pyramids, with three custom regularizers (soft orthogonal, effective receptive field). Up to 57% MAE reduction across noise levels 20 to 80. Deployable via TFLite.

AI Engineering Tooling

Claude Code skill that keeps an agent from losing the plot on long, hard tasks. The context window is treated as volatile RAM and the filesystem as disk: every finding, decision, pivot and dead end is written to a plan directory as it happens and re-read on a schedule. Work runs through a six-state machine: Explore, Plan, Execute, Reflect, Pivot, Close. v2.71, Apache 2.0, 1,191 tests, plain Node.js scripts with zero dependencies.

  • Explore before acting. The agent reads the codebase first and cannot plan until it holds at least 3 indexed findings. The plan comes back for approval before any code changes, with success criteria, assumptions, failure modes and a pre-mortem.
  • Hard limits on runaway fixes. Each step is committed on success. A failing step gets 2 fix attempts (revert, delete or minimal change), then the agent reverts and asks. A 10-line rule, a 3-strike rule that forces a pivot, a complexity budget (max 3 new files, 2 new abstractions), and caps on re-plans and review rounds.
  • Memory that compounds. Closed plans merge into cross-plan ledgers (findings, decisions, lessons) and a curated system atlas that the next plan reads first, so each task starts already knowing the codebase.
  • Auditable on disk. Decisions that survive a failed alternative are anchored in code as DECISION comments. Every edit is logged with a blast-radius score, and a validator checks protocol compliance and hard-blocks a step that breaks the leash or iteration caps.
  • Optional sub-agents. An orchestrator dispatches 7 specialists (parallel explorers, plan writer, executor, verifier, adversarial reviewer, hygiene sweep, archivist). Six presentation contracts stop it from summarizing away verifier tables and reviewer concerns. Without the agents, one thread runs the same state machine.
  • Dashboard. A local, offline site with a live view of the running plan, every plan and ledger, search, and token usage per plan and per agent.

Claude Code skill that turns "I don't know how this works" into a quantified, validated model of how it works. Hand Claude a black box (an API, a device, a forecast, a vendor claim) and it runs a structured scientific investigation, writing every hypothesis, probe and update to disk. The deliverable is a predictive model with uncertainty bounds that has been tested against a naive baseline, not a narrative summary. v7.16, GPLv3, 885 tests.

  • Gated six-phase protocol. Setup, boundary mapping, causal analysis, parametric identification, model synthesis and validation, plus sub-phases for domain orientation, scope interrogation and abductive expansion. Every phase has an exit gate enforced by script; no skipping.
  • Five depth tiers. RAPID for screening papers and vendor claims, LITE, STANDARD, COMPREHENSIVE with recursive decomposition, and PSYCH for behavioral profiling (OCEAN, Dark Triad, MICE).
  • Calibration enforced in code. Bayesian hypothesis tracking with likelihood-ratio caps by phase, one data point per update, a mandatory adversarial hypothesis, and no hypothesis above 0.80 posterior without a disconfirming test. Candidate hypotheses are promoted only above a coverage threshold, which prevents hypothesis explosion.
  • Real modeling tools. 14 Python CLIs: ARX/ARMAX/NARMAX system identification with bootstrap uncertainty, ARIMA/ETS/CatBoost forecasting, spectral analysis, time-series diagnostics, conformal and CQR prediction intervals, and System Dynamics, Monte Carlo, agent-based and discrete-event simulation with sensitivity analysis.
  • 15 specialist sub-agents under one orchestrator, one per phase plus a cognitive-bias auditor, session clerk and research scout. 41 reference documents supply domain knowledge, and causal graphs and state machines are rendered as Mermaid diagrams.
  • Survives context loss. All session state routes through files on disk, so a context reset mid-analysis resumes where it left off.

Applied Systems

Multi-account cash flow forecasting engine with a 5-layer pipeline: transfer netting, autonomous recurrence discovery (corrects corrupted upstream flags), decomposition into deterministic and residual components, multi-model competition (ETS, SARIMA, SARIMAX, TiRex ONNX), and trend-adjusted recomposition. Generates structured JSON explainability payloads designed for LLM consumption. 89.2% pass rate across 120 systematic validation runs at 10.2% average WMAPE. Ships with FastAPI web interface, CLI, and Python API.

Credentials

Writing and Talks

I publish long-form analysis on AI engineering failure patterns, architecture trade-offs, and what production ML actually looks like under load. Most of it lives on LinkedIn (30K+ followers).

Recent talks:

  • AI from the Trenches, IMH / CYIT, March 2025
  • HPC for Hyperparameter Search, NCC Romania, March 2024

For AI strategy, architecture review, or technical due diligence:

nikolas.markou@electiconsulting.com | electiconsulting.com | LinkedIn

Pinned Loading

  1. dl_techniques dl_techniques Public

    Advanced deep learning learning techniques, layers, activations loss functions, all in keras / tensorflow

    Python 27 1

  2. blind_image_denoising blind_image_denoising Public

    Implementing CVPR 2020 paper "ROBUST AND INTERPRETABLE BLIND IMAGE DENOISING VIA BIAS - FREE CONVOLUTIONAL NEURAL NETWORKS"

    Jupyter Notebook 10 1

  3. multiscale_variational_autoencoder multiscale_variational_autoencoder Public

    Building a multiscale variational autoencoder

    Python 6 1

  4. fsm_llm fsm_llm Public

    A Finite State Machine hybrid with Large Language Models

    Python 18 1

  5. epistemic-deconstructor epistemic-deconstructor Public

    Claude skill for reverse engineering systems

    Python 25 2

  6. iterative-planner iterative-planner Public

    A Claude Code skill state-machine driven iterative planning and execution protocol for complex coding tasks

    JavaScript 73 6