Skip to main content

ALCHEM-J: operator-fusion language for swarm-RL-numeric hybrids

Project description

Synth-Fuse ⚡ ALCHEM-J

“Every algorithm is a plugin; every fusion is a pipeline; every pipeline is a JAX transform.”

PyPI Python [License DOI

Synth-Fuse is a JAX-native fusion engine that composes swarm intelligence, reinforcement learning, and numerical algorithms into a single, differentiable, hardware-scalable execution graph—written as one-line spells.


⚡ 30-Second Demo

pip install synthfuse
alj
>>> (𝕀  𝕃(alpha=1.5)  (r=3.8))
>>> run 100
Stage Primitive Meaning
𝕀 ISO/RIME Swarm exploration
𝕃 Lévy Heavy-tailed jumps
Chaos Adaptive perturbation

One-liner Benchmarks

# Continuous optimisation
uv run sfbench "(𝕀 ⊗ 𝕃(alpha=1.5))" --bench rastrigin --dims 1000 --steps 5000

# Combinatorial
uv run sfbench "𝕎 ⊗ ℍ" --bench tsp-200 --pop 256

# Live telemetry
uv run sfmonitor --recipe fql_rime --steps 500

🧪 Pre-Built Recipes (import → JIT)

from synthfuse.recipes import fql_rime, mrbmo_ppo, ns2uo, ntep, stcl

step, state = fql_rime.make(dims=1000, pop=512)
Recipe Spell Use-Case
FQL-RIME (𝔽𝕃 ⊗ 𝕃 ⊗ ℝ𝔽) Flow-guided Lévy + PPO
MRBMO-PPO (𝕊𝕄 ∘ 𝜑 ⊗ ℝ𝕄) Siege-elite PPO
NS²UO (𝕊𝕨 ⊗ 𝕆𝕊) Neuro-Swarm-to-Universal-Opt
NTEP (𝕎 ⊗ 𝕀𝕋) Neural Tool-Embedding Protocol
STCL (𝕊𝕋 ⊗ 𝕎) Semantic-Thermo Compression Loop

📦 Install

# stable
pip install synthfuse

# dev speed-run
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install synthfuse[dev]

🪄 Spell Language (ALCHEM-J)

Symbol Primitive Meaning
𝕀 ISO/RIME Swarm update
PPO/A2C/DQN RL policy
𝕃 Lévy Heavy-tailed noise
𝕊 SVD-UKF Low-rank stabiliser
𝕎 Weierstrass Semantic gravity field
Chaos Adaptive perturbation
𝜑 Meta-gradient Natural-gradient correction
Compose via pure combinators:
  • – sequential fusion

  • – parallel fusion

  • – conditional fusion

Example spell:

"(𝕎 ⊗ 𝕊𝕋 ⊗ ℍ)(sigma=0.7, halt=cos<0.01)"

🧰 CLI Tools

Tool Command Purpose
REPL alj Interactive spell casting
Benchmark sfbench <spell> Standardised perf tests
Monitor sfmonitor --recipe <name> Live telemetry dashboard
Visualise sfviz "<spell>" -f svg Spell → SVG / HTML

🏗️ Adding Your Own Primitive

# alchemj/plugins/my_step.py
from synthfuse.alchemj.registry import register
import jax
import jax.numpy as jnp

@register("𝕏")
def my_step(key: jax.Array, state: PyTree, params: dict) -> PyTree:
    """One-sentence purpose. Failure: alpha<0 → divergence; caught by CI."""
    alpha = params.get("alpha", 1.0)
    return state.replace(x=state.x + alpha * jax.random.normal(key, state.x.shape))

Micro-bench in tests/test_my_step.py → open PR → fast-merge.


🧪 Emergent Behaviours (observed & bounded)

Behaviour Mechanism Control Signal
Spontaneous decentralisation consensus dominance modularity Q ≥ 0.3
Crosstalk-free routing zeta pole separation σ_zeta gradient
Thermal self-balancing Hamiltonian heat term κ ≤ max-current-density
Topology-safe compression semantic load Λ ≥ τ rollback if Λ < τ
Single-shot convergence Weierstrass smoothing σ_min clamp

🔐 Security & Safety

  • Pure functions only – no side-effects inside step.

  • Sandboxed execution – external I/O outside JIT.

  • Checkpoint every 15 min – rollback < 30 s.

  • Formal verification hooks exported for external provers.

📜 Citation

@software{synthfuse2026,
  author = {Jimenez, J. Roberto and K2, Kimi},
  title = {Synth-Fuse: A Modular Fusion Library for Hybrid Swarm–RL–Numerical Intelligence},
  url = {https://github.com/deskiziarecords/synthfuse},
  version = {0.1.0-alpha},
  date = {2026-01-17},
  license = {Apache-2.0}
}

Support Me

If you would like to support the development of these resources, consider contributing towards helping me get some gear for continued improvement or simply treating me to a coffee. Your support means a lot!" buy me a coffee


🤝 Contributing

We treat PRs like spells: pure, composable, JIT-ready.
Read CONTRIBUTING.md → open issue/PR → fast-merge.


💬 Community

Welcome to the fusion – cast your spell.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synthfuse-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synthfuse-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file synthfuse-0.1.0.tar.gz.

File metadata

  • Download URL: synthfuse-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for synthfuse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43919b00a52a1082f384cd02fedcc5102b7651781eb8b072fc538fc44326b227
MD5 127e1e3910979dab2402c06bb25d3b37
BLAKE2b-256 82c1e547c923ab5ec1c0e3d7b4aa51d2e4356fba2e7cb6b41497f905fd25e5a9

See more details on using hashes here.

File details

Details for the file synthfuse-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: synthfuse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for synthfuse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9d5218668ed42a80bb0ae2907d756afe0a54053da0793efe6f2ad86be835570
MD5 32ed4b21bae90426b6ef537d7017ed26
BLAKE2b-256 15dc8830530792eaf1983451276873be52152cd3f0d69c9609978875b4223906

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page