HFLabs Machine Learning Suite
Optimization, inference, and agent reasoning in one .NET library set, with no cloud service in the loop.
The ML Suite is a family of composable .NET libraries for tuning models, learning over knowledge graphs, running LLMs locally, and building agents that plan and verify their own work. Each library stands alone and has a small surface. They share the same graph and telemetry model, so you can adopt one piece or wire them together. It runs on ordinary CPUs with SIMD acceleration, and targets Intel Level Zero GPUs and Graphcore IPUs when available.
Core Subsystems & Engines
Seven modular libraries designed to stand alone or compose into high-performance local AI pipelines.
Hyperparameter Optimization
Bayesian, Hyperband, BOHB, ASHA-BOHB & TuRBO
A complete HPO framework built around resumable sessions. You ask for the next trial, report a result, and the framework handles budgets, early stopping, and JSON checkpointing.
- Five core algorithms: Bayesian Optimization (Gaussian Process surrogate), Hyperband, BOHB, ASHA-BOHB, and TuRBO (trust-region Bayesian optimization)
- Continuous, integer, and categorical parameter spaces with minimizing or maximizing objectives
- Disk-persisted JSON checkpointing ensuring long exploratory searches survive system restarts
- Built-in benchmark suite to evaluate and compare optimizer convergence against your own objectives
Knowledge Graph Embeddings
6 Scoring Functions & Ontology Extractors
Learn from the structure of a graph and predict missing links with high-dimensional geometric embedding spaces and automated ontology induction.
- Six scoring functions: TransE, RotatE, ComplEx, DistMult, ZPinch-TransE (anchors schema entities near origin), and Dual-Conjugate ComplEx (inverse relations)
- Dual acceleration: SIMD Vector/TensorPrimitives CPU backend and Poplar-native backend for Graphcore IPUs
- Ranking evaluator computing Mean Reciprocal Rank (MRR), Hits@1, Hits@3, and Hits@10
- Ontology auto-extractors building graphs from codebases, schemas, plans, skill files, and white papers
Local LLM Inference (Level Zero)
Native Safetensors, RoPE & Intel GPU Kernels
A pure from-scratch transformer runtime in .NETβnot a wrapper around llama.cpp or an external server. Targets Intel Level Zero GPUs directly.
- Direct Hugging Face safetensors loader with built-in BPE tokenizer and Qwen chat templating
- Decoder layers, rotary position embeddings (RoPE), linear attention, dynamic KV cache, and configurable precision (FP16/BF16/FP32)
- High-throughput beam search and group beam search decoding
- Ships with `l0llm` standalone command-line interactive chat tool
Graph-Constrained Decoding
Tri-Beam Token Trie Verification
Constrains LLM output strictly to what a knowledge graph supports. Eliminates factual hallucinations by construction rather than post-hoc validation.
- Tri-beam decoder that synchronizes beam search candidates against knowledge graph entity boundaries
- Token trie constructed directly over graph entities, ensuring generated text only names valid entities
- Zero post-processing overhead by enforcing graph schema validity during the forward generation pass
- Seamless bridge to Hypertensor GraphRAG in-memory property graph stores
Inference over Graphs
Contextual, Inter-Graph & Sidecar Telemetry
Contextual bias engines, inter-graph multi-topology synchronization, and autonomous sidecar telemetry observers.
- Contextual inference: biases agent and swarm parameters from history using k-means clustering and weighted regression with 8 confidence factors
- Inter-graph inference: runs multiple loosely coupled graphs with excitatory, inhibitory, and modulatory couplings
- Cross-correlation and mutual-information normalization with iterative multi-graph convergence tracking
- Sidecar graphs: observer graphs monitoring compute timing, memory pressure, and bandwidth to forecast bottlenecks
Spiking Neural Networks
Leaky Integrate-and-Fire & STDP Plasticity
A high-performance reference CPU simulator for neuromorphic and event-driven computation with biological plasticity rules.
- Grouped Leaky Integrate-and-Fire (LIF) neurons with event-driven spike scheduling and hop-derived delays
- Biologically grounded Spike-Timing-Dependent Plasticity (STDP) and homeostatic activity gating
- Comprehensive spike-correlation, inter-spike-interval (ISI) analysis, and burst detection diagnostics
- Refractory periods and configurable membrane voltage leak dynamics
Model & Evaluation Utilities
ONNX Analysis, Drift Detection & Time-Series
Production-grade utility toolkit for model profiling, feature extraction, and drift monitoring.
- ONNX operator compatibility analyzer pinpointing IPU bottlenecks and unsupported kernels
- Feature extraction suite including sliding-window time-series feature generators
- Statistical distribution drift detector flagging live inference distribution shifts
- Ranking optimizer and benchmark provider for persisting and comparing multi-run metrics
Knowledge Graph Embedding Scoring Functions
Mathematical formulations optimized with SIMD TensorPrimitives and IPU Poplar native tensor ops.
TransE
||h + r - t|| Translational distance model in continuous vector space.
RotatE
||h β r - t|| Complex vector rotation modeling symmetry, antisymmetry, and composition.
ComplEx
Re(β¨w_r, e_s, e_oβ©) Hermitian dot product in complex embeddings for asymmetric relations.
DistMult
β¨h, diag(r), tβ© Bilinear diagonal formulation for symmetric interaction scoring.
ZPinch-TransE
||(h + r - t) β z|| HFLabs proprietary variant anchoring schema-level ontology roots near origin.
Dual-Conjugate ComplEx
Re(β¨w_r, e_s*, e_oβ©) HFLabs proprietary dual-conjugate space preserving inverse-relation topology.
Built-in Ontology Auto-Extractors
Automatically construct typed knowledge graphs from uncurated artifacts: codebases (AST/symbol resolution), database schemas (foreign key topologies), architectural plans, agent skill files, hardware descriptions (VHDL/Verilog/pinmaps), and white papers.
Local LLM Inference (Level Zero)
A from-scratch transformer runtime implemented in clean .NET without wrapping external processes or servers.
Loads Hugging Face .safetensors directly into mapped pinned buffers with BPE tokenization and Qwen chat formatting.
Rotary position embeddings (RoPE), linear multi-head attention, dynamic KV-cache management, and selectable FP16/BF16/FP32 precisions.
l0llm) Ships with a standalone command-line chat application targeting Intel Iris Xe, Arc, Meteor Lake, and GPU Max accelerators.
Graph-Constrained Decoding
A tri-beam decoder that synchronizes beam search candidates against a token trie built over knowledge graph entities.
At each generation step, logit masks are dynamically computed from valid continuation paths in the knowledge graph trie.
Generated answers are mathematically forbidden from naming entities, relations, or identifiers not present in the graph.
Explores simultaneous structural, semantic, and token-level beams without post-generation fact-checking penalties.
ML.Agentic: 21 Building Blocks & Protocol Engine for Multi-Agent Systems
Dependency-free primitives requiring no external configuration or graph store. Adopt freely for custom agent runtimes.
Planning & Search
4 PrimitivesHierarchical Planner
Decomposes complex multi-stage objectives into recursive sub-goal execution trees.
MCTS Exploration Engine
Monte Carlo Tree Search for structured decision spaces with upper confidence bound (UCB1) selection.
Prioritized Task Scheduler
Dynamic priority queue scheduler balancing dependency constraints and resource limits.
Goal-Progress Monitor
Continuous state evaluator tracking milestone completion and convergence trajectories.
Reasoning & Verification
5 PrimitivesReflection Loop
Self-evaluating critique cycle prompting recursive self-correction and plan refinement.
Chain-of-Verification Pipeline
Generates baseline responses, formulates factual verification questions, and reconciles answers.
Multi-Persona Debate
Orchestrates multi-agent dialectic consensus between competing analytical personas.
Program-Aided Reasoning
Synthesizes and executes deterministic code snippets to verify mathematical logic.
Judge Evaluator
Independent scoring arbiter assessing plan validity, hallucination risk, and goal adherence.
Coordination & Routing
6 PrimitivesBlackboard Architecture
Shared in-memory workspace for asynchronous multi-agent collaboration and state updates.
Semantic Router
Embedding-driven dynamic intent classifier dispatching tasks to specialized agents.
Topology Manager
Defines and enforces agent communication topologies (Ring, Mesh, Star, Hierarchical).
Fallback Chain
Deterministic retry and degradation handler with graceful recovery strategies.
Tool Registry
Typed tool manifest with parameter validation, schema reflection, and execution sandboxing.
Agent Cards
Standardized metadata manifests specifying capabilities, constraints, and latency profiles.
Safety & Control
3 PrimitivesGuardrail Pipeline
Pre- and post-execution policy enforcement intercepting unsafe or out-of-bounds operations.
Human-in-the-Loop Gate
Configurable approval interceptor pausing execution for human operator sign-off.
Resource Budget Ledger
Strict token, compute time, and memory budget tracker with automatic circuit breakers.
Memory & Adaptation
3 PrimitivesMemory Bank
Episodic and working memory store with decay curves and associative retrieval.
Context Compactor
Lossless context summarizer preserving critical causal links while reducing token usage.
Evolutionary Adaptation
Genetic prompt and parameter mutator selecting high-performing agent configurations.
ML.Reasoning Algorithms
Five core algorithms that execute against any data structure implementing the open IKnowledgeGraph interface.
Multi-Hop Causal Path Reasoning
Discovers and scores directed causal inference paths across heterogeneous entity relationships with confidence decay.
Grounding Verifier
Cross-checks LLM assertions against verified graph subgraphs, flagging unsupported claims and entity hallucination.
TAPE Rollout Planning
Rolls out predictive state trajectories over graph-represented domain models before committing actions.
Belief-Desire-Intention (BDI) Engine
Maintains formal world beliefs, updates goal desires, and generates committed intention plans based on graph state.
Cognitive-Bias Detection & Debiasing
Detects confirmation bias, anchoring, and availability heuristics in agent reasoning steps and injects counter-arguments.
Open Core & Agentic Integration
Clean division between open mathematical primitives and enterprise-governed integration infrastructure.
Open Source Primitives
All algorithmic implementations, inference engines, and multi-agent primitives are completely open.
- β 5 Hyperparameter Optimization Engines (Bayesian, BOHB, TuRBO)
- β 6 Knowledge Graph Embedding Models & Scoring Functions
- β From-scratch Level Zero LLM transformer runtime
- β Graph-constrained tri-beam decoder
- β SNN Leaky Integrate-and-Fire simulator with STDP
- β 21 ML.Agentic dependency-free multi-agent primitives
- β 5 ML.Reasoning graph algorithms (IKnowledgeGraph)
Hypertensor Agentic Integration
The paid layer providing managed governance, persistence, security, and orchestration around the open primitives.
- π Hypertensor GraphRAG persistent store & vector indexing
- π Multi-Level Security (MLS) clearance and RBAC governance
- π Production REST endpoints & worker microservice orchestration
- π Distributed telemetry sidecars & telemetry-aware budgeting
- π Enterprise SLA & dedicated compiler optimization support
Why This Exists
“Access to serious optimization, inference, and agent tooling shouldn't depend on a cloud contract or a multi-million dollar GPU cluster. Everything here runs on a workstation, and the hardware backends are optional accelerators, not requirements.”
Build High-Assurance Machine Learning in .NET
Explore the open source repositories, read our in-depth developer manuals, or inquire about commercial integration licenses.