latent-latency
БесплатноБез исполняемых скриптовНе проверенLatent-Latency Skill
от plurigrid★ 73 звезды на GitHubОб этом скилле
Latent-Latency Skill
Trit: 0 (ERGODIC - mediates space ↔ time)
Bundle: core
Status: ✅ New
The Fundamental Duality
LATENT (Space) ↔ LATENCY (Time)
↓ ↓
Compression Speed
↓ ↓
Representation Response
↓ ↓
dim(z) τ_mix
Core Theorem: Good latent representations minimize latency.
t_response ∝ 1 / compression_ratio(z)
Spectral Gap Bridge
The spectral gap (λ₁ - λ₂) connects both domains:
| Domain | Spectral Gap Role |
|---|---|
| Latent | Separation of clusters in representation space |
| Latency | Mixing time τ_mix = O(log n / gap) |
From Ramanujan graphs (optimal expanders):
gap ≥ d - 2√(d-1) [Alon-Boppana bound]
τ_mix = O(log n) [Logarithmic mixing]
Mathematical Foundation
Latent Space Dynamics
# Encoder: Observable → Latent
z = encode(x) # dim(z) << dim(x)
# Decoder: Latent → Reconstructed
x̂ = decode(z)
# Bidirectional loss
L = ||x - x̂||² + β·KL(q(z|x) || p(z))
Latency Dynamics
# Fokker-Planck: Distribution evolution
∂p/∂t = ∇·(∇L(θ)·p) + T∆p
# Mixing time from Hessian
τ_mix ≈ 1 / λ_min(H)
# Gibbs equilibrium
p∞(θ) ∝ exp(-L(θ)/T)
The Bridge Equation
τ_latency = f(dim_latent, spectral_gap, temperature)
Specifically:
τ_response = (dim(z) / gap) × log(1/ε)
Where:
- dim(z) = latent dimension
- gap = spectral gap of computation graph
- ε = target accuracy
MCP Energy-Latency Tradeoff
From MCP_OPTIMAL_TRANSITIONS.md:
| MCP Server | Latency | Latent Cost | Energy |
|---|---|---|---|
gay |
~10ms | 0.1KB context | LOW |
tree-sitter |
~50ms | 1KB context | LOW |
exa |
~1s | 3KB context | HIGH |
firecrawl |
~2s | 10KB context | HIGH |
Optimal triad: gay → tree-sitter → marginalia (560ms, 5 energy)
Worlding Skill Integration
From worlding_skill_omniglot_entropy.py:
class BidirectionalCharacterLearner:
def __init__(self, char_dim: int = 28, latent_dim: int = 64):
self.char_dim = char_dim
self.latent_dim = latent_dim # Compression ratio: 784 → 64
def encode_character(self, image: np.ndarray) -> np.ndarray:
"""READ: Image → Latent Code (learn what the character means)"""
# Latency: O(dim_latent)
pass
def generate_character(self, latent_code: np.ndarray) -> np.ndarray:
"""WRITE: Latent Code → Image (learn how to express the character)"""
# Latency: O(dim_output)
pass
Compression: 784 → 64 = 12.25× compression
Expected Latency Reduction: ~12× for downstream tasks
Fokker-Planck Convergence
Training latency depends on reaching Gibbs equilibrium:
Stopped Early: t < τ_mix → Poor latent representation
Fully Converged: t > τ_mix → Optimal latent representation
↓
Minimal inference latency
From fokker-planck-analyzer:
def check_convergence(trajectory, temperature):
# Mixing time from loss landscape geometry
τ_mix = 1 / λ_min(Hessian(loss))
# Check if training exceeded mixing time
if training_steps > τ_mix:
return "CONVERGED: Good latent representation"
else:
return f"EARLY STOP: Need {τ_mix - training_steps} more steps"
GF(3) Decomposition
| Skill | Trit | Role |
|---|---|---|
fokker-planck-analyzer |
-1 | Verifies convergence (latency) |
latent-latency |
0 | Mediates space ↔ time |
compression-progress |
+1 | Generates compressed representations |
Conservation: (-1) + (0) + (+1) = 0 ✓
Practical Applications
1. Optimize Inference Latency
def optimize_latent_for_latency(model, target_latency_ms):
"""
Find optimal latent dimension for target latency.
Relationship: latency ∝ dim(z) / spectral_gap
"""
current_dim = model.latent_dim
current_latency = measure_latency(model)
# Target dimension
target_dim = int(current_dim * (target_latency_ms / current_latency))
# Retrain with smaller latent space
return retrain_model(model, latent_dim=target_dim)
2. Predict Mixing Time
def predict_mixing_time_from_latent(latent_structure):
"""
Estimate training latency from latent space properties.
"""
# Spectral gap of latent similarity graph
gap = spectral_gap(latent_similarity_matrix(latent_structure))
# Mixing time bound
n = latent_structure.n_samples
τ_mix = np.log(n) / gap
return τ_mix
3. Ramanujan-Optimal Routing
def route_with_ramanujan(nodes, message)
Установить latent-latency в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл latent-latency?
Latent-Latency Skill
Как установить скилл latent-latency?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл latent-latency запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic