Composable AI conditioning primitives for stability, coherence, and signal smoothing.
Project description
livingcircuit
Composable AI conditioning primitives for stability, coherence, and signal smoothing.
Free · No API keys · No bloat · Drop them in, layer them together.
Install
pip install livingcircuit
For PyTorch support (AdaptiveAmplitudeStabilizer nn.Module):
pip install livingcircuit[torch]
Why it matters
Most AI systems today rely on brute force. These small primitives give you precise control over how information flows through your models — making them more stable, coherent, and reliable under real-world conditions. Use one to fix a specific problem, or stack several to stabilize the whole pipeline.
Modules
| Module | What it does | Best for |
|---|---|---|
AdaptiveAmplitudeStabilizer |
Softens activation spikes in transformer blocks | High-concurrency inference |
adaptive_amplitude_stabilizer |
Scalar form — no dependencies | Any single-value signal |
harmonic_vector_stabilizer |
Latent coherence conditioner using golden ratio harmonics | Long reasoning chains |
SimpleVoiceToneAnalyzer |
Reads tone and intensity from raw audio | Voice-first applications |
stabilize_solar_output |
Discrete-time smoother with carried state | Output continuity |
Quick start
import numpy as np
from livingcircuit import harmonic_vector_stabilizer
t = np.linspace(0, 4 * np.pi, 256)
result = harmonic_vector_stabilizer(t)
print(result["quality_score"]) # coherence ratio
print(result["energy"]) # mean signal energy
Composable stack
These modules are designed to layer together across different parts of the same pipeline:
raw input
→ SimpleVoiceToneAnalyzer # tone + intensity
→ harmonic_vector_stabilizer # latent coherence
→ AdaptiveAmplitudeStabilizer # activation control
→ model block (attention + FFN)
→ adaptive_amplitude_stabilizer # scalar output smoothing
→ stabilize_solar_output # signal continuity
→ stable output
Transformer block stabilization
import torch
from livingcircuit import AdaptiveAmplitudeStabilizer
stab1 = AdaptiveAmplitudeStabilizer(dim=768, layer_idx=0)
stab2 = AdaptiveAmplitudeStabilizer(dim=768, layer_idx=1)
# In your forward pass
attn_out = self.attn(self.norm1(x))
x = x + stab1(attn_out)
ffn_out = self.ffn(self.norm2(x))
x = x + stab2(ffn_out)
Voice-aware response shaping
import numpy as np
from livingcircuit import SimpleVoiceToneAnalyzer, harmonic_vector_stabilizer
analyzer = SimpleVoiceToneAnalyzer()
audio = np.random.randn(16000).astype(np.float32) * 0.1
tone_result = analyzer.analyze(audio)
print(tone_result["tone"], tone_result["intensity"])
# Feed intensity into harmonic conditioner
t = np.linspace(0, 4 * np.pi, 256) * tone_result["intensity"]
latent = harmonic_vector_stabilizer(t)
print(latent["quality_score"])
Scalar signal continuity
from livingcircuit import adaptive_amplitude_stabilizer, stabilize_solar_output
readings = [1.0, 1.4, 0.9, 1.1, 1.3, 0.8, 1.2]
set_pt = readings[0]
memory = 0.0
for i in range(1, len(readings)):
bounded, set_pt = adaptive_amplitude_stabilizer(
readings[i], set_pt, variance_limit=0.3, impedance=0.5
)
smoothed, memory = stabilize_solar_output(
bounded, readings[i - 1], dt=1.0, memory=memory
)
print(f"raw: {readings[i]:.2f} → smoothed: {smoothed:.4f}")
License
MIT — free for any use. No restrictions on the public layer.
The Living Circuit LLC · thelivingcircuit.ai · ghost@thelivingcircuit.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livingcircuit-1.0.1.tar.gz.
File metadata
- Download URL: livingcircuit-1.0.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d313871d3e2563fa7b264627e69bba03f11219a3aabe2e95a85a02b6e56633ea
|
|
| MD5 |
f7f4b4af779b20131096c6984cd122d3
|
|
| BLAKE2b-256 |
b7cd8a58bcc002b3f18a04024ed1851cd03c848c1d54ce14bf1e5738bc6e655b
|
File details
Details for the file livingcircuit-1.0.1-py3-none-any.whl.
File metadata
- Download URL: livingcircuit-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3913d7a3f8e0bd71309c8d7a0ce782ab3eb42c91b5f5454526d697f39efdd470
|
|
| MD5 |
8ff4312cef0c56324abd37dea1c2e518
|
|
| BLAKE2b-256 |
419cbe855de84be1207e6623201df3fae7f0de7ffbffc148b952f57e513f5fb0
|