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]
Modules
| Module | What it does | Layer |
|---|---|---|
AdaptiveAmplitudeStabilizer |
Softens activation spikes in transformer blocks | Activation amplitude |
adaptive_amplitude_stabilizer |
Scalar form — no dependencies | Scalar signal control |
harmonic_vector_stabilizer |
Latent coherence conditioner using golden ratio harmonics | Latent coherence |
SimpleVoiceToneAnalyzer |
Reads tone and intensity from raw audio | Input classification |
stabilize_solar_output |
Discrete-time smoother with carried state | Output smoothing |
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:
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 example
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.0.tar.gz.
File metadata
- Download URL: livingcircuit-1.0.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5579c13dc91af6e872e3e054d90c728a2590db7dd1b2997d379a620adda64ec
|
|
| MD5 |
c0a9d77fc0aa467208b049c67ce2caa7
|
|
| BLAKE2b-256 |
ad7b75875de0576c43ce34fac36f9e4f70144e7c3d636213c7d0f6bdeaa5f21b
|
File details
Details for the file livingcircuit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: livingcircuit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 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 |
9afbc2da4fce9c571c1b83b06eb27ba30221ebd0e08a402657eafef866305000
|
|
| MD5 |
e34f4dde1a1aa2864e317dc845baff44
|
|
| BLAKE2b-256 |
f0903e88c6bd6889753944ffaa5794760ebe68bd633c5ae1f3d5aecbc37ba437
|