Taylor
chore: add void attention footer links
e53822f
"""
Glossolalia Examples β€” Curated A/B Comparison Gallery
Pre-computed outputs showing Glossolalia fork/race/fold vs standard
sampling on the same model (TinyLlama-1.1B) and prompt. Every example
is a real output from the production Aether coordinator on Cloud Run.
No API calls needed β€” loads instantly.
"""
import gradio as gr
# Pre-computed results from TinyLlama-1.1B on Cloud Run (v91)
# Each entry: (prompt, standard_output, glossolalia_output, standard_time, glossolalia_time)
EXAMPLES = [
{
"prompt": "What is the shape of failure?",
"standard": "\\treturn err\\n}\\n```</s>",
"glossolalia": "The shape of failure is a complex and ever-",
"standard_time": "25s",
"glossolalia_time": "192s",
"analysis": "Standard sampling returns a Go error handler -- syntactically valid code but semantically disconnected from the prompt. Glossolalia produces a philosophical continuation that treats failure as having shape, complexity, and ongoing process. The fork/race/fold topology suppresses high-frequency memorized patterns (code) and elevates tokens with broad distributional support (natural language).",
},
{
"prompt": "Hello",
"standard": "I'm glad to",
"glossolalia": "'s friend",
"standard_time": "135s",
"glossolalia_time": "47s",
"analysis": "Both produce English continuations. Standard gives a common greeting pattern. Glossolalia takes a less predictable path -- 'Hello's friend' suggests a personification or narrative framing. The temperature-ensemble agents at different temperatures explore both the obvious and the unexpected, and the deficit-weighted merge preserves the less obvious path when it has multi-agent support.",
},
{
"prompt": "The theory of failure is",
"standard": "based on two main components of an argument for which is that it has been used in order to explain why people do not have this kind and how we are all",
"glossolalia": "based on two main components of an argument for which is that it has been used in order to explain why people do not have this kind and how we are all",
"standard_time": "190s",
"glossolalia_time": "190s",
"analysis": "Both paths converge to similar output for this prompt. When the model's probability distribution is strongly peaked (high-confidence tokens), all three temperature agents agree and the deficit-weighted merge produces the same result as standard sampling. Convergence is expected: Glossolalia differs most when the distribution is flat (uncertain) and agents disagree.",
},
]
def display_example(idx):
"""Display a pre-computed example."""
ex = EXAMPLES[idx]
return (
ex["prompt"],
ex["standard"],
f"*Standard top-k/top-p* | {ex['standard_time']}",
ex["glossolalia"],
f"*Glossolalia fork/race/fold* | {ex['glossolalia_time']}",
ex["analysis"],
)
with gr.Blocks(
title="Glossolalia Examples",
theme=gr.themes.Base(primary_hue="teal"),
) as demo:
gr.Markdown("""
# Glossolalia Engine β€” A/B Comparison Gallery
Real outputs from TinyLlama-1.1B on Google Cloud Run. Same model, same weights, same prompt.
The only difference: how tokens are sampled from the logit distribution.
**Standard**: top-k/top-p nucleus sampling (pick the most probable token)
**Glossolalia**: FORK 3 agents at different temperatures β†’ RACE (filter NaN) β†’ FOLD (deficit-weighted Buleyean complement merge). Tokens survive by *not being rejected* rather than by being any single agent's top pick.
*The model is the brain. Glossolalia is the voice.*
[Paper: Being Irreversible, section 8.4](https://forkracefold.com) |
[Source](https://github.com/forkjoin-ai/aether) |
[Live Demo](https://huggingface.co/spaces/forkjoin-ai/glossolalia-engine) (calls Cloud Run, slow but real)
""")
# Example selector
example_buttons = []
with gr.Row():
for i, ex in enumerate(EXAMPLES):
btn = gr.Button(
f'"{ex["prompt"][:30]}..."' if len(ex["prompt"]) > 30 else f'"{ex["prompt"]}"',
size="sm",
)
example_buttons.append((btn, i))
# Display area
prompt_display = gr.Textbox(label="Prompt", interactive=False)
with gr.Row():
with gr.Column():
gr.Markdown("### Standard Sampling")
standard_display = gr.Textbox(label="Output", lines=4, interactive=False)
standard_meta = gr.Markdown()
with gr.Column():
gr.Markdown("### Glossolalia (fork/race/fold)")
glossolalia_display = gr.Textbox(label="Output", lines=4, interactive=False)
glossolalia_meta = gr.Markdown()
analysis_display = gr.Markdown(label="Analysis")
# Wire up buttons
for btn, idx in example_buttons:
btn.click(
lambda i=idx: display_example(i),
outputs=[
prompt_display,
standard_display,
standard_meta,
glossolalia_display,
glossolalia_meta,
analysis_display,
],
)
# Load first example by default
demo.load(
lambda: display_example(0),
outputs=[
prompt_display,
standard_display,
standard_meta,
glossolalia_display,
glossolalia_meta,
analysis_display,
],
)
gr.Markdown("""
---
### How Glossolalia Works
At each token position, the model produces a vector of logits (one per vocabulary token).
Standard sampling applies softmax, top-k filtering, nucleus (top-p) filtering, then samples.
Glossolalia replaces this with:
```
FORK: 3 agents apply temperatures {Ο„-0.3, Ο„, Ο„+0.3} to the same logits
RACE: filter agents with NaN/Inf distributions
FOLD: for each candidate token:
count agents that "accept" it (logit β‰₯ agent mean)
complement weight = (accepts + 1) / (agents + 1)
merged logit = mean(agent logits) Γ— complement weight
```
The key insight: standard sampling asks "which token is most probable?"
Glossolalia asks "which token do multiple perspectives agree is acceptable?"
This is **Buleyean complement voting** -- tokens survive by not being rejected,
not by being any single agent's top pick. The deficit = k-1 exactly
(proved in Lean 4).
### Why It Works
A 1.1B parameter model trained on code + text memorizes high-frequency patterns.
Standard sampling at temperature 0.8 often selects these memorized patterns
(code fragments, closing tags, common subwords). The conservative agent (Ο„=0.5)
strongly favors these patterns. The exploratory agent (Ο„=1.1) strongly disfavors them.
The deficit-weighted fold averages across perspectives, suppressing tokens that only
one agent favors and elevating tokens with broad support. Broad support correlates
with semantic coherence -- natural language has wider distributional support than
memorized code patterns.
*Running on self-hosted CPU inference. Zero GPU cost. Zero external API calls.
Model weights loaded from Google Cloud Storage, inference on Cloud Run.*
""")
gr.Markdown(
"""
---
[Void Attention](https://huggingface.co/spaces/forkjoin-ai/void-attention)
Copyright 2026 forkjoin.ai
"""
)
if __name__ == "__main__":
demo.launch()