algenta-general-a
Domain kernels from actuarial to encryption modes. Compiled Mojo, loaded in-process.
100 modules · 998 functions · CPU
Get started
pip install kernels torch
from kernels import get_kernel
kernel = get_kernel(
"thyn-ai/algenta-general-a",
version=1,
backend="cpu",
trust_remote_code=["thyn-ai/algenta-general-a"],
)
kernel.allocation.kelly_criterion(0.6, 2) # -> 0.4 Kelly fraction of capital to stake
backend="cpu" selects the CPU build. On a Mac the loader otherwise looks for a Metal build, which
this family does not ship. trust_remote_code names the repositories you allow; Hugging Face's
trusted publishers load without it.
Plain Python in, plain Python out. Lists, tuples, buffers and tensors are accepted wherever the
contract expects a list; structured results are dictionaries. Some functions take a list and the
number of elements to use from it, which may not exceed the list's length; multi-dimensional data is
passed flattened, row-major, with its dimensions. Functions that update an argument do so in place,
as help() says. Every call is checked against the published contract before it reaches native
code. An invalid call raises KernelError with a stable code, never a crash. Engine kernels
report shape and finiteness problems as a status; the wrapper raises KernelError named after it.
Any function can also be called by name, with args as a list or a dict of parameter names:
kernel.execute("data.dataframe", "df_from_columns", [...])
What's inside
| Module | Functions | What it does |
|---|---|---|
actuarial |
12 | Actuarial math: present and future value, annuities, mortality and survival rates, loss ratios |
adhesives |
12 | Adhesives: lap shear and peel strength, Arrhenius viscosity, cure and pot life vs temperature |
aerospace |
12 | Aerospace: dynamic pressure, lift and drag, Mach, Tsiolkovsky rocket equation, Hohmann delta-v |
agriculture |
12 | Crop management: growing degree days, crop water need, fertilizer and seed rates, harvest index |
agronomy |
10 | Agronomy: Penman reference ET, radiation-use yield, water stress index, organic matter decay |
allocation |
10 | Portfolio weights: equal, inverse variance, risk parity, Kelly criterion, two-asset frontier |
anomaly |
10 | Outlier detection: z-score, IQR, modified z-score via MAD, isolation forest, Grubbs statistic |
antenna |
12 | Antenna and RF links: half-wave dipole, Friis path loss, EIRP, received power, link margin |
apiculture |
12 | Beekeeping: honey yield per hive, colony strength, varroa infestation, syrup ratio, winter feed |
aquaculture |
12 | Fish farming: stocking density, feed conversion ratio, specific growth rate, carrying capacity |
archaeology |
12 | Archaeology: radiocarbon age, linear calibration, artifact density, Sørensen & Margalef indices |
arima |
8 | AR/MA fitting: Yule-Walker via Durbin-Levinson, innovations algorithm, CSS log-likelihood |
astrobiology |
10 | Astrobiology: habitable zone edges, stellar luminosity, equilibrium temperature, Q10 metabolism |
astronomy |
12 | Astronomy: Julian date, sidereal time, solar declination, day length, Kepler solver, magnitudes |
atmospheric_chemistry |
10 | Atmospheric chemistry: Dobson units, photolysis rate, steady-state OH, CO2 forcing, OH lifetime |
auction |
11 | Auctions: first- and second-price winners, English, Dutch and all-pay revenue, VCG, bid shading |
autograd_ops |
10 | Backpropagation primitives: gradients of add, multiply, exp, log, ReLU, sigmoid, tanh, power |
automl |
4 | Hyperparameter search: successive halving, Hyperband brackets, top-k promotion, Latin hypercube |
autonomous_vehicles |
12 | Driving safety: safe following and braking distance, time to collision, headway, GPS HDOP error |
aviation |
10 | Aircraft performance: lift and drag, Breguet range and endurance, indicated vs true airspeed |
battery |
12 | Batteries: state of charge, C-rate, Peukert capacity, cycle degradation, internal resistance |
behavioral_economics |
12 | Behavioral economics: prospect theory, Prelec weighting, hyperbolic and beta-delta discounting |
bioinformatics |
12 | Sequence basics: GC content, Wallace-rule melting temperature, Phred quality, coverage depth |
biomechanics |
12 | Biomechanics: joint torque, limb inertia, stride length, walking energy cost, Hill muscle force |
biomedical |
12 | Clinical formulas: cardiac output, mean arterial pressure, Du Bois BSA, Cockcroft-Gault GFR |
blockchain |
12 | Blockchain metrics: reward halving, mining difficulty, gas cost, attack odds, TPS, staking APY |
bloom_counting |
9 | Counting Bloom filter: add, remove, membership, count estimate, false-positive rate, optimal k |
boolean_algebra |
13 | Boolean logic: AND/OR/XOR/implies/iff, truth tables, DNF and CNF evaluation, majority, parity |
brewing |
12 | Beer brewing: gravity to Plato, ABV, attenuation, Tinseth IBU, Morey SRM color, strike water |
bryology |
10 | Moss and peatland ecology: Sphagnum water holding, growth rate, carbon and peat accumulation |
cache |
8 | Time-to-live cache: put/get with expiry, oldest-entry eviction at capacity, hit-rate tracking |
cardiology |
10 | Cardiac physiology: cardiac output, stroke volume, ejection fraction, MAP, SVR, Fick principle |
category_theory |
10 | Functional list combinators: map, filter, left/right fold, compose, zip, scan, take/drop while |
causal |
10 | Causal inference: ATE/ATT, propensity scores, IPW, difference-in-differences, RD, IV, Cohen's d |
cellular |
11 | Cellular automata: Conway's Game of Life, Wolfram elementary rules, density, still-life test |
ceramics |
12 | Ceramics and glass: Weibull failure probability, thermal shock, porosity, Archimedes density |
chaos |
10 | Chaos theory: logistic, Hénon and tent maps, Lorenz orbits, Lyapunov exponent, bifurcations |
checksum |
11 | Checksums and check digits: Adler-32, Fletcher-16, Luhn, Verhoeff, ISBN, XOR, parity, Internet |
climate |
11 | Weather formulas: Rothfusz heat index, NWS wind chill, Magnus dew point, Tetens vapor pressure |
clustering_metrics |
8 | Clustering quality: Davies-Bouldin, Calinski-Harabasz, adjusted Rand index, purity, inertia |
color |
11 | Color conversion: RGB to HSL/HSV and back, hex encode and decode, blending, distance, grayscale |
color_check |
16 | WCAG text accessibility: relative luminance, contrast ratio, AA pass/fail, text over images |
color_science |
12 | Colorimetry: CIE76 delta E, Lab to LCh, WCAG luminance and contrast, colour temperature, CRI |
column_rank |
0 | Column-name matching: ranks candidates against a hint by edit and Dice similarity, word overlap |
combinatorial |
9 | Combinatorial optimization: 0/1 knapsack, greedy TSP, first-fit bins, Kadane, LIS, coin change |
combustion |
12 | Combustion: stoichiometric air-fuel, equivalence ratio, flame temperature, Carnot efficiency |
composites |
12 | Composite materials: rule of mixtures, Halpin-Tsai, fiber volume fraction, void content |
concrete |
12 | Concrete mix and strength: Abrams' law, water-cement ratio, Nurse-Saul maturity, ACI modulus |
conformal |
6 | Split conformal prediction: calibration quantile, symmetric and normalized intervals, coverage |
contest_strategy |
6 | Motorsport pit strategy: Monte Carlo race simulation with common random numbers, podium odds |
continuous_batching |
10 | LLM serving: KV-cache admission, preemption scores, chunked prefill, time to first token |
contrastive_learning |
10 | Self-supervised losses: InfoNCE, NT-Xent, triplet margin, VICReg, Barlow Twins, MoCo/BYOL EMA |
control |
9 | PID and bang-bang control; first-order step and ramp response, settling time, overshoot |
convex |
9 | Gradient descent, box-projected descent, Adam, Armijo backtracking, L1 soft-thresholding |
copula |
5 | Gaussian copula sampling, Spearman and Kendall tau-b rank correlation, normal CDF and quantile |
correlation |
4 | Cholesky correlated-normal draws; inverse CDFs (normal, triangular, lognormal, Weibull) for LHS |
corrosion |
12 | Corrosion and pitting rates, Nernst and Tafel equations, cathodic protection, service life |
cosmology |
12 | Hubble distances, redshift, lookback time, critical density, Schwarzschild radius, Wien peak |
cost_router |
10 | Inference routing: latency-cost tradeoff, GPU or CPU, quantized or full, MoE or dense, cascade |
counter_rng |
11 | Philox4x64-10 counter-based random numbers: uniform, Bernoulli, exponential, Box-Muller normal |
cryogenics |
12 | Cryogenics: Joule-Thomson cooling, Carnot COP, liquefaction yield, boil-off rate, heat leak |
cryology |
10 | Permafrost and ice: Stefan active-layer depth, frozen-soil conductivity, thermokarst subsidence |
cryptanalysis |
12 | Classical ciphers: index of coincidence, Friedman key length, Kasiski, chi-squared, entropy |
currency |
12 | Time value of money: compound and continuous interest, annuities, amortization, EAR, rule of 72 |
cytology |
10 | Cell biology: nuclear-cytoplasmic ratio, doubling time, mitotic index, viability, apoptosis |
cytometry |
10 | Flow cytometry: percent positive, staining index, CD4/CD8 ratio, spillover compensation, LOD |
data.dataframe |
1 | Columnar data frame: select, filter, sort, group-by aggregates, inner merge, describe, CSV/JSON |
database |
9 | In-memory tables: insert, where filters, sum/mean/min/max/count, sort, inner join, group-by |
decision_analysis |
10 | Decision criteria: expected value and utility, maximin, maximax, Hurwicz, minimax regret, EVPI |
degradation_state |
13 | Two-state Kalman filter for race pace and tyre-degradation slope from lap times, fuel-corrected |
dendrochronology |
10 | Tree rings: ring-width index, exponential detrending, EPS, mean sensitivity, crossdating t-test |
dendrology |
12 | Trees: hypsometer height, crown area, competition factor, form quotient, allometric biomass |
dentistry |
12 | Dental indices: DMFT, plaque and gingival index, attachment and bone loss, anesthesia dosing |
dependency |
7 | Dependency graphs: Kahn topological sort, cycle detection, transitive closure, conflicts |
differentiate |
6 | Finite differences: forward, backward and central, second derivative, polynomial derivative |
diffusion_models |
10 | Diffusion noise schedules: linear and cosine, DDPM posterior, DDIM step, SNR, EDM scaling |
dimensionality |
7 | Principal component analysis by power iteration with deflation, plus covariance and projection |
dimensions |
10 | Unit typing for table columns (count, currency, rate, ratio); checks formulas and aggregates |
discrete_event.contract |
18 | Shared checks for discrete-event simulation: finiteness, tolerances, event order, limits |
discrete_event.queue_sim |
5 | Seeded M/M/1 and M/M/c queue simulation with exponential draws, plus exact steady-state values |
discrete_event.replicate |
2 | Independent replications with Student-t confidence intervals, checked against exact M/M/1 |
discrete_event.resource |
2 | Deterministic multi-server priority queue: replays arrivals and service times, reports waits |
discrete_event.warmup |
2 | Warm-up truncation by MSER batch means, with a before/after audit of initialization bias |
distillation |
12 | Distillation column design: relative volatility, Underwood, Fenske, Gilliland, McCabe-Thiele |
distributed_collectives |
10 | Multi-GPU communication estimates: ring and tree all-reduce steps, alpha-beta latency, overlap |
document_layout |
7 | Page layout from ink masks: text line and column boxes, density grid, column and table scores |
dosimetry |
10 | Radiation dose: absorbed, equivalent and effective dose, decay, kerma, tenth-value layer |
drones |
12 | Drone sizing: thrust-to-weight, hover power, flight time, range, disk loading, tip speed |
earth |
10 | Great-circle geodesy: haversine distance, bearing, midpoint, destination point, bounding box |
ecohydrology |
10 | Water and ecosystems: Gash interception, Priestley-Taylor transpiration, baseflow index, runoff |
ecology |
12 | Population and community ecology: logistic growth, Lotka-Volterra, Shannon, Simpson, Jaccard |
economic_indicators |
12 | Macro indicators: GDP growth, inflation, Gini, Phillips curve, Okun's law, Fisher equation, PPP |
ecophysiology |
10 | Animal energetics: Kleiber scaling, Q10, heat conductance, Fick cardiac output, aerobic scope |
election |
8 | Voting methods: plurality, Borda count, Condorcet, Copeland, instant runoff, approval voting |
electrical |
14 | Circuit basics: Ohm's law, series and parallel resistance, RC and RLC circuits, power factor |
electrochemistry |
10 | Electrochemical cells: Nernst potential, Faraday deposition, Tafel slope, corrosion, capacity |
electrostatics |
10 | Electrostatics: Coulomb force, point-charge field and potential, capacitance, flux, dielectrics |
elevator |
12 | Elevator sizing: trip time, handling capacity, probable stops, motor power, rope safety factor |
encoding |
7 | Categorical encoders: label, one-hot, ordinal, binary and frequency encoding with vocabularies |
encryption_modes |
12 | Block cipher modes: ECB, CBC, CTR and GCM sizes, PKCS#7 padding, AEAD overhead, throughput |
kernel.CONTRACT holds every signature, including the length rules for list arguments;
help(kernel.actuarial) documents each function.
Not included
column_rank.run_column_rank— takes a full JSON request string; reached through the column-ranking session, not a plain in-process call.combinatorial.tsp_greedy— reads its distance argument as a square matrix; a non-square nested list is not expressible as a length rule.contest_strategy.option_board— requires its per-entrant arrays to share one length; a mismatch is not expressible as a length rule.dependency.dependency_depth— walks an adjacency list that must be acyclic and in range; not expressible as a length rule.dimensionality.power_iteration— reads its matrix argument as square; a non-square nested list is not expressible as a length rule.
Requirements
- Apple silicon: macOS 15 or later for the CPU build.
- Linux arm64 and x86-64, glibc 2.35 or later.
kernels0.17 or later and PyTorch 2.5 to 2.14. PyTorch has to be installed: the loader picks the build for your PyTorch version. The kernel itself never imports it.
Windows is not supported.
Notes
Calls into one kernel instance run one at a time; use processes for parallelism. Runtime state
does not survive fork(); start worker processes with spawn.
License
Algenta Community License 1.1 (LICENSE). Free for personal, research and open-source use, and
for internal use at organizations with fewer than 50 employees and under $5M in annual revenue.
Beyond that, a commercial license is required: https://algenta.ai/pricing.
Enforced in the compiled library, not just in this text: one concurrent native worker per device (ABI §9). A second process, family or thread waits its turn rather than running in parallel. That is the Community licence's worker floor made real; parallel execution comes with a commercial license.
Support
Generally Available on the platforms listed under Requirements. Within v1, functions are only added;
removals or signature changes ship as v2. Platforms, accelerators and PyTorch releases not listed are not
supported. Documentation: https://docs.algenta.ai (the kernels guide:
https://docs.algenta.ai/guides/kernels-on-hugging-face). Community: https://discord.gg/w8NDsph9an or this
repository's Community tab. Commercial licences and support: https://algenta.ai/pricing.
- Downloads last month
- 2
- Torch
- 2.14
- OS
- macoslinux
- Arch
- x86_64aarch64