// TAF Agent i18n — minimal translation system.
// Add languages by extending TRANSLATIONS. Set data-i18n="key" on any element.
// Persist user choice in localStorage.
export const LANGUAGES = [
{ code: "en", flag: "🇬🇧", label: "English" },
{ code: "es", flag: "🇪🇸", label: "Español" },
{ code: "fr", flag: "🇫🇷", label: "Français" },
{ code: "zh", flag: "🇨🇳", label: "中文" },
];
export const TRANSLATIONS = {
en: {
"hero.title": "🔬 TAF Agent",
"hero.tagline": "Test ANY transformer LLM before you spend GPU/$.",
"hero.subtitle": "All computation runs locally in your browser. Free. Unlimited. Auditable.",
"hero.help": "📘 Help & examples",
"hero.about": "Built by an independent researcher. Open source. Not affiliated with any model vendor.",
"modes.title": "🎯 Mode",
"modes.profile": "📇 Profile a model",
"modes.compare": "🆚 Compare models",
"modes.inspector": "🔍 Inspect config",
"modes.ask": "💬 Ask plain English",
"modes.recipe": "📋 Pick recipe",
"modes.diagnose": "🩺 Diagnose CLI",
"diagnose.title": "🩺 Diagnose CLI Command Builder",
"diagnose.tip": "Browser predicts γ from config; the CLI measures γ_obs on real weights. Builder produces the exact command to run locally.",
"diagnose.desc": "Pick options and copy-paste the generated command on your local machine (Python + transformers + numpy). Fast mode ≈5 min CPU; full ≈20–60 min GPU.",
"diagnose.model_label": "HF model id:",
"diagnose.theta_label": "θ (auto if blank):",
"diagnose.n_label": "Context N:",
"diagnose.options_label": "Options:",
"diagnose.opt_fast": "--fast (CPU, ~5 min)",
"diagnose.opt_cpu": "--cpu (force CPU)",
"diagnose.opt_4bit": "--load_in_4bit (≥7B models)",
"diagnose.local_label": "--local path (optional):",
"diagnose.build_btn": "📋 Build command",
"diagnose.cmd_title": "Generated command:",
"diagnose.copy_btn": "📋 Copy to clipboard",
"diagnose.next_steps": "Next steps: (1) git clone https://github.com/karlesmarin/tafagent (2) cd tafagent && pip install torch transformers numpy (3) Run the command (4) Result JSON → upload via Inspect mode for full TAF analysis.",
"modes.phase": "📊 Phase diagram",
"phase.title": "📊 Phase diagram (γ × θ)",
"phase.tip": "Each dot is one model from the paper's empirical panel. x-axis log θ; y-axis γ. Hagedorn line γ=1 separates Phase A from Phase B. Hover for details, click to load into the recipe form.",
"phase.desc": "23 models in the panel; Padé curve at T=2000.",
"modes.desc": "Quickest start: paste any HuggingFace model id (e.g. meta-llama/Meta-Llama-3-8B), click Profile. See all 5 recipes scored in seconds.",
"profile.title": "📇 Profile a model",
"profile.desc": "For technicians: when you need a complete viability snapshot of a candidate model. One-click runs all 5 recipes and produces a unified TAF Card.",
"profile.preset_label": "Preset:",
"profile.preset_default": "— or pick from list —",
"profile.hf_label": "HF model id:",
"profile.fetch_btn": "📥 Fetch",
"profile.btn": "🚀 Generate full profile",
"profile.quickstart": "💡 Quick start: pick any preset → click Generate. Or paste a model id from HF Hub trending → 📥 Fetch → Generate.",
"compare.title": "🆚 Compare models side-by-side",
"compare.desc": "For technicians: when choosing between 2-3 candidate models for a specific deployment scenario. Same recipe, multiple models, side-by-side verdicts.",
"compare.recipe_label": "Recipe:",
"compare.T_eval_label": "T_eval (target context):",
"compare.models_title": "Models to compare (add up to 3)",
"compare.btn": "🚀 Compare",
"compare.example": "💡 Try: paste 3 popular 7-8B models (Meta-Llama-3-8B, Mistral-7B-v0.1, Qwen/Qwen2.5-7B), pick recipe X-2, T_eval=16000. See which best handles long context.",
"ask.title": "❓ Your question",
"ask.placeholder": "e.g. Will Mistral-7B handle 16K NIAH retrieval? Or: I have $5,000, what model can I train? Or: Cheapest GPU to serve Llama-70B at 100M tokens/day?",
"ask.btn": "🚀 Analyze",
"ask.example_btn": "💡 Try an example",
"recipe.title": "📋 Recipe",
"recipe.default": "— select a recipe —",
"recipe.input_title": "🎯 Inputs",
"verdict.title": "📊 Verdict",
"chain.title": "🔍 Computation Chain",
"chain.desc": "Every number below is deterministic Python. Click a step to expand.",
"answer.title": "💬 Plain-English Answer",
"share.btn": "🔗 Copy share link",
"share.copied": "✅ Copied to clipboard!",
"share.download": "💾 Download JSON",
"share.submit": "📤 Submit to registry",
"share.import_title": "📂 Import a shared TAF result",
"share.import_desc": "Got a JSON file from someone else's TAF analysis? Load it here to see the verdict + chain locally. Same view as if you'd run it yourself.",
"share.import_btn": "📂 Load shared JSON",
"synthesis.system": "You are a precise transformer LLM diagnostic assistant. Given pre-computed TAF formula results, write a clear plain-English summary in 4-6 sentences. Cite the section number (§X.Y) for each number you mention. Always give a concrete recommendation. Do NOT invent numbers.",
// INSPECTOR mode
"inspector.title": "🔍 Architecture Inspector",
"inspector.desc": "Paste the raw config.json contents. The tool extracts the architectural parameters and runs the full 5-recipe Profile.",
"inspector.tip": "Paste any config.json directly. Tool parses it and runs the full Profile. Useful for: private models, in-development configs, models not yet on HuggingFace, or comparing what your custom architecture would do.",
"inspector.quickstart": "💡 Use case: you have a private model not on HF Hub, or a config you're designing. Paste the raw JSON below and get a full TAF profile.",
"inspector.placeholder": "{\n \"model_type\": \"llama\",\n \"rope_theta\": 500000,\n \"max_position_embeddings\": 8192,\n \"num_attention_heads\": 32,\n \"num_key_value_heads\": 8,\n \"hidden_size\": 4096,\n \"num_hidden_layers\": 32\n}",
"inspector.T_eval": "T_eval (your target context):",
"inspector.btn": "🚀 Inspect & profile",
// WHAT-IF slider
"whatif.title": "🎚 What-if: drag T_eval to see γ change live",
"whatif.desc": "Pure JS recompute (no Pyodide call). Shows the geometric γ_Padé and d_horizon as you slide. The full chain re-runs on click.",
"whatif.T_eval": "T_eval",
"whatif.gamma_pade": "γ_Padé",
"whatif.d_horizon": "d_horizon",
"whatif.l_niah": "L_NIAH ceiling",
"whatif.predicted": "Predicted geometric verdict",
"whatif.rerun": "↻ Recompute full chain at this T_eval",
// COMMUNITY feed
"community.title": "🌐 Recent community submissions",
"community.desc": "Live feed from the public registry. Click any submission to view full analysis.",
"community.browse_all": "Browse all →",
"community.loading": "Loading...",
"community.no_repo": "The registry repo isn't created yet. Once it exists with submissions, they'll appear here live.",
"community.no_submissions": "No submissions yet. Be the first — generate a Profile and click 📤 Submit to registry.",
// FALSIFICATION dashboard
"falsification.title": "🔬 Paper predictions — falsification status",
"falsification.desc": "The TAF framework rests on falsifiable predictions (F1-F23). Each is empirically tested. Here's the live status of every prediction in the paper.",
"falsification.summary": "{confirmed} confirmed · {partial} partial · {refuted} refuted · {untested} untested (out of {total} total predictions)",
"falsification.col.id": "ID",
"falsification.col.claim": "Claim",
"falsification.col.status": "Status",
"falsification.col.evidence": "Evidence",
"tafcard.title": "📇 TAF Card — full model profile",
"tafcard.recipes_title": "📋 Recipes — verdict per dimension",
"tafcard.recipes_count_label": "dimensions",
"tafcard.numbers_title": "🔢 Key numbers (paper §26)",
"tafcard.fals_title": "🔬 Falsification status (F1-F23)",
"tafcard.fals_none": "No falsifications applicable.",
"tafcard.diag_title": "🔬 Diagnostics — numbers · γ check · what-if",
"tafcard.verify_title": "✓ Verification — Lean + Sage + falsification",
"tafcard.share_title": "📂 Provenance & share",
"tafcard.whatif_title": "🎚️ What-if explorer",
"verdict.go": "GO",
"verdict.no": "NO",
"verdict.degraded": "DEGRADED",
"compare.title_out": "🆚 Comparison Table",
"status.loading_pyodide": "⏳ Loading Python runtime (~10MB, first time only)...",
"status.loading_taf": "⏳ Loading TAF formulas + recipes...",
"status.ready": "✅ Ready. Pick a model and click Profile to start.",
"status.computing": "🧮 Computing TAF chain...",
"status.done": "✅ Done.",
"profile.hf_placeholder": "e.g. meta-llama/Meta-Llama-3-8B or Qwen/Qwen2.5-7B",
"compare.hf_placeholder": "HF model id (e.g. meta-llama/Meta-Llama-3-8B)",
"compare.slot1_placeholder": "HF model id (e.g. meta-llama/Meta-Llama-3-8B)",
"compare.slot2_placeholder": "HF model id #2",
"compare.slot3_placeholder": "HF model id #3 (optional)",
"compare.preset_default": "— or preset —",
// Form parameters
"param.theta": "θ (rope_theta)",
"param.theta.tip": "RoPE base frequency from config.rope_theta. Higher = more long-range capacity.",
"param.T_train": "T_train",
"param.T_train.tip": "Max training context. From max_position_embeddings. Beyond this is extrapolation.",
"param.T_eval": "T_eval (your target)",
"param.T_eval.tip": "Your target inference context. The whole question is: will the model behave well at THIS length?",
"param.n_attn": "n_attention_heads",
"param.n_attn.tip": "Number of attention heads per layer. From num_attention_heads.",
"param.n_kv": "n_kv_heads",
"param.n_kv.tip": "KV heads. If < n_attention_heads → GQA (Grouped Query Attention). Reduces KV memory but pushes γ toward Hagedorn.",
"param.d_head": "head_dim",
"param.d_head.tip": "Per-head dimension. Typical 64, 96, 128. From head_dim or hidden_size / num_attention_heads.",
"param.n_layers": "n_layers",
"param.n_layers.tip": "Number of transformer blocks. From num_hidden_layers.",
"param.n_params": "n_params (e.g. 8e9)",
"param.n_params.tip": "Total parameter count. Threshold ~400M for induction-head emergence. Affects KV memory and budget recipes.",
"param.has_swa": "Has SWA?",
"param.has_swa.tip": "Sliding Window Attention. true for Mistral, gemma-2, phi-3. v0.5.3 calibration audit disabled the historical δ_SWA correction (n=1 fit).",
"common.yes": "Yes",
"common.no": "No",
// Mode tooltips
"modes.tip": "Seven ways to use the tool.
📇 Profile: paste a model id → all 8 recipes at once = TAF Card.
🆚 Compare: 2-3 models side-by-side on one recipe.
🔍 Inspect config: paste raw config.json → full Profile.
💬 Ask: free-form question, browser LLM picks the recipe.
📋 Recipe: manual selection with full form control.
🩺 Diagnose CLI: generate Python command for local γ measurement.
📊 Phase diagram: 23-model panel on (log θ, γ) plane.",
"profile.tip": "One-click full diagnosis. Paste any HF model id (or pick preset). Tool runs all 5 recipes (long-context, KV-compression, custom-vs-API, budget, hardware) and produces a single TAF Card with verdict per dimension + key numbers + architecture classification.
Use case: \"I'm evaluating Qwen2.5-32B for production — what's its full viability profile?\" → paste id → Profile → done.",
"compare.tip": "Same recipe, multiple models. Pick 2-3 candidate models and one recipe. See verdicts in a single comparison table.
Use case: \"I need long-context retrieval at 16K — which is best: Llama-3-8B, Mistral-7B, or Qwen-7B?\" → pick 3 + X-2 + 16K → see winner.",
// Help modal
"help.title": "📘 TAF Agent — User Manual",
"help.what.title": "What does it do?",
"help.what.body": "Predicts practical viability of any transformer LLM before you spend GPU/$. Answers questions like \"will this model work at L=32K?\" or \"should I train custom or use API?\" using deterministic Python formulas (TAF — Thermodynamic Attention Framework).",
"help.modes.title": "How to use — 7 modes",
"help.modes.profile": "📇 Profile: paste model id → all recipes at once = TAF Card. Best starting point.",
"help.modes.compare": "🆚 Compare: 2-3 models side-by-side on same recipe. Best when choosing between candidates.",
"help.modes.inspector": "🔍 Inspect config: paste raw config.json → tool parses + runs full Profile. For private models, in-development configs, or models not yet on HF Hub.",
"help.modes.ask": "💬 Ask plain English: free-form question, in-browser LLM picks the recipe. Best for casual exploration.",
"help.modes.recipe": "📋 Recipe + form: manual selection, full parameter control. Best when you want exact control.",
"help.modes.diagnose": "🩺 Diagnose CLI: generate Python command to measure γ on your local machine (transformers + numpy). Fast ≈5 min CPU; full ≈20–60 min GPU. Output JSON re-uploadable via Inspect.",
"help.modes.phase": "📊 Phase diagram: scatter plot of 23 panel models on (log θ, γ) plane. Hagedorn line γ=1 separates Phase A from Phase B. Click a dot to load that model into Recipe form.",
"help.recipes.title": "The 8 recipes available",
"help.recipe.x1.title": "X-1 Custom training vs API — compares cost of training your own model vs paying for API access.",
"help.recipe.x1.example": "Try: \"Should I train an 8B custom model or use GPT-4o for 50M tokens/month?\"
Answer types: YES (custom) / NO (API) with break-even months.",
"help.recipe.x2.title": "X-2 Long Context Viability — predicts if a model serves a target context length reliably.",
"help.recipe.x2.example": "Try: \"Will Meta-Llama-3-8B handle 32000 tokens for retrieval?\"
Chains: γ_Padé → decomposition → d_horizon → NIAH ceiling → hallucination → KV memory.
Verdict: YES / DEGRADED / NO with mitigation if needed.",
"help.recipe.x3.title": "X-3 Budget pre-flight — given $ budget, what model is feasible to train?",
"help.recipe.x3.example": "Try: \"I have $5000, what model can I train?\"
Answer: GO / TINY-MODEL / MEMORY-LIMITED with concrete N (params) and D (tokens).",
"help.recipe.x5.title": "X-5 Hardware selection — which GPU should I use to serve at target throughput?",
"help.recipe.x5.example": "Try: \"Cheapest hardware to serve Llama-3-8B at 10M tokens/day\"
Answer: best GPU + $/Mtok + capacity vs target.",
"help.recipe.x19.title": "X-19 KV Compression decision — should I use soft decay, hard cutoff, or literature methods?",
"help.recipe.x21.title": "X-21 Imprint Purity Diagnostic — predicts γ on RANDOM tokens via ν=−1/(2π); how clean is the model's RoPE prediction?",
"help.recipe.x22.title": "X-22 Compute-Context Invariant — does γ × log(N²·D) lie in panel band 51.2 ± 16.8? Detects scaling/training anomalies.",
"help.recipe.x23.title": "X-23 IH-Phase Detector — pre- or post-induction-head? Cheap probe via sign(γ_text − γ_random).",
"help.recipe.x19.example": "Try: \"How to compress KV cache for Qwen2.5-7B at 32K?\"
Answer: USE SOFT DECAY / USE D_f CUTOFF / USE LITERATURE METHODS / USE HARD T_train.",
"help.recipe.x21.example": "Try: \"How clean is the RoPE prediction on Llama-3-8B?\"
Answer: predicted γ_random + purity diagnostic (CLEAN / OVER-IMPRINTED / UNDER-IMPRINTED).",
"help.recipe.x22.example": "Try: \"Does Mistral-7B fit the compute-context invariant?\"
Answer: K = γ·log(N²·D), z-score, IN-BAND or OUTLIER.",
"help.recipe.x23.example": "Try: \"Is Qwen2.5-7B post-induction-head?\"
Answer: CONFIRMED PRE-IH / CONFIRMED POST-IH / ANOMALY (with size-vs-Δγ consistency check).",
"help.section.v04": "What's new in v0.4 (sesión 29 findings 2026-04-28): three diagnostic recipes derived from cross-model panel analysis (n=22 LLMs).",
"help.divider.v04_s29": "— v0.4 (sesión 29 findings) —",
"footer.tech_stack": "Computation: Pyodide · Synthesis: WebLLM (Qwen2.5-0.5B local) · Hosting: GitHub Pages · Cost: $0",
"help.v04.imprint": "Learned-imprint slope ν = −1/(2π): RoPE rotation period 2π drives a positional bias on weights, proportional to log(N_params). Even random tokens show this scaling. ν is DERIVED — not fitted (empirical err 0.3%).",
"help.v04.invariant": "Chinchilla-attention invariant K: γ × log(N²·D) ≈ 51.2 ± 16.8 (CV=0.329). Connects compute scaling and attention exponent into a single dimensionless number.",
"help.v04.ih_probe": "Δγ as IH probe: sign(γ_text − γ_random) > 0 ⟺ post-induction-head. Cheaper than running an in-context-learning benchmark.",
"help.v04.constants": "γ-cluster on famous constants (intriguing, n=4): CodeLlama-13b γ=0.382 ≈ 1−1/φ (golden conjugate, err 0.0003); pythia-1.4b γ=0.705 ≈ 1/√2; Llama-2-7b γ=0.287 ≈ 1−1/√2; Mistral-Nemo γ=0.428 ≈ log_10(e). Caveat: could be coincidence.",
"help.param.theta": "θ (rope_theta): RoPE base frequency. Higher = more long-range capacity. Typical: 10000 (early), 500000 (Llama-3), 1000000 (Qwen2.5).",
"help.param.T_train": "T_train: max context the model was trained on. From max_position_embeddings.",
"help.param.T_eval": "T_eval: your target inference context length. The key knob.",
"help.param.gqa": "n_kv_heads < n_attention_heads: model uses GQA (Grouped Query Attention). Reduces KV memory but pushes γ toward Hagedorn.",
"help.param.swa": "has_SWA: model uses Sliding Window Attention (Mistral, gemma-2).",
"help.param.nparams": "n_params: total parameter count. Threshold ~400M for induction-head emergence.",
"help.add_models.title": "Adding new models (3 ways)",
"help.add_models.preset": "Preset list: 11 popular models curated. Just select from dropdown.",
"help.add_models.hf": "HF Hub fetch: paste any model id (e.g. Qwen/Qwen2.5-32B-Instruct), click 📥 Fetch. Browser downloads config.json directly from HuggingFace, fills the form. Works for any public model.",
"help.add_models.manual": "Manual: fill the form fields directly with values from the model card.",
"help.audit.title": "The audit chain",
"help.audit.body": "Every result shows the full Computation Chain — each formula step with its inputs, output, and interpretation. Click any step to expand. Cite section numbers (§26.1, §19.1, etc.) refer to the underlying paper for derivation.",
"help.synthesis.title": "The plain-English answer",
"help.synthesis.body": "After the deterministic chain runs, an in-browser LLM (Qwen2.5-0.5B, ~350MB cached after first load) synthesizes a plain-English summary. The numbers above are always correct (deterministic Python); the synthesis is LLM-generated — verify against the chain if in doubt.",
"help.params.title": "Common parameters explained",
"help.verdicts.title": "What to look for in verdicts",
"help.verdict.yes": "YES / GO — proceed with confidence; numbers support the choice.",
"help.verdict.deg": "DEGRADED / TINY-MODEL — works but with caveats; read the action.",
"help.verdict.no": "NO / MEMORY-LIMITED — don't proceed as-is; mitigation provided.",
"help.privacy.title": "Privacy",
"help.privacy.body": "Everything runs in your browser. No telemetry, no analytics, no data sent anywhere. Even the LLM model runs locally via WebGPU/WebAssembly. Your model_ids and questions never leave this page.",
"help.source.title": "Source & paper",
"help.source.body": "Source code: github.com/karlesmarin/tafagent
Paper: Marin 2026 — Predicting How Transformers Attend (Zenodo; arXiv forthcoming)
Dataset: taf-attention-decay — 58 γ-measurements across 32 models (CC-BY-4.0)",
"footer.text": "© 2026 Carles Marin · Apache-2.0 · independent research · the tool that closes the loop of the paper.",
// §33 v0.4 (sesion 31, 2026-04-30) — new diagnostic functions
"v04.title": "🆕 v0.4 — New diagnostics (sesion 31)",
"v04.section.intro": "Four new diagnostic functions derived sesion 31 (2026-04-30) from cross-of-crosses formula games + Sócratic interrogation. Available in taf_browser.py §33.",
"v04.arch.label": "Architectural Concentration",
"v04.arch.desc": "γ_text ≈ γ_Padé − 0.012·n_kv. Cross-panel correlational law (R²=0.30). Caveat: not per-model predictor.",
"v04.pdi.label": "PDI — Padé Deviation Index",
"v04.pdi.desc": "PDI = d_horizon_obs/T_eval. Traffic light: green (≈1), orange (>>1), yellow (<<1), red (Phase B negative).",
"v04.4bit.label": "4-bit Shift Predictor",
"v04.4bit.desc": "MHA: R²(bf16)<0.9 → γ rises; R²>0.99 → γ drops. GQA: precision-robust regardless.",
"v04.crit.label": "Critical Exponents Bundle",
"v04.crit.desc": "ν_c, β_c, η_c (=γ−1, CORRECTED), α_C, γ_susc with AM-GM minimum at γ=1−1/√2≈0.293.",
// §34 v0.5 (sesion 32, 2026-05-01) — Machine-verified framework consistency
"v05.title": "🔬 v0.5 — Machine-verified consistency (sesion 32)",
"v05.section.intro": "Sage Groebner basis + Lean Mathlib4 dual-tool verification of 15 algebraic identities of TAF critical exponents. First transformer-attention framework with formal machine-proof backing.",
"v05.verify.label": "Algebraic Consistency Check",
"v05.verify.desc": "Given measured γ, verifies 12 D-SAGE identities (D-SAGE-1: 2η²+η·γ_χ+1=0, β·χ=−1, α+χ=2, etc.). All passing = framework intact. Failures indicate bf16 outliers / quantization artifacts.",
"v05.dsage1.label": "D-SAGE-1 (★★ core)",
"v05.dsage1.desc": "Quadratic identity 2η² + η·γ_χ + 1 = 0 (Sage Groebner-discovered, Lean-verified). Replaces incorrect 'triple closure' claim. Refutes paper 1's η=2γ algebraically.",
"v05.erratum.label": "Paper 1 erratum — η correction",
"v05.erratum.desc": "Paper 1 originally claimed η = 2γ. Sage Groebner + Lean Mathlib4 proved this fails (residual (-4γ³+5γ+1)/(1-γ) > 0 ∀γ ∈ Phase A). Correct value: η = γ−1, satisfying D-SAGE-1.",
"v05.repro.label": "Reproducibility",
"v05.repro.desc": "All 15 theorems machine-proof in Lean Mathlib4 (1973 jobs build success). Sage script: analysis/sage_recursive_sweep_2026-04-30.sage. Lean code: lean_taf/taf/Taf/Identities.lean.",
// v0.5.1 — TAF Card consistency check button
"v05.consistency.title": "🔬 Algebraic consistency check (Sage + Lean v0.5)",
"v05.consistency.desc": "Verifies 12 D-SAGE algebraic identities of TAF critical exponents (machine-proof Sage Groebner basis + Lean Mathlib4). Pass = framework intact. Fail = bf16 outlier / quantization artifact.",
"v05.consistency.btn": "🔬 Verify algebraic consistency",
// v0.5.2 — Anti-Ising universality class badge
"v05.antiising.badge": "🧲 Anti-Ising class (β=γ−1<0, machine-verified)",
// v0.5.2 — Per-identity tooltips (plain English explanations)
"v05.tooltip.D_SAGE_1": "Quadratic algebraic identity connecting anomalous dimension η and susceptibility γ_χ. The CORE identity discovered by Sage Groebner basis (machine-proof). Replaces earlier wrong claim of triple closure.",
"v05.tooltip.D_SAGE_2": "In Phase A, β = γ−1 is negative (anti-Ising). Multiplied by χ = 1/(1−γ) gives exactly −1. Signature of TAF's negative-β regime.",
"v05.tooltip.D_SAGE_4": "The specific heat exponent α and susceptibility χ sum to exactly 2 in TAF. Algebraic consequence of Josephson hyperscaling.",
"v05.tooltip.D_SAGE_5": "Linear sum identity: α + γ_χ = 2(2−γ). Means as γ approaches 1 (Hagedorn), the sum approaches 2; at γ=0 it's 4.",
"v05.tooltip.D_SAGE_6": "Order parameter exponent times susceptibility exponent equals a specific quadratic in γ. Factored algebraic relation.",
"v05.tooltip.Rushbrooke_tautology": "Standard Rushbrooke hyperscaling 2β + γ_χ = ν·d at d=1. In TAF this is a TAUTOLOGY — γ_χ is defined exactly so this holds. Confirmed by Sage Groebner basis.",
"v05.tooltip.Josephson_tautology": "Standard Josephson hyperscaling 2 − α = ν·d at d=1. In TAF this is a TAUTOLOGY — α is defined exactly so this holds.",
"v05.tooltip.Fisher_independent": "Fisher relation γ_χ = (2−η)·ν. In TAF this is INDEPENDENT (does NOT close as identity, contrary to triple-closure claim). Residual is γ(2γ−3)/(1−γ).",
"v05.tooltip.eta_2gamma_REFUTED": "Paper 1 originally claimed η=2γ. This identity refutes it: residual is positive throughout Phase A. Lean Mathlib4 machine-proof refutation.",
"v05.tooltip.D_14_nu_imprint": "The learned imprint slope ν = −1/(2π) times 2π equals −1. Trivial dimensional check from paper 1.",
"v05.tooltip.D_SAGE_7": "The central charge c=3 times |ν_imprint| times 2π equals 3. Dimensional closure connecting CFT and training imprint.",
"v05.tooltip.nu_beta_id": "Correlation length exponent ν times order parameter exponent β equals −1 in Phase A. Variant of D-SAGE-2.",
"v053.calibration.title": "🔬 v0.5.3 — Calibration audit (2026-05-02)",
"v053.calibration.note": "SWA correction disabled — original δ_SWA = -0.21 was fit on n=1 model (insufficient data; group-mean +0.355 with single yes-case). post_IH correction marked exploratory — group-mean ≈ 0 in re-audit (n=22 panel) does not replicate the OLS fit. GQA correction replicates (panel +0.115 vs hardcoded +0.11). D_f formula corrected for Phase B (γ>1) — uses discrete cumulative sum instead of continuum approximation. LLaMA-3, Mistral, Gemma now report correct compression values.",
"v053.release.banner": "🔧 v0.5.3 — Audit-driven fixes: KV compression D_f now uses discrete sum (correct for all γ); δ_SWA disabled (n=1 calibration); paper §5.2 C_V coefficient erratum (1/4 → 1/12).",
// §35 v0.6 — γ predicted-vs-observed diagnostic
"gamma_check.title": "🔍 γ predicted vs observed",
"gamma_check.desc": "Enter your empirically measured γ. Tool detects regime: fraud (θ inflated) / compressed / over-Padé / SWA-random / normal.",
"gamma_check.gobs_label": "γ_observed",
"gamma_check.gobs_tip": "Empirically measured γ from your model's attention scores. Use the Diagnose CLI to obtain this from real weights.",
"gamma_check.random_label": "Random corpus?",
"gamma_check.random_tip": "Tick if γ_observed was measured on random/unstructured tokens. Distinguishes SWA signature (γ_obs > 1) from anomaly.",
"gamma_check.regime": "Regime",
"gamma_check.regime.normal": "Normal",
"gamma_check.regime.fraud": "Fraud (θ inflated)",
"gamma_check.regime.compressed": "Compressed context",
"gamma_check.regime.overpade": "Over-Padé",
"gamma_check.regime.swa": "SWA random-corpus signature",
"gamma_check.regime.unknown": "Unknown",
"gamma_check.regime.normal.desc": "η ∈ [0.85, 1.15]: model uses its full nominal context, no anomaly.",
"gamma_check.regime.fraud.desc": "η < 0.01: nominal θ inflated. Model behaves as if θ ≪ advertised. Likely YaRN/marketing inflation without true context extension.",
"gamma_check.regime.compressed.desc":"η ∈ [0.01, 0.5): context is compressed (model attends less far than nominal θ predicts). Common in instruction-tuned / RLHF models.",
"gamma_check.regime.overpade.desc": "η > 1.5: model attends farther than Padé predicts. Possible Lerch-corrected regime or undertrained early-checkpoint.",
"gamma_check.regime.swa.desc": "γ_obs > 1.05 on random corpus = sliding-window attention signature (Mistral / Gemma family).",
"gamma_check.regime.unknown.desc": "Inputs out of range or γ_obs > 1 without random-corpus flag. Verify measurement.",
"gamma_check.glossary.title": "ⓘ Glossary — what these variables mean",
"gamma_check.glossary.gamma_pade": "γ_Padé: closed-form prediction (2−z)/(2+z), z = T√2/θ. Paper §sec:gamma_decomposition.",
"gamma_check.glossary.gamma_obs": "γ_observed: empirically measured from your model's attention scores (run the Diagnose CLI on real weights).",
"gamma_check.glossary.theta_eff_obs":"θ_eff (observed): inverted from γ_obs via T√2 / (1 − γ_obs). Effective θ implied by your measurement.",
"gamma_check.glossary.theta_eff_pade":"θ_eff (Padé): θ + T/√2. Effective θ predicted by closed-form.",
"gamma_check.glossary.efficiency": "η: ratio θ_eff_obs / θ_eff_Padé. ≈1 = normal · <0.01 = fraud · <0.5 = compressed · >1.5 = over-Padé.",
"gamma_check.glossary.delta_h": "ΔH_Cardy: log(θ_eff_obs / θ_nominal). Cardy entropy shift. Negative = compression entropy. ~0 = nominal match.",
"gamma_check.glossary.regime": "Regime: automatic classifier from η + γ_obs + random_corpus flag.",
// §36 v0.6 — Tooltips for inline ⓘ icons (per-variable explanations)
"tooltip.gamma_pade": "γ_Padé(T_eval): closed-form prediction (2−z)/(2+z), z = T√2/θ. Paper §sec:gamma_decomposition.",
"tooltip.gamma_decomposed": "γ_decomposed: γ from full architectural decomposition. Padé baseline + GQA shift + post-IH shift (calibrated audit-replicated subset).",
"tooltip.d_horizon": "d_horizon: effective attention horizon. Beyond this position, scores fall below noise floor (paper §26).",
"tooltip.L_NIAH": "L_NIAH ceiling: predicted ceiling for needle-in-a-haystack retrieval reliability at current d_horizon.",
"tooltip.chi": "χ susceptibility: χ = 1/(1−γ). Diverges at the Hagedorn line γ=1.",
"tooltip.kv_memory": "KV memory @ T_eval (BF16): per-request KV cache = 2 · n_layers · n_kv_heads · d_head · T_eval bytes.",
"tooltip.theta_eff_obs": "θ_eff (observed): effective θ implied by your γ_observed: T√2 / (1 − γ_obs).",
"tooltip.theta_eff_pade": "θ_eff (Padé): effective θ predicted by closed-form: θ + T/√2.",
"tooltip.efficiency": "η = θ_eff_obs / θ_eff_Padé: efficiency ratio. ≈1 = normal · <0.01 = fraud · <0.5 = compressed · >1.5 = over-Padé.",
"tooltip.delta_h_cardy": "ΔH_Cardy: log(θ_eff_obs / θ_nominal). Cardy entropy shift. Negative = compression entropy. ~0 = nominal match.",
"tooltip.verdict_aggregate": "Verdict: worst-of across all recipes. ✅ GO = all green · ⚠ DEGRADED = ≥1 yellow · ❌ NO = ≥1 red.",
"tooltip.verdict_breakdown": "Per-recipe breakdown: each recipe tests an independent decision axis (long-context · budget · hardware · custom-vs-API · KV-compression). A ❌ on X-1 means \"use the API for your volume\" not \"the model fails\" — open the Recipes section for per-axis context.",
"tooltip.gamma_pill": "γ headline: γ_decomposed (or γ_Padé fallback). Range (0,1) = Phase A (anti-Ising). γ ≥ 1 = Hagedorn / Phase B.",
"tooltip.anti_ising": "Anti-Ising class: Phase A → β = γ−1 < 0. Machine-verified (Sage + Lean Mathlib4). See §35 v0.5.",
// §37 v0.6 — Lean+Mathlib theorem table
"lean.table.title": "📑 Lean+Mathlib theorem table",
"lean.table.desc": "Every entry below is machine-proven against Lean 4 + Mathlib4. Click any L# link to jump to the source line on GitHub. Grouped by topic — click a header to expand.",
"lean.table.theorem": "Theorem",
"lean.table.claim": "Claim",
"lean.table.tactic": "Tactic",
"lean.table.source": "Source",
"lean.table.lean": "Lean",
"lean.findings.title": "🔎 Substantive findings",
"lean.findings.detected_by": "Detected by",
"lean.findings.fixed_by": "Fixed by",
"lean.findings.recommendation":"Recommendation",
"lean.meta.repo": "Repo",
"lean.meta.build": "Build",
"lean.meta.theorems": "Theorems",
"lean.meta.verified": "verified",
"lean.meta.rejected": "rejected",
"lean.meta.sorry": "sorry",
"lean.meta.findings": "substantive findings",
"lean.manifest.loading": "Loading Lean manifest…",
"lean.manifest.error": "Lean manifest unavailable",
// Help modal — v0.6 section
"help.v06.title": "🆕 v0.6 — γ predicted-vs-observed + Cardy ΔH + Lean badges",
"help.v06.intro": "v0.6 (2026-05-06): three new diagnostics live in the TAF Card under 🔬 Diagnostics. All run in your browser; γ_observed comes from the Diagnose CLI on real weights.",
"help.v06.layout.title": "TAF Card layout (new in v0.6)",
"help.v06.layout.body": "After clicking 🚀 Generate full profile the card shows: a hero strip on top (architecture class + meta + 3 pills: aggregate verdict ✅/⚠/❌, γ headline, 🧲 Anti-Ising if Phase A) and four expandable sections: 📋 Recipes (open by default — verdict per dimension), 🔬 Diagnostics (key numbers, γ predicted vs observed, what-if explorer), ✓ Verification (Sage+Lean algebraic consistency, falsification F1-F23), 📂 Provenance & share (calibration audit + JSON download / share link / registry submit). Click any header to expand. Every variable has an inline ⓘ tooltip.",
"help.v06.gamma_check.title": "γ predicted vs observed",
"help.v06.gamma_check.body": "Enter the empirically-measured γ from your model and the tool computes η = θ_eff_obs / θ_eff_Padé and classifies into one of 5 regimes:",
"help.v06.case.normal": "Normal (η ∈ [0.85, 1.15]) — model uses its full nominal context. Use case: validate a new release before adopting it.",
"help.v06.case.fraud": "Fraud (η < 0.01) — nominal θ inflated; model behaves as if θ ≪ advertised. Use case: detect YaRN/marketing inflation (CodeLlama / Mistral-Nemo pattern).",
"help.v06.case.compressed": "Compressed (η < 0.5) — context compressed; model attends shorter than nominal θ. Use case: spot RLHF/instruction-tuning compression (LLaMA-2 pattern).",
"help.v06.case.overpade": "Over-Padé (η > 1.5) — model attends farther than Padé predicts. Use case: identify Lerch-corrected regime or undertrained early checkpoints (pythia-1b pattern).",
"help.v06.case.swa": "SWA random-corpus (γ_obs > 1.05 with random_corpus=Yes) — sliding-window attention signature. Use case: confirm Mistral / Gemma SWA on random tokens.",
"help.v06.cardy.title": "Cardy ΔH diagnostic",
"help.v06.cardy.body": "ΔH_Cardy = log(θ_eff_obs / θ_nominal). Entropy shift between observed effective θ and nominal θ. Strong negative = compression entropy; near zero = nominal match. Complements η for borderline cases.",
"help.v06.lean.title": "Lean + Mathlib verification badges",
"help.v06.lean.body": "TAF identities are formally machine-proven in Lean Mathlib4: 37 theorems in 7 groups (Padé, RG flow, Cayley, D-SAGE, audit findings, erratum CV, misc) + 1 substantive finding (V-derivative factor-2, theorem V_derivative_ne_RG_beta). Source: github.com/karlesmarin/lean-taf (commit 25c77fd). Re-verify locally: git clone --depth=1 https://github.com/karlesmarin/lean-taf && cd lean-taf && lake exe cache get && lake env lean Taf/Identities.lean. The 🧲 Anti-Ising pill in the hero strip and the Verification accordion link to specific source lines.",
"help.v06.glossary.title": "Variable glossary (also embedded in TAF Card)",
"help.v06.glossary.body": "Every variable in the TAF Card has an inline ⓘ tooltip. The complete list: γ, γ_Padé, γ_decomposed, γ_observed, θ, θ_eff_obs, θ_eff_Padé, η, ΔH_Cardy, χ, d_horizon, L_NIAH, KV memory, regime. Hover any ⓘ for the definition + paper section.",
},
// ────────────────────────────────────────────────────────────────────────
// ES — Español
// ────────────────────────────────────────────────────────────────────────
es: {
// §33 v0.4 (sesion 31, 2026-04-30) — nuevas funciones diagnósticas
"v04.title": "🆕 v0.4 — Nuevos diagnósticos (sesion 31)",
"v04.section.intro": "Cuatro nuevas funciones diagnósticas derivadas en sesión 31 (2026-04-30) desde juegos de fórmulas cross-of-crosses + interrogación socrática. Disponibles en taf_browser.py §33.",
"v04.arch.label": "Concentración Arquitectural",
"v04.arch.desc": "γ_text ≈ γ_Padé − 0.012·n_kv. Ley correlacional cross-panel (R²=0.30). Caveat: no es predictor per-model.",
"v04.pdi.label": "PDI — Índice de Desviación de Padé",
"v04.pdi.desc": "PDI = d_horizon_obs/T_eval. Semáforo: verde (≈1), naranja (>>1), amarillo (<<1), rojo (Phase B negativo).",
"v04.4bit.label": "Predictor de Shift 4-bit",
"v04.4bit.desc": "MHA: R²(bf16)<0.9 → γ sube; R²>0.99 → γ baja. GQA: precision-robusto.",
"v04.crit.label": "Bundle de Exponentes Críticos",
"v04.crit.desc": "ν_c, β_c, η_c (=γ−1, CORREGIDO), α_C, γ_susc con mínimo AM-GM en γ=1−1/√2≈0.293.",
// §34 v0.5 (sesion 32, 2026-05-01) — Consistencia algebraica verificada por máquina
"v05.title": "🔬 v0.5 — Consistencia verificada por máquina (sesion 32)",
"v05.section.intro": "Verificación dual con Sage Groebner basis + Lean Mathlib4 de 15 identidades algebraicas de los exponentes críticos TAF. Primer framework transformer-attention con respaldo formal machine-proof.",
"v05.verify.label": "Comprobación de Consistencia Algebraica",
"v05.verify.desc": "Dado γ medido, verifica 12 identidades D-SAGE (D-SAGE-1: 2η²+η·γ_χ+1=0, β·χ=−1, α+χ=2, etc.). Todas pasando = framework intacto. Fallos indican bf16 outliers / artefactos de cuantización.",
"v05.dsage1.label": "D-SAGE-1 (★★ core)",
"v05.dsage1.desc": "Identidad cuadrática 2η² + η·γ_χ + 1 = 0 (descubierta por Sage Groebner, verificada Lean). Reemplaza claim incorrecto de 'cierre triple'. Refuta η=2γ del paper 1 algebraicamente.",
"v05.erratum.label": "Erratum paper 1 — corrección η",
"v05.erratum.desc": "Paper 1 afirmaba η = 2γ. Sage Groebner + Lean Mathlib4 demostraron que falla (residual (-4γ³+5γ+1)/(1-γ) > 0 ∀γ ∈ Fase A). Valor correcto: η = γ−1, satisface D-SAGE-1.",
"v05.repro.label": "Reproducibilidad",
"v05.repro.desc": "Los 15 teoremas son machine-proof en Lean Mathlib4 (build exitoso 1973 jobs). Script Sage: analysis/sage_recursive_sweep_2026-04-30.sage. Código Lean: lean_taf/taf/Taf/Identities.lean.",
// v0.5.1 — TAF Card consistency check button
"v05.consistency.title": "🔬 Comprobación de consistencia algebraica (Sage + Lean v0.5)",
"v05.consistency.desc": "Verifica 12 identidades algebraicas D-SAGE de los exponentes críticos TAF (machine-proof Sage Groebner basis + Lean Mathlib4). Pasa = framework intacto. Falla = bf16 outlier / artefacto de cuantización.",
"v05.consistency.btn": "🔬 Verificar consistencia algebraica",
// v0.5.2 — Anti-Ising universality class badge
"v05.antiising.badge": "🧲 Clase Anti-Ising (β=γ−1<0, verificado por máquina)",
// v0.5.2 — Per-identity tooltips (explicaciones en lenguaje claro)
"v05.tooltip.D_SAGE_1": "Identidad algebraica cuadrática que conecta dimensión anómala η con susceptibilidad γ_χ. Identidad CORE descubierta por Sage Groebner basis (machine-proof). Reemplaza claim incorrecto de triple closure.",
"v05.tooltip.D_SAGE_2": "En Fase A, β = γ−1 es negativo (anti-Ising). Multiplicado por χ = 1/(1−γ) da exactamente −1. Signature del régimen negativo-β de TAF.",
"v05.tooltip.D_SAGE_4": "El exponente de calor específico α y la susceptibilidad χ suman exactamente 2 en TAF. Consecuencia algebraica del hiperescalado de Josephson.",
"v05.tooltip.D_SAGE_5": "Identidad lineal: α + γ_χ = 2(2−γ). Significa que cuando γ se acerca a 1 (Hagedorn), la suma se acerca a 2; en γ=0 vale 4.",
"v05.tooltip.D_SAGE_6": "Exponente de parámetro de orden multiplicado por exponente de susceptibilidad da una cuadrática específica en γ. Relación algebraica factorizada.",
"v05.tooltip.Rushbrooke_tautology": "Hiperescalado de Rushbrooke estándar 2β + γ_χ = ν·d en d=1. En TAF es TAUTOLOGÍA — γ_χ se define exactamente para que se cumpla. Confirmado por Sage Groebner basis.",
"v05.tooltip.Josephson_tautology": "Hiperescalado de Josephson estándar 2 − α = ν·d en d=1. En TAF es TAUTOLOGÍA — α se define exactamente para que se cumpla.",
"v05.tooltip.Fisher_independent": "Relación de Fisher γ_χ = (2−η)·ν. En TAF es INDEPENDIENTE (NO cierra como identidad, contrario al claim de triple closure). El residuo es γ(2γ−3)/(1−γ).",
"v05.tooltip.eta_2gamma_REFUTED": "Paper 1 afirmaba η=2γ. Esta identidad lo refuta: el residuo es positivo en toda Fase A. Refutación machine-proof por Lean Mathlib4.",
"v05.tooltip.D_14_nu_imprint": "La pendiente de imprint aprendido ν = −1/(2π) multiplicada por 2π da −1. Verificación dimensional trivial del paper 1.",
"v05.tooltip.D_SAGE_7": "La carga central c=3 multiplicada por |ν_imprint| multiplicada por 2π da 3. Cierre dimensional conectando CFT con imprint de entrenamiento.",
"v05.tooltip.nu_beta_id": "Exponente de longitud de correlación ν multiplicado por exponente de parámetro de orden β da −1 en Fase A. Variante de D-SAGE-2.",
"v053.calibration.title": "🔬 v0.5.3 — Auditoría de calibración (2026-05-02)",
"v053.calibration.note": "Corrección SWA desactivada — δ_SWA = -0.21 original se ajustó con n=1 modelo (datos insuficientes; promedio del único caso +0.355). Corrección post_IH marcada exploratoria — promedio de grupo ≈ 0 en re-auditoría (panel n=22) no replica el ajuste OLS. Corrección GQA replica (panel +0.115 vs hardcoded +0.11). Fórmula D_f corregida para Fase B (γ>1) — usa suma cumulativa discreta en lugar de aproximación continua. LLaMA-3, Mistral, Gemma ahora reportan valores correctos de compresión.",
"v053.release.banner": "🔧 v0.5.3 — Correcciones por audit: D_f de compresión KV ahora usa suma discreta (correcto para todo γ); δ_SWA desactivado (calibración n=1); erratum coeficiente C_V paper §5.2 (1/4 → 1/12).",
// §35 v0.6 — Diagnóstico γ predicho vs observado
"gamma_check.title": "🔍 γ predicho vs observado",
"gamma_check.desc": "Introduce tu γ medido empíricamente. La herramienta detecta el régimen: fraude (θ inflado) / comprimido / sobre-Padé / SWA-aleatorio / normal.",
"gamma_check.gobs_label": "γ_observado",
"gamma_check.gobs_tip": "γ medido empíricamente desde los attention scores de tu modelo. Usa la CLI de Diagnose para obtenerlo desde pesos reales.",
"gamma_check.random_label": "¿Corpus aleatorio?",
"gamma_check.random_tip": "Marca sí si γ_observado se midió sobre tokens aleatorios/no estructurados. Distingue la firma SWA (γ_obs > 1) de una anomalía.",
"gamma_check.regime": "Régimen",
"gamma_check.regime.normal": "Normal",
"gamma_check.regime.fraud": "Fraude (θ inflado)",
"gamma_check.regime.compressed": "Contexto comprimido",
"gamma_check.regime.overpade": "Sobre-Padé",
"gamma_check.regime.swa": "Firma SWA (corpus aleatorio)",
"gamma_check.regime.unknown": "Desconocido",
"gamma_check.regime.normal.desc": "η ∈ [0.85, 1.15]: el modelo usa su contexto nominal completo, sin anomalías.",
"gamma_check.regime.fraud.desc": "η < 0.01: θ nominal inflado. El modelo se comporta como si θ ≪ del anunciado. Probable inflación tipo YaRN/marketing sin extensión real de contexto.",
"gamma_check.regime.compressed.desc":"η ∈ [0.01, 0.5): contexto comprimido (el modelo atiende menos lejos de lo que predice θ nominal). Común en modelos instruction-tuned / RLHF.",
"gamma_check.regime.overpade.desc": "η > 1.5: el modelo atiende más lejos de lo que Padé predice. Posible régimen Lerch-corregido o checkpoint temprano sub-entrenado.",
"gamma_check.regime.swa.desc": "γ_obs > 1.05 sobre corpus aleatorio = firma de sliding-window attention (familias Mistral / Gemma).",
"gamma_check.regime.unknown.desc": "Entradas fuera de rango o γ_obs > 1 sin flag de corpus aleatorio. Verifica la medición.",
"gamma_check.glossary.title": "ⓘ Glosario — significado de las variables",
"gamma_check.glossary.gamma_pade": "γ_Padé: predicción cerrada (2−z)/(2+z), z = T√2/θ. Paper §sec:gamma_decomposition.",
"gamma_check.glossary.gamma_obs": "γ_observado: medido empíricamente desde los attention scores (ejecuta Diagnose CLI sobre pesos reales).",
"gamma_check.glossary.theta_eff_obs":"θ_eff (observado): invertido desde γ_obs vía T√2 / (1 − γ_obs). θ efectivo implicado por tu medición.",
"gamma_check.glossary.theta_eff_pade":"θ_eff (Padé): θ + T/√2. θ efectivo predicho por la fórmula cerrada.",
"gamma_check.glossary.efficiency": "η: ratio θ_eff_obs / θ_eff_Padé. ≈1 = normal · <0.01 = fraude · <0.5 = comprimido · >1.5 = sobre-Padé.",
"gamma_check.glossary.delta_h": "ΔH_Cardy: log(θ_eff_obs / θ_nominal). Cambio de entropía de Cardy. Negativo = entropía de compresión. ~0 = coincide con nominal.",
"gamma_check.glossary.regime": "Régimen: clasificador automático a partir de η + γ_obs + flag corpus_aleatorio.",
// §36 v0.6 — Tooltips para iconos ⓘ inline
"tooltip.gamma_pade": "γ_Padé(T_eval): predicción cerrada (2−z)/(2+z), z = T√2/θ. Paper §sec:gamma_decomposition.",
"tooltip.gamma_decomposed": "γ_descompuesto: γ desde descomposición arquitectural completa. Línea base Padé + shift GQA + shift post-IH (subconjunto replicado en audit calibrado).",
"tooltip.d_horizon": "d_horizon: horizonte efectivo de atención. Más allá los scores caen bajo el suelo de ruido (paper §26).",
"tooltip.L_NIAH": "Techo L_NIAH: techo predicho de fiabilidad needle-in-a-haystack al d_horizon actual.",
"tooltip.chi": "χ susceptibilidad: χ = 1/(1−γ). Diverge en la línea Hagedorn γ=1.",
"tooltip.kv_memory": "Memoria KV @ T_eval (BF16): caché KV por petición = 2 · n_layers · n_kv_heads · d_head · T_eval bytes.",
"tooltip.theta_eff_obs": "θ_eff (observado): θ efectivo implicado por tu γ_observado: T√2 / (1 − γ_obs).",
"tooltip.theta_eff_pade": "θ_eff (Padé): θ efectivo predicho por la fórmula cerrada: θ + T/√2.",
"tooltip.efficiency": "η = θ_eff_obs / θ_eff_Padé: ratio de eficiencia. ≈1 = normal · <0.01 = fraude · <0.5 = comprimido · >1.5 = sobre-Padé.",
"tooltip.delta_h_cardy": "ΔH_Cardy: log(θ_eff_obs / θ_nominal). Cambio de entropía de Cardy. Negativo = entropía de compresión. ~0 = coincide con nominal.",
"tooltip.verdict_aggregate": "Veredicto: peor-de entre todas las recipes. ✅ ADELANTE = todo verde · ⚠ DEGRADADO = ≥1 amarillo · ❌ NO = ≥1 rojo.",
"tooltip.verdict_breakdown": "Desglose por recipe: cada recipe evalúa un eje de decisión independiente (contexto-largo · presupuesto · hardware · custom-vs-API · compresión-KV). Un ❌ en X-1 significa «usa la API para tu volumen» no «el modelo falla» — abre la sección Recipes para contexto por eje.",
"tooltip.gamma_pill": "γ titular: γ_descompuesto (o γ_Padé como fallback). Rango (0,1) = Fase A (anti-Ising). γ ≥ 1 = Hagedorn / Fase B.",
"tooltip.anti_ising": "Clase Anti-Ising: Fase A → β = γ−1 < 0. Machine-verified (Sage + Lean Mathlib4). Ver §35 v0.5.",
// §37 v0.6 — Tabla de teoremas Lean+Mathlib
"lean.table.title": "📑 Tabla de teoremas Lean+Mathlib",
"lean.table.desc": "Cada entrada está machine-proven contra Lean 4 + Mathlib4. Click en cualquier link L# para saltar a la línea fuente en GitHub. Agrupado por tema — click en cabecera para expandir.",
"lean.table.theorem": "Teorema",
"lean.table.claim": "Afirmación",
"lean.table.tactic": "Táctica",
"lean.table.source": "Fuente",
"lean.table.lean": "Lean",
"lean.findings.title": "🔎 Findings sustantivos",
"lean.findings.detected_by": "Detectado por",
"lean.findings.fixed_by": "Arreglado por",
"lean.findings.recommendation":"Recomendación",
"lean.meta.repo": "Repo",
"lean.meta.build": "Build",
"lean.meta.theorems": "Teoremas",
"lean.meta.verified": "verificados",
"lean.meta.rejected": "rechazados",
"lean.meta.sorry": "sorry",
"lean.meta.findings": "findings sustantivos",
"lean.manifest.loading": "Cargando manifest Lean…",
"lean.manifest.error": "Manifest Lean no disponible",
// Help modal — sección v0.6
"help.v06.title": "🆕 v0.6 — γ predicho-vs-observado + Cardy ΔH + badges Lean",
"help.v06.intro": "v0.6 (2026-05-06): tres diagnósticos nuevos viven en el TAF Card bajo 🔬 Diagnósticos. Todo corre en tu navegador; γ_observado lo obtienes con la Diagnose CLI sobre pesos reales.",
"help.v06.layout.title": "Layout del TAF Card (nuevo en v0.6)",
"help.v06.layout.body": "Tras click en 🚀 Generar perfil completo la tarjeta muestra: una tira hero arriba (clase de arquitectura + meta + 3 pills: veredicto agregado ✅/⚠/❌, γ titular, 🧲 Anti-Ising si Fase A) y cuatro secciones plegables: 📋 Recipes (abierto por defecto — veredicto por dimensión), 🔬 Diagnósticos (números clave, γ predicho vs observado, explorador what-if), ✓ Verificación (consistencia algebraica Sage+Lean, falsificación F1-F23), 📂 Procedencia y compartir (auditoría de calibración + descarga JSON / enlace / submit al registro). Click en cualquier cabecera para expandir. Cada variable tiene tooltip ⓘ inline.",
"help.v06.gamma_check.title": "γ predicho vs observado",
"help.v06.gamma_check.body": "Introduces el γ medido empíricamente y la herramienta calcula η = θ_eff_obs / θ_eff_Padé y clasifica en uno de 5 regímenes:",
"help.v06.case.normal": "Normal (η ∈ [0.85, 1.15]) — el modelo usa su contexto nominal completo. Caso de uso: validar un release nuevo antes de adoptarlo.",
"help.v06.case.fraud": "Fraude (η < 0.01) — θ nominal inflado; el modelo se comporta como si θ ≪ del anunciado. Caso de uso: detectar inflación YaRN/marketing (patrón CodeLlama / Mistral-Nemo).",
"help.v06.case.compressed": "Comprimido (η < 0.5) — contexto comprimido; el modelo atiende menos lejos que θ nominal. Caso de uso: detectar compresión por RLHF/instruction-tuning (patrón LLaMA-2).",
"help.v06.case.overpade": "Sobre-Padé (η > 1.5) — el modelo atiende más lejos que Padé predice. Caso de uso: identificar régimen Lerch-corregido o checkpoints tempranos sub-entrenados (patrón pythia-1b).",
"help.v06.case.swa": "SWA corpus aleatorio (γ_obs > 1.05 con corpus_aleatorio=Sí) — firma de sliding-window attention. Caso de uso: confirmar SWA en Mistral / Gemma sobre tokens random.",
"help.v06.cardy.title": "Diagnóstico Cardy ΔH",
"help.v06.cardy.body": "ΔH_Cardy = log(θ_eff_obs / θ_nominal). Cambio de entropía entre el θ efectivo observado y el θ nominal. Negativo fuerte = entropía de compresión; cerca de cero = coincide con nominal. Complementa a η para casos borderline.",
"help.v06.lean.title": "Badges de verificación Lean + Mathlib",
"help.v06.lean.body": "Las identidades TAF están formalmente machine-proven en Lean Mathlib4: 37 teoremas en 7 grupos (Padé, flujo RG, Cayley, D-SAGE, hallazgos de auditoría, erratum CV, misc) + 1 hallazgo sustantivo (factor 2 en derivada V, teorema V_derivative_ne_RG_beta). Fuente: github.com/karlesmarin/lean-taf (commit 25c77fd). Re-verifica localmente: git clone --depth=1 https://github.com/karlesmarin/lean-taf && cd lean-taf && lake exe cache get && lake env lean Taf/Identities.lean. La pill 🧲 Anti-Ising del hero y la sección Verificación enlazan a líneas específicas del código fuente.",
"help.v06.glossary.title": "Glosario de variables (también embebido en TAF Card)",
"help.v06.glossary.body": "Cada variable del TAF Card tiene un tooltip ⓘ inline. Lista completa: γ, γ_Padé, γ_descompuesto, γ_observado, θ, θ_eff_obs, θ_eff_Padé, η, ΔH_Cardy, χ, d_horizon, L_NIAH, memoria KV, régimen. Pasa el ratón sobre cualquier ⓘ para la definición + sección del paper.",
"hero.title": "🔬 TAF Agent",
"hero.tagline": "Prueba CUALQUIER LLM transformer antes de gastar GPU/€.",
"hero.subtitle": "Todo el cómputo corre localmente en tu navegador. Gratis. Sin límites. Auditable.",
"hero.help": "📘 Ayuda y ejemplos",
"hero.about": "Construido por un investigador independiente. Código abierto. Sin afiliación con ningún proveedor de modelos.",
"modes.title": "🎯 Modo",
"modes.profile": "📇 Perfilar un modelo",
"modes.compare": "🆚 Comparar modelos",
"modes.inspector": "🔍 Inspeccionar config",
"modes.ask": "💬 Pregunta libre",
"modes.recipe": "📋 Elegir receta",
"modes.diagnose": "🩺 Diagnóstico CLI",
"diagnose.title": "🩺 Generador del comando Diagnose CLI",
"diagnose.tip": "El navegador predice γ desde config; el CLI mide γ_obs sobre los pesos reales. Este generador produce el comando exacto para ejecutar localmente.",
"diagnose.desc": "Elige opciones y copia-pega el comando generado en tu máquina local (Python + transformers + numpy). Modo rápido ≈5 min CPU; completo ≈20–60 min GPU.",
"diagnose.model_label": "ID del modelo HF:",
"diagnose.theta_label": "θ (auto si vacío):",
"diagnose.n_label": "Contexto N:",
"diagnose.options_label": "Opciones:",
"diagnose.opt_fast": "--fast (CPU, ~5 min)",
"diagnose.opt_cpu": "--cpu (forzar CPU)",
"diagnose.opt_4bit": "--load_in_4bit (modelos ≥7B)",
"diagnose.local_label": "--local path (opcional):",
"diagnose.build_btn": "📋 Generar comando",
"diagnose.cmd_title": "Comando generado:",
"diagnose.copy_btn": "📋 Copiar al portapapeles",
"diagnose.next_steps": "Siguientes pasos: (1) git clone https://github.com/karlesmarin/tafagent (2) cd tafagent && pip install torch transformers numpy (3) Ejecuta el comando (4) JSON resultado → subir vía modo Inspect para análisis TAF completo.",
"modes.phase": "📊 Diagrama de fase",
"phase.title": "📊 Diagrama de fase (γ × θ)",
"phase.tip": "Cada punto es un modelo del panel empírico del paper. x: log θ; y: γ. La línea Hagedorn γ=1 separa Fase A de Fase B. Hover para detalles, click para cargar en el formulario.",
"phase.desc": "23 modelos en el panel; curva Padé a T=2000.",
"modes.desc": "Inicio rápido: pega cualquier id de modelo HuggingFace (ej. meta-llama/Meta-Llama-3-8B), click Perfilar. Verás las 5 recetas evaluadas en segundos.",
"profile.title": "📇 Perfilar un modelo",
"profile.desc": "Para técnicos: cuando necesitas una foto completa de viabilidad de un modelo candidato. Un click ejecuta las 5 recetas y produce una TAF Card unificada.",
"profile.preset_label": "Preset:",
"profile.preset_default": "— o elige de la lista —",
"profile.hf_label": "ID modelo HF:",
"profile.fetch_btn": "📥 Cargar",
"profile.btn": "🚀 Generar perfil completo",
"profile.quickstart": "💡 Inicio rápido: elige cualquier preset → click Generar. O pega un id desde HF Hub trending → 📥 Cargar → Generar.",
"compare.title": "🆚 Comparar modelos lado a lado",
"compare.desc": "Para técnicos: cuando eliges entre 2-3 modelos candidatos para un escenario de despliegue específico. Misma receta, múltiples modelos, veredictos lado a lado.",
"compare.recipe_label": "Receta:",
"compare.T_eval_label": "T_eval (contexto objetivo):",
"compare.models_title": "Modelos a comparar (hasta 3)",
"compare.btn": "🚀 Comparar",
"compare.example": "💡 Prueba: pega 3 modelos populares de 7-8B (Meta-Llama-3-8B, Mistral-7B-v0.1, Qwen/Qwen2.5-7B), receta X-2, T_eval=16000. Mira cuál maneja mejor contexto largo.",
"ask.title": "❓ Tu pregunta",
"ask.placeholder": "ej. ¿Mistral-7B aguanta 16K NIAH retrieval? O: Tengo 5,000$, ¿qué modelo puedo entrenar? O: ¿GPU más barato para servir Llama-70B a 100M tokens/día?",
"ask.btn": "🚀 Analizar",
"ask.example_btn": "💡 Probar ejemplo",
"recipe.title": "📋 Receta",
"recipe.default": "— elige una receta —",
"recipe.input_title": "🎯 Entradas",
"verdict.title": "📊 Veredicto",
"chain.title": "🔍 Cadena de cálculo",
"chain.desc": "Cada número de abajo es Python determinista. Click en un paso para expandir.",
"answer.title": "💬 Respuesta en lenguaje natural",
"share.btn": "🔗 Copiar link",
"share.copied": "✅ ¡Copiado al portapapeles!",
"share.download": "💾 Descargar JSON",
"share.submit": "📤 Enviar al registry",
"share.import_title": "📂 Importar un resultado TAF compartido",
"share.import_desc": "¿Tienes un fichero JSON del análisis TAF de alguien? Cárgalo aquí para ver el veredicto + cadena localmente. La misma vista que si lo hubieras ejecutado tú.",
"share.import_btn": "📂 Cargar JSON compartido",
"synthesis.system": "Eres un asistente de diagnóstico preciso para LLMs transformer. Dados resultados de fórmulas TAF pre-calculados, escribe un resumen claro en español de 4-6 frases. Cita el número de sección (§X.Y) para cada número que menciones. Da siempre una recomendación concreta. NO inventes números.",
// INSPECTOR mode
"inspector.title": "🔍 Inspector de Arquitectura",
"inspector.desc": "Pega el contenido crudo de config.json. La herramienta extrae los parámetros arquitectónicos y ejecuta el Profile completo de 5 recetas.",
"inspector.tip": "Pega cualquier config.json directamente. La herramienta lo parsea y ejecuta el Profile completo. Útil para: modelos privados, configs en desarrollo, modelos aún no en HuggingFace, o comparar qué haría tu arquitectura custom.",
"inspector.quickstart": "💡 Caso de uso: tienes un modelo privado no en HF Hub, o una config que estás diseñando. Pega el JSON crudo abajo y obtén un perfil TAF completo.",
"inspector.placeholder": "{\n \"model_type\": \"llama\",\n \"rope_theta\": 500000,\n \"max_position_embeddings\": 8192,\n \"num_attention_heads\": 32,\n \"num_key_value_heads\": 8,\n \"hidden_size\": 4096,\n \"num_hidden_layers\": 32\n}",
"inspector.T_eval": "T_eval (tu contexto objetivo):",
"inspector.btn": "🚀 Inspeccionar y perfilar",
// WHAT-IF slider
"whatif.title": "🎚 What-if: arrastra T_eval para ver γ cambiar en vivo",
"whatif.desc": "Recálculo puro JS (sin llamada Pyodide). Muestra γ_Padé y d_horizon geométricos mientras deslizas. Click en el botón para re-ejecutar la cadena completa.",
"whatif.T_eval": "T_eval",
"whatif.gamma_pade": "γ_Padé",
"whatif.d_horizon": "d_horizon",
"whatif.l_niah": "Techo L_NIAH",
"whatif.predicted": "Veredicto geométrico predicho",
"whatif.rerun": "↻ Re-calcular cadena completa con este T_eval",
// COMMUNITY feed
"community.title": "🌐 Envíos recientes de la comunidad",
"community.desc": "Feed en vivo del registry público. Click en cualquier envío para ver análisis completo.",
"community.browse_all": "Ver todo →",
"community.loading": "Cargando...",
"community.no_repo": "El repo del registry aún no está creado. Cuando exista con envíos, aparecerán aquí en vivo.",
"community.no_submissions": "Sin envíos aún. Sé el primero — genera un Profile y click 📤 Enviar al registry.",
// FALSIFICATION dashboard
"falsification.title": "🔬 Predicciones del paper — estado de falsificación",
"falsification.desc": "El framework TAF se basa en predicciones falsificables (F1-F23). Cada una está empíricamente testada. Aquí está el estado en vivo de cada predicción del paper.",
"falsification.summary": "{confirmed} confirmadas · {partial} parciales · {refuted} refutadas · {untested} sin testear (de {total} predicciones totales)",
"falsification.col.id": "ID",
"falsification.col.claim": "Claim",
"falsification.col.status": "Estado",
"falsification.col.evidence": "Evidencia",
"tafcard.title": "📇 TAF Card — perfil completo del modelo",
"tafcard.recipes_title": "📋 Recetas — veredicto por dimensión",
"tafcard.recipes_count_label": "dimensiones",
"tafcard.numbers_title": "🔢 Números clave (paper §26)",
"tafcard.fals_title": "🔬 Estado de falsificación (F1-F23)",
"tafcard.fals_none": "Sin falsificaciones aplicables.",
"tafcard.diag_title": "🔬 Diagnósticos — números · γ check · what-if",
"tafcard.verify_title": "✓ Verificación — Lean + Sage + falsificación",
"tafcard.share_title": "📂 Procedencia y compartir",
"tafcard.whatif_title": "🎚️ Explorador what-if",
"verdict.go": "ADELANTE",
"verdict.no": "NO",
"verdict.degraded": "DEGRADADO",
"compare.title_out": "🆚 Tabla comparativa",
"status.loading_pyodide": "⏳ Cargando runtime Python (~10MB, solo primera vez)...",
"status.loading_taf": "⏳ Cargando fórmulas TAF + recetas...",
"status.ready": "✅ Listo. Elige un modelo y click Perfilar para empezar.",
"status.computing": "🧮 Calculando cadena TAF...",
"status.done": "✅ Hecho.",
"profile.hf_placeholder": "ej. meta-llama/Meta-Llama-3-8B o Qwen/Qwen2.5-7B",
"compare.hf_placeholder": "ID modelo HF (ej. meta-llama/Meta-Llama-3-8B)",
"compare.slot1_placeholder": "ID modelo HF (ej. meta-llama/Meta-Llama-3-8B)",
"compare.slot2_placeholder": "ID modelo HF #2",
"compare.slot3_placeholder": "ID modelo HF #3 (opcional)",
"compare.preset_default": "— o preset —",
// Parámetros del formulario
"param.theta": "θ (rope_theta)",
"param.theta.tip": "Frecuencia base RoPE de config.rope_theta. Mayor = más capacidad de largo alcance.",
"param.T_train": "T_train",
"param.T_train.tip": "Contexto máximo de entrenamiento. De max_position_embeddings. Más allá es extrapolación.",
"param.T_eval": "T_eval (tu objetivo)",
"param.T_eval.tip": "Tu contexto de inferencia objetivo. La pregunta clave: ¿se comportará bien el modelo a ESTA longitud?",
"param.n_attn": "n_attention_heads",
"param.n_attn.tip": "Número de attention heads por capa. De num_attention_heads.",
"param.n_kv": "n_kv_heads",
"param.n_kv.tip": "KV heads. Si < n_attention_heads → GQA (Grouped Query Attention). Reduce memoria KV pero empuja γ hacia Hagedorn.",
"param.d_head": "head_dim",
"param.d_head.tip": "Dimensión por head. Típico 64, 96, 128. De head_dim o hidden_size / num_attention_heads.",
"param.n_layers": "n_layers",
"param.n_layers.tip": "Número de bloques transformer. De num_hidden_layers.",
"param.n_params": "n_params (ej. 8e9)",
"param.n_params.tip": "Número total de parámetros. Umbral ~400M para emergencia de induction heads. Afecta memoria KV y recipes de presupuesto.",
"param.has_swa": "¿Tiene SWA?",
"param.has_swa.tip": "Sliding Window Attention. true para Mistral, gemma-2, phi-3. El audit de calibración v0.5.3 desactivó la corrección histórica δ_SWA (ajuste n=1).",
"common.yes": "Sí",
"common.no": "No",
// Tooltips de modos
"modes.tip": "Siete formas de usar la herramienta.
📇 Perfil: pega un id → las 8 recetas a la vez = TAF Card.
🆚 Comparar: 2-3 modelos lado a lado en una receta.
🔍 Inspeccionar config: pega config.json crudo → Perfil completo.
💬 Pregunta: pregunta libre, el LLM del navegador elige la receta.
📋 Receta: selección manual con control total del formulario.
🩺 Diagnóstico CLI: genera comando Python para medir γ localmente.
📊 Diagrama de fase: panel de 23 modelos en plano (log θ, γ).",
"profile.tip": "Diagnóstico completo en un click. Pega cualquier id de modelo HF (o elige preset). La herramienta ejecuta las 5 recetas (contexto largo, compresión KV, custom vs API, presupuesto, hardware) y produce una única TAF Card con veredicto por dimensión + números clave + clasificación arquitectónica.
Caso de uso: \"Estoy evaluando Qwen2.5-32B para producción — ¿cuál es su perfil completo de viabilidad?\" → pega id → Perfilar → listo.",
"compare.tip": "Misma receta, múltiples modelos. Elige 2-3 modelos candidatos y una receta. Ve los veredictos en una única tabla comparativa.
Caso de uso: \"Necesito recuperación de contexto largo a 16K — ¿cuál es mejor: Llama-3-8B, Mistral-7B o Qwen-7B?\" → elige 3 + X-2 + 16K → ve el ganador.",
// Modal de ayuda
"help.title": "📘 TAF Agent — Manual de Usuario",
"help.what.title": "¿Qué hace?",
"help.what.body": "Predice la viabilidad práctica de cualquier LLM transformer antes de gastar GPU/€. Responde preguntas como \"¿funcionará este modelo a L=32K?\" o \"¿debería entrenar custom o usar API?\" usando fórmulas Python deterministas (TAF — Thermodynamic Attention Framework).",
"help.modes.title": "Cómo usar — 7 modos",
"help.modes.profile": "📇 Perfilar: pega id de modelo → todas las recetas a la vez = TAF Card. Mejor punto de inicio.",
"help.modes.compare": "🆚 Comparar: 2-3 modelos lado a lado en la misma receta. Mejor al elegir entre candidatos.",
"help.modes.inspector": "🔍 Inspeccionar config: pega config.json crudo → la herramienta lo parsea y ejecuta el Perfil completo. Para modelos privados, configs en desarrollo, o modelos aún no en HF Hub.",
"help.modes.ask": "💬 Pregunta libre: pregunta en lenguaje natural, el LLM del navegador elige la receta. Mejor para exploración casual.",
"help.modes.recipe": "📋 Receta + formulario: selección manual, control total de parámetros. Mejor cuando quieres control exacto.",
"help.modes.diagnose": "🩺 Diagnóstico CLI: genera comando Python para medir γ en tu máquina local (transformers + numpy). Rápido ≈5 min CPU; completo ≈20–60 min GPU. JSON resultado re-subible por Inspect.",
"help.modes.phase": "📊 Diagrama de fase: scatter de 23 modelos del panel en plano (log θ, γ). Línea Hagedorn γ=1 separa Fase A de Fase B. Click en un punto para cargar ese modelo en el formulario de Receta.",
"help.recipes.title": "Las 8 recetas disponibles",
"help.recipe.x1.title": "X-1 Entrenamiento custom vs API — compara coste de entrenar tu propio modelo vs pagar API.",
"help.recipe.x1.example": "Prueba: \"¿Entrenar 8B custom o usar GPT-4o para 50M tokens/mes?\"
Respuestas: SÍ (custom) / NO (API) con meses para break-even.",
"help.recipe.x2.title": "X-2 Viabilidad contexto largo — predice si un modelo sirve longitud objetivo de manera fiable.",
"help.recipe.x2.example": "Prueba: \"¿Meta-Llama-3-8B maneja 32000 tokens para retrieval?\"
Cadena: γ_Padé → descomposición → d_horizon → techo NIAH → alucinación → memoria KV.
Veredicto: SÍ / DEGRADADO / NO con mitigación si hace falta.",
"help.recipe.x3.title": "X-3 Pre-flight presupuesto — dado un presupuesto $, ¿qué modelo es viable entrenar?",
"help.recipe.x3.example": "Prueba: \"Tengo $5000, ¿qué modelo puedo entrenar?\"
Respuesta: GO / TINY-MODEL / MEMORY-LIMITED con N (params) y D (tokens) concretos.",
"help.recipe.x5.title": "X-5 Selección hardware — ¿qué GPU usar para servir al throughput objetivo?",
"help.recipe.x5.example": "Prueba: \"Hardware más barato para servir Llama-3-8B a 10M tokens/día\"
Respuesta: mejor GPU + $/Mtok + capacidad vs objetivo.",
"help.recipe.x19.title": "X-19 Decisión compresión KV — ¿usar soft decay, hard cutoff, o métodos de literatura?",
"help.recipe.x21.title": "X-21 Diagnóstico Pureza Imprint — predice γ sobre tokens RANDOM via ν=−1/(2π); ¿cuán limpia es la predicción RoPE del modelo?",
"help.recipe.x22.title": "X-22 Invariante Compute-Context — ¿γ × log(N²·D) está en banda 51.2 ± 16.8? Detecta anomalías de scaling/training.",
"help.recipe.x23.title": "X-23 Detector Fase IH — ¿pre- o post-induction-head? Probe barato via sign(γ_text − γ_random).",
"help.recipe.x21.example": "Prueba: «¿Cuán limpia es la predicción RoPE en Llama-3-8B?»
Respuesta: γ_random predicho + diagnóstico (CLEAN / OVER-IMPRINTED / UNDER-IMPRINTED).",
"help.recipe.x22.example": "Prueba: «¿Mistral-7B entra en el invariante compute-context?»
Respuesta: K = γ·log(N²·D), z-score, IN-BAND u OUTLIER.",
"help.recipe.x23.example": "Prueba: «¿Qwen2.5-7B es post-induction-head?»
Respuesta: CONFIRMED PRE-IH / CONFIRMED POST-IH / ANOMALY (chequeo consistencia tamaño vs Δγ).",
"help.section.v04": "Novedades v0.4 (hallazgos sesión 29 del 2026-04-28): tres recipes diagnósticas derivadas del análisis panel cross-model (n=22 LLMs).",
"help.divider.v04_s29": "— v0.4 (hallazgos sesión 29) —",
"footer.tech_stack": "Cómputo: Pyodide · Síntesis: WebLLM (Qwen2.5-0.5B local) · Hosting: GitHub Pages · Coste: $0",
"help.v04.imprint": "Slope imprint aprendido ν = −1/(2π): el periodo de rotación RoPE 2π provoca un sesgo posicional en los pesos, proporcional a log(N_params). Incluso tokens random muestran este scaling. ν es DERIVADO — no ajustado (err empírico 0.3%).",
"help.v04.invariant": "Invariante Chinchilla-atención K: γ × log(N²·D) ≈ 51.2 ± 16.8 (CV=0.329). Conecta compute scaling y exponente de atención en un solo número adimensional.",
"help.v04.ih_probe": "Δγ como probe IH: sign(γ_text − γ_random) > 0 ⟺ post-induction-head. Más barato que correr un benchmark in-context-learning.",
"help.v04.constants": "γ-cluster en constantes famosas (intrigante, n=4): CodeLlama-13b γ=0.382 ≈ 1−1/φ (conjugado áureo, err 0.0003); pythia-1.4b γ=0.705 ≈ 1/√2; Llama-2-7b γ=0.287 ≈ 1−1/√2; Mistral-Nemo γ=0.428 ≈ log_10(e). Caveat: podría ser coincidencia.",
"help.recipe.x19.example": "Prueba: \"¿Cómo comprimir caché KV para Qwen2.5-7B a 32K?\"
Respuesta: USE SOFT DECAY / USE D_f CUTOFF / USE LITERATURE METHODS / USE HARD T_train.",
"help.param.theta": "θ (rope_theta): frecuencia base RoPE. Mayor = más capacidad de largo alcance. Típico: 10000 (modelos antiguos), 500000 (Llama-3), 1000000 (Qwen2.5).",
"help.param.T_train": "T_train: contexto máximo que vio el modelo durante entrenamiento. De max_position_embeddings.",
"help.param.T_eval": "T_eval: tu longitud de contexto objetivo en inferencia. La perilla clave.",
"help.param.gqa": "n_kv_heads < n_attention_heads: el modelo usa GQA (Grouped Query Attention). Reduce memoria KV pero empuja γ hacia Hagedorn.",
"help.param.swa": "has_SWA: el modelo usa Sliding Window Attention (Mistral, gemma-2).",
"help.param.nparams": "n_params: número total de parámetros. Umbral ~400M para emergencia de induction heads.",
"help.add_models.title": "Añadir nuevos modelos (3 maneras)",
"help.add_models.preset": "Lista de presets: 11 modelos populares curados. Selecciona del dropdown.",
"help.add_models.hf": "HF Hub fetch: pega cualquier id (ej. Qwen/Qwen2.5-32B-Instruct), click 📥 Cargar. El navegador descarga config.json directamente de HuggingFace, llena el formulario. Funciona con cualquier modelo público.",
"help.add_models.manual": "Manual: rellena los campos directamente con valores de la model card.",
"help.audit.title": "La cadena auditable",
"help.audit.body": "Cada resultado muestra la Cadena de Cálculo completa — cada paso de fórmula con sus entradas, salida e interpretación. Click en cualquier paso para expandir. Las referencias de sección (§26.1, §19.1, etc.) apuntan al paper para la derivación.",
"help.synthesis.title": "La respuesta en lenguaje natural",
"help.synthesis.body": "Tras ejecutar la cadena determinista, un LLM en el navegador (Qwen2.5-0.5B, ~350MB cacheado tras primera carga) sintetiza un resumen en lenguaje natural. Los números arriba son siempre correctos (Python determinista); la síntesis la genera el LLM — verifica contra la cadena si dudas.",
"help.params.title": "Parámetros comunes explicados",
"help.verdicts.title": "Qué mirar en los veredictos",
"help.verdict.yes": "SÍ / GO — procede con confianza; los números apoyan la elección.",
"help.verdict.deg": "DEGRADADO / TINY-MODEL — funciona con caveats; lee la acción.",
"help.verdict.no": "NO / MEMORY-LIMITED — no procedas tal cual; se da mitigación.",
"help.privacy.title": "Privacidad",
"help.privacy.body": "Todo corre en tu navegador. Sin telemetría, sin analytics, sin datos enviados a ningún sitio. Incluso el modelo LLM corre localmente vía WebGPU/WebAssembly. Tus model_ids y preguntas nunca abandonan esta página.",
"help.source.title": "Código fuente y paper",
"help.source.body": "Código: github.com/karlesmarin/tafagent
Paper: Marin 2026 — Predicting How Transformers Attend (Zenodo; arXiv próximamente)
Dataset: taf-attention-decay — 58 mediciones γ sobre 32 modelos (CC-BY-4.0)",
"footer.text": "© 2026 Carles Marin · Apache-2.0 · investigación independiente · la herramienta que cierra el círculo del paper.",
},
// ────────────────────────────────────────────────────────────────────────
// FR — Français
// ────────────────────────────────────────────────────────────────────────
fr: {
// §33 v0.4 (sesion 31, 2026-04-30) — nouvelles fonctions de diagnostic
"v04.title": "🆕 v0.4 — Nouveaux diagnostics (sesion 31)",
"v04.section.intro": "Quatre nouvelles fonctions diagnostiques dérivées en session 31 (2026-04-30) depuis jeux de formules cross-of-crosses + interrogation socratique. Disponibles dans taf_browser.py §33.",
"v04.arch.label": "Concentration Architecturale",
"v04.arch.desc": "γ_text ≈ γ_Padé − 0.012·n_kv. Loi corrélationnelle cross-panel (R²=0.30). Caveat : pas un prédicteur par-modèle.",
"v04.pdi.label": "PDI — Indice de Déviation de Padé",
"v04.pdi.desc": "PDI = d_horizon_obs/T_eval. Feu : vert (≈1), orange (>>1), jaune (<<1), rouge (Phase B négatif).",
"v04.4bit.label": "Prédicteur de Décalage 4-bit",
"v04.4bit.desc": "MHA : R²(bf16)<0.9 → γ monte ; R²>0.99 → γ descend. GQA : précision-robuste.",
"v04.crit.label": "Ensemble d'Exposants Critiques",
"v04.crit.desc": "ν_c, β_c, η_c (=γ−1, CORRIGÉ), α_C, γ_susc avec minimum AM-GM à γ=1−1/√2≈0.293.",
// §34 v0.5 (session 32, 2026-05-01) — Cohérence algébrique vérifiée par machine
"v05.title": "🔬 v0.5 — Cohérence vérifiée par machine (session 32)",
"v05.section.intro": "Vérification duale par Sage Groebner basis + Lean Mathlib4 de 15 identités algébriques des exposants critiques TAF. Premier framework transformer-attention avec preuve formelle machine.",
"v05.verify.label": "Vérification de Cohérence Algébrique",
"v05.verify.desc": "Étant donné γ mesuré, vérifie 12 identités D-SAGE (D-SAGE-1 : 2η²+η·γ_χ+1=0, β·χ=−1, α+χ=2, etc.). Toutes passantes = framework intact. Échecs = outliers bf16 / artefacts de quantification.",
"v05.dsage1.label": "D-SAGE-1 (★★ core)",
"v05.dsage1.desc": "Identité quadratique 2η² + η·γ_χ + 1 = 0 (découverte par Sage Groebner, vérifiée Lean). Remplace l'affirmation incorrecte de 'fermeture triple'. Réfute η=2γ du paper 1 algébriquement.",
"v05.erratum.label": "Erratum paper 1 — correction η",
"v05.erratum.desc": "Paper 1 affirmait η = 2γ. Sage Groebner + Lean Mathlib4 ont prouvé l'échec (résidu (-4γ³+5γ+1)/(1-γ) > 0 ∀γ ∈ Phase A). Valeur correcte : η = γ−1, satisfaisant D-SAGE-1.",
"v05.repro.label": "Reproductibilité",
"v05.repro.desc": "Les 15 théorèmes sont machine-proof en Lean Mathlib4 (build réussi 1973 jobs). Script Sage : analysis/sage_recursive_sweep_2026-04-30.sage. Code Lean : lean_taf/taf/Taf/Identities.lean.",
// v0.5.1 — TAF Card consistency check button
"v05.consistency.title": "🔬 Vérification de cohérence algébrique (Sage + Lean v0.5)",
"v05.consistency.desc": "Vérifie 12 identités algébriques D-SAGE des exposants critiques TAF (machine-proof Sage Groebner basis + Lean Mathlib4). Passe = framework intact. Échec = outlier bf16 / artefact de quantification.",
"v05.consistency.btn": "🔬 Vérifier cohérence algébrique",
// v0.5.2 — Anti-Ising universality class badge
"v05.antiising.badge": "🧲 Classe Anti-Ising (β=γ−1<0, vérifié par machine)",
// v0.5.2 — Tooltips par identité (explications en langage clair)
"v05.tooltip.D_SAGE_1": "Identité algébrique quadratique reliant la dimension anormale η et la susceptibilité γ_χ. Identité CENTRALE découverte par Sage Groebner basis (machine-proof). Remplace l'ancienne affirmation incorrecte de triple closure.",
"v05.tooltip.D_SAGE_2": "En Phase A, β = γ−1 est négatif (anti-Ising). Multiplié par χ = 1/(1−γ) donne exactement −1. Signature du régime négatif-β de TAF.",
"v05.tooltip.D_SAGE_4": "L'exposant de chaleur spécifique α et la susceptibilité χ se somment exactement à 2 en TAF. Conséquence algébrique de l'hyperscaling de Josephson.",
"v05.tooltip.D_SAGE_5": "Identité linéaire : α + γ_χ = 2(2−γ). Signifie que quand γ s'approche de 1 (Hagedorn), la somme s'approche de 2 ; à γ=0 elle vaut 4.",
"v05.tooltip.D_SAGE_6": "Exposant de paramètre d'ordre multiplié par exposant de susceptibilité donne une quadratique spécifique en γ. Relation algébrique factorisée.",
"v05.tooltip.Rushbrooke_tautology": "Hyperscaling de Rushbrooke standard 2β + γ_χ = ν·d à d=1. En TAF c'est une TAUTOLOGIE — γ_χ est défini exactement pour que cela soit vrai. Confirmé par Sage Groebner basis.",
"v05.tooltip.Josephson_tautology": "Hyperscaling de Josephson standard 2 − α = ν·d à d=1. En TAF c'est une TAUTOLOGIE — α est défini exactement pour que cela soit vrai.",
"v05.tooltip.Fisher_independent": "Relation de Fisher γ_χ = (2−η)·ν. En TAF est INDÉPENDANTE (ne ferme PAS comme identité, contrairement à l'affirmation de triple closure). Le résidu est γ(2γ−3)/(1−γ).",
"v05.tooltip.eta_2gamma_REFUTED": "Paper 1 affirmait η=2γ. Cette identité le réfute : le résidu est positif dans toute la Phase A. Réfutation machine-proof par Lean Mathlib4.",
"v05.tooltip.D_14_nu_imprint": "La pente d'empreinte apprise ν = −1/(2π) multipliée par 2π donne −1. Vérification dimensionnelle triviale du paper 1.",
"v05.tooltip.D_SAGE_7": "La charge centrale c=3 multipliée par |ν_imprint| multipliée par 2π donne 3. Fermeture dimensionnelle reliant CFT à l'empreinte d'entraînement.",
"v05.tooltip.nu_beta_id": "Exposant de longueur de corrélation ν multiplié par exposant de paramètre d'ordre β donne −1 en Phase A. Variante de D-SAGE-2.",
"v053.calibration.title": "🔬 v0.5.3 — Audit de calibrage (2026-05-02)",
"v053.calibration.note": "Correction SWA désactivée — δ_SWA = -0.21 d'origine était calibrée sur n=1 modèle (données insuffisantes ; moyenne du cas unique +0.355). Correction post_IH marquée exploratoire — moyenne de groupe ≈ 0 en ré-audit (panel n=22) ne réplique pas l'ajustement OLS. Correction GQA réplique (panel +0.115 vs hardcoded +0.11). Formule D_f corrigée pour Phase B (γ>1) — utilise une somme cumulative discrète au lieu d'une approximation continue. LLaMA-3, Mistral, Gemma rapportent maintenant des valeurs de compression correctes.",
"v053.release.banner": "🔧 v0.5.3 — Corrections issues d'audit : D_f de compression KV utilise maintenant la somme discrète (correct pour tout γ) ; δ_SWA désactivé (calibrage n=1) ; erratum du coefficient C_V paper §5.2 (1/4 → 1/12).",
// §35 v0.6 — Diagnostic γ prédit vs observé
"gamma_check.title": "🔍 γ prédit vs observé",
"gamma_check.desc": "Saisissez votre γ mesuré empiriquement. L'outil détecte le régime : fraude (θ gonflé) / comprimé / sur-Padé / SWA-aléatoire / normal.",
"gamma_check.gobs_label": "γ_observé",
"gamma_check.gobs_tip": "γ mesuré empiriquement à partir des attention scores de votre modèle. Utilisez la CLI Diagnose pour l'obtenir depuis les poids réels.",
"gamma_check.random_label": "Corpus aléatoire ?",
"gamma_check.random_tip": "Cochez si γ_observé a été mesuré sur des tokens aléatoires/non structurés. Distingue la signature SWA (γ_obs > 1) d'une anomalie.",
"gamma_check.regime": "Régime",
"gamma_check.regime.normal": "Normal",
"gamma_check.regime.fraud": "Fraude (θ gonflé)",
"gamma_check.regime.compressed": "Contexte comprimé",
"gamma_check.regime.overpade": "Sur-Padé",
"gamma_check.regime.swa": "Signature SWA (corpus aléatoire)",
"gamma_check.regime.unknown": "Inconnu",
"gamma_check.regime.normal.desc": "η ∈ [0.85, 1.15] : le modèle utilise son contexte nominal complet, sans anomalie.",
"gamma_check.regime.fraud.desc": "η < 0.01 : θ nominal gonflé. Le modèle se comporte comme si θ ≪ annoncé. Probable inflation YaRN/marketing sans vraie extension de contexte.",
"gamma_check.regime.compressed.desc":"η ∈ [0.01, 0.5) : contexte comprimé (le modèle attend moins loin que ne le prédit θ nominal). Fréquent en instruction-tuned / RLHF.",
"gamma_check.regime.overpade.desc": "η > 1.5 : le modèle attend plus loin que Padé ne le prédit. Régime Lerch-corrigé possible ou checkpoint précoce sous-entraîné.",
"gamma_check.regime.swa.desc": "γ_obs > 1.05 sur corpus aléatoire = signature de sliding-window attention (familles Mistral / Gemma).",
"gamma_check.regime.unknown.desc": "Entrées hors plage ou γ_obs > 1 sans flag corpus_aléatoire. Vérifiez la mesure.",
"gamma_check.glossary.title": "ⓘ Glossaire — signification des variables",
"gamma_check.glossary.gamma_pade": "γ_Padé : prédiction fermée (2−z)/(2+z), z = T√2/θ. Paper §sec:gamma_decomposition.",
"gamma_check.glossary.gamma_obs": "γ_observé : mesuré empiriquement à partir des attention scores (exécutez Diagnose CLI sur poids réels).",
"gamma_check.glossary.theta_eff_obs":"θ_eff (observé) : inversé depuis γ_obs via T√2 / (1 − γ_obs). θ effectif impliqué par votre mesure.",
"gamma_check.glossary.theta_eff_pade":"θ_eff (Padé) : θ + T/√2. θ effectif prédit par la formule fermée.",
"gamma_check.glossary.efficiency": "η : rapport θ_eff_obs / θ_eff_Padé. ≈1 = normal · <0.01 = fraude · <0.5 = comprimé · >1.5 = sur-Padé.",
"gamma_check.glossary.delta_h": "ΔH_Cardy : log(θ_eff_obs / θ_nominal). Variation d'entropie de Cardy. Négatif = entropie de compression. ~0 = correspondance nominale.",
"gamma_check.glossary.regime": "Régime : classifieur automatique à partir de η + γ_obs + flag corpus_aléatoire.",
// §36 v0.6 — Tooltips pour icônes ⓘ inline
"tooltip.gamma_pade": "γ_Padé(T_eval) : prédiction fermée (2−z)/(2+z), z = T√2/θ. Paper §sec:gamma_decomposition.",
"tooltip.gamma_decomposed": "γ_décomposé : γ depuis la décomposition architecturale complète. Ligne de base Padé + shift GQA + shift post-IH (sous-ensemble répliqué dans audit calibré).",
"tooltip.d_horizon": "d_horizon : horizon d'attention effectif. Au-delà, les scores tombent sous le plancher de bruit (paper §26).",
"tooltip.L_NIAH": "Plafond L_NIAH : plafond prédit de fiabilité needle-in-a-haystack au d_horizon courant.",
"tooltip.chi": "χ susceptibilité : χ = 1/(1−γ). Diverge à la ligne Hagedorn γ=1.",
"tooltip.kv_memory": "Mémoire KV @ T_eval (BF16) : cache KV par requête = 2 · n_layers · n_kv_heads · d_head · T_eval octets.",
"tooltip.theta_eff_obs": "θ_eff (observé) : θ effectif impliqué par votre γ_observé : T√2 / (1 − γ_obs).",
"tooltip.theta_eff_pade": "θ_eff (Padé) : θ effectif prédit par la formule fermée : θ + T/√2.",
"tooltip.efficiency": "η = θ_eff_obs / θ_eff_Padé : ratio d'efficacité. ≈1 = normal · <0.01 = fraude · <0.5 = comprimé · >1.5 = sur-Padé.",
"tooltip.delta_h_cardy": "ΔH_Cardy : log(θ_eff_obs / θ_nominal). Variation d'entropie de Cardy. Négatif = entropie de compression. ~0 = correspondance nominale.",
"tooltip.verdict_aggregate": "Verdict : pire-de toutes les recettes. ✅ GO = tout vert · ⚠ DÉGRADÉ = ≥1 jaune · ❌ NON = ≥1 rouge.",
"tooltip.verdict_breakdown": "Décomposition par recette : chaque recette teste un axe de décision indépendant (contexte-long · budget · matériel · custom-vs-API · compression-KV). Un ❌ en X-1 signifie « utilisez l'API pour votre volume » et non « le modèle échoue » — ouvrez la section Recettes pour le contexte par axe.",
"tooltip.gamma_pill": "γ vedette : γ_décomposé (ou γ_Padé en fallback). Plage (0,1) = Phase A (anti-Ising). γ ≥ 1 = Hagedorn / Phase B.",
"tooltip.anti_ising": "Classe Anti-Ising : Phase A → β = γ−1 < 0. Machine-verified (Sage + Lean Mathlib4). Voir §35 v0.5.",
// §37 v0.6 — Table des théorèmes Lean+Mathlib
"lean.table.title": "📑 Table des théorèmes Lean+Mathlib",
"lean.table.desc": "Chaque entrée ci-dessous est machine-proven contre Lean 4 + Mathlib4. Cliquez sur un lien L# pour aller à la ligne source sur GitHub. Groupé par thème — cliquez sur un en-tête pour déplier.",
"lean.table.theorem": "Théorème",
"lean.table.claim": "Énoncé",
"lean.table.tactic": "Tactique",
"lean.table.source": "Source",
"lean.table.lean": "Lean",
"lean.findings.title": "🔎 Findings substantiels",
"lean.findings.detected_by": "Détecté par",
"lean.findings.fixed_by": "Corrigé par",
"lean.findings.recommendation":"Recommandation",
"lean.meta.repo": "Repo",
"lean.meta.build": "Build",
"lean.meta.theorems": "Théorèmes",
"lean.meta.verified": "vérifiés",
"lean.meta.rejected": "rejetés",
"lean.meta.sorry": "sorry",
"lean.meta.findings": "findings substantiels",
"lean.manifest.loading": "Chargement du manifeste Lean…",
"lean.manifest.error": "Manifeste Lean indisponible",
// Help modal — section v0.6
"help.v06.title": "🆕 v0.6 — γ prédit-vs-observé + Cardy ΔH + badges Lean",
"help.v06.intro": "v0.6 (2026-05-06) : trois nouveaux diagnostics vivent dans la TAF Card sous 🔬 Diagnostics. Tout tourne dans votre navigateur ; γ_observé provient de la Diagnose CLI sur poids réels.",
"help.v06.layout.title": "Disposition de la TAF Card (nouveau en v0.6)",
"help.v06.layout.body": "Après avoir cliqué 🚀 Générer profil complet, la carte affiche : une bande hero en haut (classe d'architecture + méta + 3 pills : verdict agrégé ✅/⚠/❌, γ vedette, 🧲 Anti-Ising si Phase A) et quatre sections pliables : 📋 Recettes (ouverte par défaut — verdict par dimension), 🔬 Diagnostics (nombres clés, γ prédit vs observé, explorateur what-if), ✓ Vérification (cohérence algébrique Sage+Lean, falsification F1-F23), 📂 Provenance & partage (audit de calibration + téléchargement JSON / lien / soumission registre). Cliquez sur n'importe quel en-tête pour déplier. Chaque variable a un tooltip ⓘ inline.",
"help.v06.gamma_check.title": "γ prédit vs observé",
"help.v06.gamma_check.body": "Saisissez le γ mesuré empiriquement et l'outil calcule η = θ_eff_obs / θ_eff_Padé et classe en l'un de 5 régimes :",
"help.v06.case.normal": "Normal (η ∈ [0.85, 1.15]) — le modèle utilise son contexte nominal complet. Cas d'usage : valider une nouvelle release avant adoption.",
"help.v06.case.fraud": "Fraude (η < 0.01) — θ nominal gonflé ; le modèle se comporte comme si θ ≪ annoncé. Cas d'usage : détecter inflation YaRN/marketing (motif CodeLlama / Mistral-Nemo).",
"help.v06.case.compressed": "Comprimé (η < 0.5) — contexte comprimé ; le modèle attend moins loin que θ nominal. Cas d'usage : repérer compression par RLHF/instruction-tuning (motif LLaMA-2).",
"help.v06.case.overpade": "Sur-Padé (η > 1.5) — le modèle attend plus loin que Padé ne le prédit. Cas d'usage : identifier régime Lerch-corrigé ou checkpoints précoces sous-entraînés (motif pythia-1b).",
"help.v06.case.swa": "SWA corpus aléatoire (γ_obs > 1.05 avec corpus_aléatoire=Oui) — signature de sliding-window attention. Cas d'usage : confirmer SWA Mistral / Gemma sur tokens aléatoires.",
"help.v06.cardy.title": "Diagnostic Cardy ΔH",
"help.v06.cardy.body": "ΔH_Cardy = log(θ_eff_obs / θ_nominal). Variation d'entropie entre le θ effectif observé et le θ nominal. Fortement négatif = entropie de compression ; proche de zéro = correspondance nominale. Complète η pour les cas borderline.",
"help.v06.lean.title": "Badges de vérification Lean + Mathlib",
"help.v06.lean.body": "Les identités TAF sont formellement machine-proven en Lean Mathlib4 : 37 théorèmes en 7 groupes (Padé, flot RG, Cayley, D-SAGE, résultats d'audit, erratum CV, divers) + 1 résultat substantiel (facteur 2 dans la dérivée V, théorème V_derivative_ne_RG_beta). Source : github.com/karlesmarin/lean-taf (commit 25c77fd). Re-vérifier localement : git clone --depth=1 https://github.com/karlesmarin/lean-taf && cd lean-taf && lake exe cache get && lake env lean Taf/Identities.lean. La pill 🧲 Anti-Ising du hero et la section Vérification renvoient à des lignes sources spécifiques.",
"help.v06.glossary.title": "Glossaire des variables (également intégré dans la TAF Card)",
"help.v06.glossary.body": "Chaque variable de la TAF Card a un tooltip ⓘ inline. Liste complète : γ, γ_Padé, γ_décomposé, γ_observé, θ, θ_eff_obs, θ_eff_Padé, η, ΔH_Cardy, χ, d_horizon, L_NIAH, mémoire KV, régime. Survolez n'importe quel ⓘ pour la définition + section du paper.",
"hero.title": "🔬 TAF Agent",
"hero.tagline": "Testez N'IMPORTE QUEL LLM transformer avant de dépenser du GPU/€.",
"hero.subtitle": "Tout le calcul s'exécute localement dans votre navigateur. Gratuit. Illimité. Auditable.",
"hero.help": "📘 Aide et exemples",
"hero.about": "Conçu par un chercheur indépendant. Open source. Non affilié à un fournisseur de modèles.",
"modes.title": "🎯 Mode",
"modes.profile": "📇 Profiler un modèle",
"modes.compare": "🆚 Comparer des modèles",
"modes.inspector": "🔍 Inspecter config",
"modes.ask": "💬 Question libre",
"modes.recipe": "📋 Choisir une recette",
"modes.diagnose": "🩺 Diagnose CLI",
"diagnose.title": "🩺 Générateur de commande Diagnose CLI",
"diagnose.tip": "Le navigateur prédit γ à partir de la config; le CLI mesure γ_obs sur les poids réels. Ce générateur produit la commande exacte à exécuter localement.",
"diagnose.desc": "Choisis les options et copie-colle la commande générée sur ta machine locale (Python + transformers + numpy). Mode rapide ≈5 min CPU; complet ≈20–60 min GPU.",
"diagnose.model_label": "ID du modèle HF:",
"diagnose.theta_label": "θ (auto si vide):",
"diagnose.n_label": "Contexte N:",
"diagnose.options_label": "Options:",
"diagnose.opt_fast": "--fast (CPU, ~5 min)",
"diagnose.opt_cpu": "--cpu (forcer CPU)",
"diagnose.opt_4bit": "--load_in_4bit (modèles ≥7B)",
"diagnose.local_label": "--local path (optionnel):",
"diagnose.build_btn": "📋 Générer la commande",
"diagnose.cmd_title": "Commande générée :",
"diagnose.copy_btn": "📋 Copier dans le presse-papiers",
"diagnose.next_steps": "Prochaines étapes: (1) git clone https://github.com/karlesmarin/tafagent (2) cd tafagent && pip install torch transformers numpy (3) Exécute la commande (4) JSON résultat → upload via mode Inspect pour analyse TAF complète.",
"modes.phase": "📊 Diagramme de phase",
"phase.title": "📊 Diagramme de phase (γ × θ)",
"phase.tip": "Chaque point est un modèle du panel empirique du paper. x: log θ; y: γ. La ligne Hagedorn γ=1 sépare Phase A de Phase B. Hover pour détails, click pour charger dans le formulaire.",
"phase.desc": "23 modèles dans le panel; courbe Padé à T=2000.",
"modes.desc": "Démarrage rapide: collez n'importe quel id de modèle HuggingFace (ex. meta-llama/Meta-Llama-3-8B), cliquez Profiler. Voyez les 5 recettes évaluées en quelques secondes.",
"profile.title": "📇 Profiler un modèle",
"profile.desc": "Pour techniciens: quand vous avez besoin d'un instantané complet de viabilité d'un modèle candidat. Un clic exécute les 5 recettes et produit une TAF Card unifiée.",
"profile.preset_label": "Préréglage:",
"profile.preset_default": "— ou choisir dans la liste —",
"profile.hf_label": "ID modèle HF:",
"profile.fetch_btn": "📥 Charger",
"profile.btn": "🚀 Générer profil complet",
"profile.quickstart": "💡 Démarrage rapide: choisissez un préréglage → cliquez Générer. Ou collez un id depuis HF Hub tendances → 📥 Charger → Générer.",
"compare.title": "🆚 Comparer côte à côte",
"compare.desc": "Pour techniciens: quand vous choisissez entre 2-3 modèles candidats pour un scénario de déploiement spécifique. Même recette, plusieurs modèles, verdicts côte à côte.",
"compare.recipe_label": "Recette:",
"compare.T_eval_label": "T_eval (contexte cible):",
"compare.models_title": "Modèles à comparer (jusqu'à 3)",
"compare.btn": "🚀 Comparer",
"compare.example": "💡 Essayez: collez 3 modèles populaires de 7-8B (Meta-Llama-3-8B, Mistral-7B-v0.1, Qwen/Qwen2.5-7B), recette X-2, T_eval=16000. Voyez lequel gère le mieux le contexte long.",
"ask.title": "❓ Votre question",
"ask.placeholder": "ex. Mistral-7B gérera-t-il 16K NIAH? Ou: J'ai 5,000$, quel modèle puis-je entraîner? Ou: GPU le moins cher pour servir Llama-70B à 100M tokens/jour?",
"ask.btn": "🚀 Analyser",
"ask.example_btn": "💡 Essayer un exemple",
"recipe.title": "📋 Recette",
"recipe.default": "— choisir une recette —",
"recipe.input_title": "🎯 Entrées",
"verdict.title": "📊 Verdict",
"chain.title": "🔍 Chaîne de calcul",
"chain.desc": "Chaque nombre ci-dessous est du Python déterministe. Cliquez sur une étape pour développer.",
"answer.title": "💬 Réponse en langage naturel",
"share.btn": "🔗 Copier le lien",
"share.copied": "✅ Copié dans le presse-papiers!",
"share.download": "💾 Télécharger JSON",
"share.submit": "📤 Soumettre au registry",
"share.import_title": "📂 Importer un résultat TAF partagé",
"share.import_desc": "Vous avez un fichier JSON de l'analyse TAF de quelqu'un ? Chargez-le ici pour voir le verdict + la chaîne localement. La même vue que si vous l'aviez exécuté vous-même.",
"share.import_btn": "📂 Charger JSON partagé",
"synthesis.system": "Vous êtes un assistant de diagnostic précis pour LLMs transformer. Étant donné des résultats de formules TAF pré-calculés, écrivez un résumé clair en français de 4-6 phrases. Citez le numéro de section (§X.Y) pour chaque nombre mentionné. Donnez toujours une recommandation concrète. N'INVENTEZ PAS de nombres.",
// INSPECTOR mode
"inspector.title": "🔍 Inspecteur d'Architecture",
"inspector.desc": "Collez le contenu brut de config.json. L'outil extrait les paramètres architecturaux et exécute le Profil complet à 5 recettes.",
"inspector.tip": "Collez n'importe quel config.json directement. L'outil le parse et exécute le Profil complet. Utile pour : modèles privés, configs en développement, modèles pas encore sur HuggingFace, ou comparer ce que ferait votre architecture custom.",
"inspector.quickstart": "💡 Cas d'usage : vous avez un modèle privé pas sur HF Hub, ou une config que vous concevez. Collez le JSON brut ci-dessous et obtenez un profil TAF complet.",
"inspector.placeholder": "{\n \"model_type\": \"llama\",\n \"rope_theta\": 500000,\n \"max_position_embeddings\": 8192,\n \"num_attention_heads\": 32,\n \"num_key_value_heads\": 8,\n \"hidden_size\": 4096,\n \"num_hidden_layers\": 32\n}",
"inspector.T_eval": "T_eval (votre contexte cible) :",
"inspector.btn": "🚀 Inspecter et profiler",
// WHAT-IF slider
"whatif.title": "🎚 What-if : faites glisser T_eval pour voir γ changer en direct",
"whatif.desc": "Recalcul pur JS (sans appel Pyodide). Montre γ_Padé et d_horizon géométriques pendant que vous glissez. Cliquez pour ré-exécuter la chaîne complète.",
"whatif.T_eval": "T_eval",
"whatif.gamma_pade": "γ_Padé",
"whatif.d_horizon": "d_horizon",
"whatif.l_niah": "Plafond L_NIAH",
"whatif.predicted": "Verdict géométrique prédit",
"whatif.rerun": "↻ Recalculer la chaîne complète à ce T_eval",
// COMMUNITY feed
"community.title": "🌐 Soumissions récentes de la communauté",
"community.desc": "Flux en direct du registre public. Cliquez sur n'importe quelle soumission pour voir l'analyse complète.",
"community.browse_all": "Voir tout →",
"community.loading": "Chargement...",
"community.no_repo": "Le repo du registre n'est pas encore créé. Une fois qu'il existe avec des soumissions, elles apparaîtront ici en direct.",
"community.no_submissions": "Aucune soumission. Soyez le premier — générez un Profil et cliquez 📤 Soumettre au registry.",
// FALSIFICATION dashboard
"falsification.title": "🔬 Prédictions du paper — statut de falsification",
"falsification.desc": "Le framework TAF repose sur des prédictions falsifiables (F1-F23). Chacune est empiriquement testée. Voici le statut en direct de chaque prédiction du paper.",
"falsification.summary": "{confirmed} confirmées · {partial} partielles · {refuted} réfutées · {untested} non testées (sur {total} prédictions au total)",
"falsification.col.id": "ID",
"falsification.col.claim": "Claim",
"falsification.col.status": "Statut",
"falsification.col.evidence": "Preuve",
"tafcard.title": "📇 TAF Card — profil complet du modèle",
"tafcard.recipes_title": "📋 Recettes — verdict par dimension",
"tafcard.recipes_count_label": "dimensions",
"tafcard.numbers_title": "🔢 Nombres clés (paper §26)",
"tafcard.fals_title": "🔬 État de falsification (F1-F23)",
"tafcard.fals_none": "Aucune falsification applicable.",
"tafcard.diag_title": "🔬 Diagnostics — nombres · contrôle γ · what-if",
"tafcard.verify_title": "✓ Vérification — Lean + Sage + falsification",
"tafcard.share_title": "📂 Provenance & partage",
"tafcard.whatif_title": "🎚️ Explorateur what-if",
"verdict.go": "GO",
"verdict.no": "NON",
"verdict.degraded": "DÉGRADÉ",
"compare.title_out": "🆚 Tableau comparatif",
"status.loading_pyodide": "⏳ Chargement du runtime Python (~10MB, première fois)...",
"status.loading_taf": "⏳ Chargement des formules TAF + recettes...",
"status.ready": "✅ Prêt. Choisissez un modèle et cliquez Profiler pour commencer.",
"status.computing": "🧮 Calcul de la chaîne TAF...",
"status.done": "✅ Terminé.",
"profile.hf_placeholder": "ex. meta-llama/Meta-Llama-3-8B ou Qwen/Qwen2.5-7B",
"compare.hf_placeholder": "ID modèle HF (ex. meta-llama/Meta-Llama-3-8B)",
"compare.slot1_placeholder": "ID modèle HF (ex. meta-llama/Meta-Llama-3-8B)",
"compare.slot2_placeholder": "ID modèle HF #2",
"compare.slot3_placeholder": "ID modèle HF #3 (optionnel)",
"compare.preset_default": "— ou préréglage —",
// Paramètres du formulaire
"param.theta": "θ (rope_theta)",
"param.theta.tip": "Fréquence de base RoPE de config.rope_theta. Plus haut = plus de capacité longue portée.",
"param.T_train": "T_train",
"param.T_train.tip": "Contexte max d'entraînement. De max_position_embeddings. Au-delà c'est de l'extrapolation.",
"param.T_eval": "T_eval (votre cible)",
"param.T_eval.tip": "Votre contexte d'inférence cible. La question clé : le modèle se comportera-t-il bien à CETTE longueur ?",
"param.n_attn": "n_attention_heads",
"param.n_attn.tip": "Nombre d'attention heads par couche. De num_attention_heads.",
"param.n_kv": "n_kv_heads",
"param.n_kv.tip": "KV heads. Si < n_attention_heads → GQA (Grouped Query Attention). Réduit la mémoire KV mais pousse γ vers Hagedorn.",
"param.d_head": "head_dim",
"param.d_head.tip": "Dimension par head. Typique 64, 96, 128. De head_dim ou hidden_size / num_attention_heads.",
"param.n_layers": "n_layers",
"param.n_layers.tip": "Nombre de blocs transformer. De num_hidden_layers.",
"param.n_params": "n_params (ex. 8e9)",
"param.n_params.tip": "Nombre total de paramètres. Seuil ~400M pour l'émergence d'induction heads. Affecte la mémoire KV et les recettes de budget.",
"param.has_swa": "A SWA ?",
"param.has_swa.tip": "Sliding Window Attention. true pour Mistral, gemma-2, phi-3. L'audit de calibration v0.5.3 a désactivé la correction historique δ_SWA (ajustement n=1).",
"common.yes": "Oui",
"common.no": "Non",
// Tooltips des modes
"modes.tip": "Sept façons d'utiliser l'outil.
📇 Profil: collez un id → les 8 recettes à la fois = TAF Card.
🆚 Comparer: 2-3 modèles côte à côte sur une recette.
🔍 Inspecter config: collez config.json brut → Profil complet.
💬 Question: question libre, le LLM du navigateur choisit la recette.
📋 Recette: sélection manuelle avec contrôle total du formulaire.
🩺 Diagnostic CLI: génère commande Python pour mesurer γ localement.
📊 Diagramme de phase: panel de 23 modèles dans le plan (log θ, γ).",
"profile.tip": "Diagnostic complet en un clic. Collez n'importe quel id de modèle HF (ou choisissez préréglage). L'outil exécute les 5 recettes (contexte long, compression KV, custom vs API, budget, hardware) et produit une TAF Card unique avec verdict par dimension + nombres clés + classification architecturale.
Cas d'usage: « J'évalue Qwen2.5-32B pour la production — quel est son profil complet de viabilité ? » → collez id → Profiler → fait.",
"compare.tip": "Même recette, plusieurs modèles. Choisissez 2-3 modèles candidats et une recette. Voyez les verdicts dans un seul tableau comparatif.
Cas d'usage: « J'ai besoin de récupération longue contexte à 16K — quel est le meilleur : Llama-3-8B, Mistral-7B ou Qwen-7B ? » → choisissez 3 + X-2 + 16K → voyez le gagnant.",
// Modal d'aide
"help.title": "📘 TAF Agent — Manuel d'utilisation",
"help.what.title": "Que fait-il ?",
"help.what.body": "Prédit la viabilité pratique de tout LLM transformer avant de dépenser du GPU/€. Répond à des questions comme « ce modèle fonctionnera-t-il à L=32K ? » ou « dois-je entraîner sur mesure ou utiliser une API ? » via des formules Python déterministes (TAF — Thermodynamic Attention Framework).",
"help.modes.title": "Comment l'utiliser — 7 modes",
"help.modes.profile": "📇 Profiler: collez id de modèle → toutes les recettes à la fois = TAF Card. Meilleur point de départ.",
"help.modes.compare": "🆚 Comparer: 2-3 modèles côte à côte sur la même recette. Mieux pour choisir entre candidats.",
"help.modes.inspector": "🔍 Inspecter config: collez config.json brut → l'outil le parse et lance le Profil complet. Pour modèles privés, configs en développement, ou modèles pas encore sur HF Hub.",
"help.modes.ask": "💬 Question libre: question en langage naturel, le LLM du navigateur choisit la recette. Mieux pour exploration casuelle.",
"help.modes.recipe": "📋 Recette + formulaire: sélection manuelle, contrôle total des paramètres. Mieux quand vous voulez un contrôle exact.",
"help.modes.diagnose": "🩺 Diagnostic CLI: génère commande Python pour mesurer γ sur votre machine locale (transformers + numpy). Rapide ≈5 min CPU; complet ≈20–60 min GPU. JSON résultat ré-uploadable via Inspect.",
"help.modes.phase": "📊 Diagramme de phase: nuage de 23 modèles du panel dans le plan (log θ, γ). Ligne Hagedorn γ=1 sépare Phase A de Phase B. Cliquer un point pour charger ce modèle dans le formulaire Recette.",
"help.recipes.title": "Les 8 recettes disponibles",
"help.recipe.x1.title": "X-1 Entraînement custom vs API — compare le coût d'entraîner votre propre modèle vs payer l'accès API.",
"help.recipe.x1.example": "Essayez: « Dois-je entraîner un 8B custom ou utiliser GPT-4o pour 50M tokens/mois ? »
Réponses: OUI (custom) / NON (API) avec mois pour break-even.",
"help.recipe.x2.title": "X-2 Viabilité contexte long — prédit si un modèle sert une longueur cible de manière fiable.",
"help.recipe.x2.example": "Essayez: « Meta-Llama-3-8B gérera-t-il 32000 tokens pour récupération ? »
Chaîne: γ_Padé → décomposition → d_horizon → plafond NIAH → hallucination → mémoire KV.
Verdict: OUI / DÉGRADÉ / NON avec mitigation si nécessaire.",
"help.recipe.x3.title": "X-3 Pre-flight budget — étant donné un budget $, quel modèle est faisable à entraîner ?",
"help.recipe.x3.example": "Essayez: « J'ai $5000, quel modèle puis-je entraîner ? »
Réponse: GO / TINY-MODEL / MEMORY-LIMITED avec N (params) et D (tokens) concrets.",
"help.recipe.x5.title": "X-5 Sélection hardware — quel GPU utiliser pour servir au throughput cible ?",
"help.recipe.x5.example": "Essayez: « Hardware le moins cher pour servir Llama-3-8B à 10M tokens/jour »
Réponse: meilleur GPU + $/Mtok + capacité vs cible.",
"help.recipe.x19.title": "X-19 Décision compression KV — utiliser soft decay, hard cutoff, ou méthodes de littérature ?",
"help.recipe.x21.title": "X-21 Diagnostic Pureté Imprint — prédit γ sur tokens RANDOM via ν=−1/(2π); à quel point la prédiction RoPE du modèle est-elle propre ?",
"help.recipe.x22.title": "X-22 Invariant Compute-Context — γ × log(N²·D) est-il dans la bande 51.2 ± 16.8 ? Détecte anomalies de scaling/training.",
"help.recipe.x23.title": "X-23 Détecteur Phase IH — pré- ou post-induction-head ? Probe peu coûteux via sign(γ_text − γ_random).",
"help.recipe.x19.example": "Essayez: « Comment compresser le cache KV pour Qwen2.5-7B à 32K ? »
Réponse: USE SOFT DECAY / USE D_f CUTOFF / USE LITERATURE METHODS / USE HARD T_train.",
"help.recipe.x21.example": "Essayez: « Quelle est la pureté de la prédiction RoPE sur Llama-3-8B ? »
Réponse: γ_random prédit + diagnostic (CLEAN / OVER-IMPRINTED / UNDER-IMPRINTED).",
"help.recipe.x22.example": "Essayez: « Mistral-7B entre-t-il dans l'invariant compute-context ? »
Réponse: K = γ·log(N²·D), z-score, IN-BAND ou OUTLIER.",
"help.recipe.x23.example": "Essayez: « Qwen2.5-7B est-il post-induction-head ? »
Réponse: CONFIRMED PRE-IH / CONFIRMED POST-IH / ANOMALY.",
"help.section.v04": "Nouveautés v0.4 (résultats session 29, 2026-04-28) : trois recettes de diagnostic dérivées de l'analyse panel cross-model (n=22 LLMs).",
"help.divider.v04_s29": "— v0.4 (résultats session 29) —",
"footer.tech_stack": "Calcul : Pyodide · Synthèse : WebLLM (Qwen2.5-0.5B local) · Hébergement : GitHub Pages · Coût : 0 $",
"help.v04.imprint": "Pente d'imprint apprise ν = −1/(2π) : la période de rotation RoPE 2π entraîne un biais positionnel dans les poids, proportionnel à log(N_params). Même les tokens aléatoires montrent ce scaling. ν est DÉRIVÉ — non ajusté (erreur empirique 0,3 %).",
"help.v04.invariant": "Invariant Chinchilla-attention K : γ × log(N²·D) ≈ 51.2 ± 16.8 (CV=0.329). Connecte le scaling de compute et l'exposant d'attention en un seul nombre sans dimension.",
"help.v04.ih_probe": "Δγ comme probe IH : sign(γ_text − γ_random) > 0 ⟺ post-induction-head. Moins coûteux que de lancer un benchmark in-context-learning.",
"help.v04.constants": "γ-cluster sur constantes célèbres (intriguant, n=4) : CodeLlama-13b γ=0.382 ≈ 1−1/φ (conjugué doré, err 0,0003) ; pythia-1.4b γ=0.705 ≈ 1/√2 ; Llama-2-7b γ=0.287 ≈ 1−1/√2 ; Mistral-Nemo γ=0.428 ≈ log_10(e). Caveat : peut être coïncidence.",
"help.param.theta": "θ (rope_theta): fréquence de base RoPE. Plus haut = plus de capacité longue portée. Typique: 10000 (anciens), 500000 (Llama-3), 1000000 (Qwen2.5).",
"help.param.T_train": "T_train: contexte max vu par le modèle pendant l'entraînement. De max_position_embeddings.",
"help.param.T_eval": "T_eval: votre longueur de contexte cible en inférence. Le bouton clé.",
"help.param.gqa": "n_kv_heads < n_attention_heads: le modèle utilise GQA (Grouped Query Attention). Réduit la mémoire KV mais pousse γ vers Hagedorn.",
"help.param.swa": "has_SWA: le modèle utilise Sliding Window Attention (Mistral, gemma-2).",
"help.param.nparams": "n_params: nombre total de paramètres. Seuil ~400M pour l'émergence des induction heads.",
"help.add_models.title": "Ajouter de nouveaux modèles (3 façons)",
"help.add_models.preset": "Liste de préréglages: 11 modèles populaires curés. Sélectionnez dans le dropdown.",
"help.add_models.hf": "HF Hub fetch: collez n'importe quel id (ex. Qwen/Qwen2.5-32B-Instruct), cliquez 📥 Charger. Le navigateur télécharge config.json directement de HuggingFace, remplit le formulaire. Fonctionne avec tout modèle public.",
"help.add_models.manual": "Manuel: remplissez les champs directement avec les valeurs de la model card.",
"help.audit.title": "La chaîne auditable",
"help.audit.body": "Chaque résultat montre la Chaîne de Calcul complète — chaque étape de formule avec ses entrées, sortie et interprétation. Cliquez sur n'importe quelle étape pour développer. Les références de section (§26.1, §19.1, etc.) renvoient au paper pour la dérivation.",
"help.synthesis.title": "La réponse en langage naturel",
"help.synthesis.body": "Après exécution de la chaîne déterministe, un LLM dans le navigateur (Qwen2.5-0.5B, ~350MB cachés après premier chargement) synthétise un résumé en langage naturel. Les nombres ci-dessus sont toujours corrects (Python déterministe) ; la synthèse est générée par LLM — vérifiez contre la chaîne en cas de doute.",
"help.params.title": "Paramètres communs expliqués",
"help.verdicts.title": "Quoi regarder dans les verdicts",
"help.verdict.yes": "OUI / GO — procédez avec confiance ; les nombres soutiennent le choix.",
"help.verdict.deg": "DÉGRADÉ / TINY-MODEL — fonctionne avec caveats ; lisez l'action.",
"help.verdict.no": "NON / MEMORY-LIMITED — ne procédez pas tel quel ; mitigation fournie.",
"help.privacy.title": "Confidentialité",
"help.privacy.body": "Tout s'exécute dans votre navigateur. Pas de télémétrie, pas d'analytique, pas de données envoyées ailleurs. Même le modèle LLM s'exécute localement via WebGPU/WebAssembly. Vos model_ids et questions ne quittent jamais cette page.",
"help.source.title": "Code source et paper",
"help.source.body": "Code : github.com/karlesmarin/tafagent
Paper : Marin 2026 — Predicting How Transformers Attend (Zenodo ; arXiv à venir)
Dataset : taf-attention-decay — 58 mesures γ sur 32 modèles (CC-BY-4.0)",
"footer.text": "© 2026 Carles Marin · Apache-2.0 · recherche indépendante · l'outil qui ferme la boucle du paper.",
},
// ────────────────────────────────────────────────────────────────────────
// ZH — 中文
// ────────────────────────────────────────────────────────────────────────
zh: {
// §33 v0.4 (sesion 31, 2026-04-30) — 新诊断功能
"v04.title": "🆕 v0.4 — 新诊断 (会话 31)",
"v04.section.intro": "会话 31 (2026-04-30) 从公式 cross-of-crosses 游戏 + 苏格拉底质询中得出的四个新诊断函数。在 taf_browser.py §33 中可用。",
"v04.arch.label": "架构集中度",
"v04.arch.desc": "γ_text ≈ γ_Padé − 0.012·n_kv。跨面板相关性定律(R²=0.30)。警告:不是逐模型预测器。",
"v04.pdi.label": "PDI — Padé 偏差指数",
"v04.pdi.desc": "PDI = d_horizon_obs/T_eval。交通灯:绿色(≈1)、橙色(>>1)、黄色(<<1)、红色(B 阶段负值)。",
"v04.4bit.label": "4 位精度移位预测器",
"v04.4bit.desc": "MHA: R²(bf16)<0.9 → γ 上升;R²>0.99 → γ 下降。GQA: 精度稳健。",
"v04.crit.label": "临界指数捆绑",
"v04.crit.desc": "ν_c、β_c、η_c (=γ−1, 已修正)、α_C、γ_susc,AM-GM 最小值在 γ=1−1/√2≈0.293。",
// §34 v0.5 (会话 32, 2026-05-01) — 机器验证的代数一致性
"v05.title": "🔬 v0.5 — 机器验证一致性 (会话 32)",
"v05.section.intro": "Sage Groebner basis + Lean Mathlib4 双工具验证 TAF 临界指数的15 个代数恒等式。首个具有形式化机器证明支持的 transformer-attention 框架。",
"v05.verify.label": "代数一致性检查",
"v05.verify.desc": "给定测得的 γ,验证 12 个 D-SAGE 恒等式(D-SAGE-1:2η²+η·γ_χ+1=0、β·χ=−1、α+χ=2 等)。全部通过 = 框架完整。失败表明 bf16 异常值 / 量化伪影。",
"v05.dsage1.label": "D-SAGE-1 (★★ 核心)",
"v05.dsage1.desc": "二次恒等式 2η² + η·γ_χ + 1 = 0(Sage Groebner 发现, Lean 验证)。取代错误的 '三重闭合' 主张。从代数上反驳 paper 1 的 η=2γ。",
"v05.erratum.label": "Paper 1 勘误 — η 修正",
"v05.erratum.desc": "Paper 1 原本声明 η = 2γ。Sage Groebner + Lean Mathlib4 证明此为失败(残差 (-4γ³+5γ+1)/(1-γ) > 0 ∀γ ∈ A 相)。正确值:η = γ−1,满足 D-SAGE-1。",
"v05.repro.label": "可重现性",
"v05.repro.desc": "全部 15 个定理在 Lean Mathlib4 中机器证明(build 成功 1973 jobs)。Sage 脚本:analysis/sage_recursive_sweep_2026-04-30.sage。Lean 代码:lean_taf/taf/Taf/Identities.lean。",
// v0.5.1 — TAF Card consistency check button
"v05.consistency.title": "🔬 代数一致性检查 (Sage + Lean v0.5)",
"v05.consistency.desc": "验证 TAF 临界指数的 12 个 D-SAGE 代数恒等式(Sage Groebner basis + Lean Mathlib4 机器证明)。通过 = 框架完整。失败 = bf16 异常值 / 量化伪影。",
"v05.consistency.btn": "🔬 验证代数一致性",
// v0.5.2 — Anti-Ising universality class badge
"v05.antiising.badge": "🧲 反 Ising 类 (β=γ−1<0,机器验证)",
// v0.5.2 — 每个恒等式的工具提示(通俗解释)
"v05.tooltip.D_SAGE_1": "二次代数恒等式,连接异常维度 η 和磁化率 γ_χ。Sage Groebner basis 发现的核心恒等式(机器证明)。取代了之前关于三重闭合的错误声明。",
"v05.tooltip.D_SAGE_2": "在 A 相中,β = γ−1 为负(反 Ising)。乘以 χ = 1/(1−γ) 恰好等于 −1。TAF 负 β 体制的标志。",
"v05.tooltip.D_SAGE_4": "比热指数 α 和磁化率 χ 在 TAF 中精确加和为 2。Josephson 超标度的代数推论。",
"v05.tooltip.D_SAGE_5": "线性恒等式:α + γ_χ = 2(2−γ)。意味着当 γ 接近 1(Hagedorn)时,总和接近 2;在 γ=0 时为 4。",
"v05.tooltip.D_SAGE_6": "序参量指数乘以磁化率指数等于 γ 的特定二次式。因式分解的代数关系。",
"v05.tooltip.Rushbrooke_tautology": "标准 Rushbrooke 超标度 2β + γ_χ = ν·d 在 d=1。在 TAF 中这是一个重言式 — γ_χ 的定义就是为了使其成立。Sage Groebner basis 确认。",
"v05.tooltip.Josephson_tautology": "标准 Josephson 超标度 2 − α = ν·d 在 d=1。在 TAF 中这是一个重言式 — α 的定义就是为了使其成立。",
"v05.tooltip.Fisher_independent": "Fisher 关系 γ_χ = (2−η)·ν。在 TAF 中是独立的(不作为恒等式闭合,与三重闭合声明相反)。残差为 γ(2γ−3)/(1−γ)。",
"v05.tooltip.eta_2gamma_REFUTED": "Paper 1 声称 η=2γ。这个恒等式驳斥了它:残差在整个 A 相中为正。Lean Mathlib4 的机器证明驳斥。",
"v05.tooltip.D_14_nu_imprint": "学习到的印记斜率 ν = −1/(2π) 乘以 2π 得 −1。来自 paper 1 的简单维度检查。",
"v05.tooltip.D_SAGE_7": "中心电荷 c=3 乘以 |ν_imprint| 乘以 2π 得 3。连接 CFT 和训练印记的维度闭合。",
"v05.tooltip.nu_beta_id": "关联长度指数 ν 乘以序参量指数 β 在 A 相中得 −1。D-SAGE-2 的变体。",
"v053.calibration.title": "🔬 v0.5.3 — 校准审计 (2026-05-02)",
"v053.calibration.note": "SWA 修正已禁用 — 原 δ_SWA = -0.21 基于 n=1 模型拟合(数据不足;唯一案例的均值为 +0.355)。post_IH 修正标记为探索性 — 重审中组均值 ≈ 0(n=22 面板)未能复现 OLS 拟合。GQA 修正可复现(面板 +0.115 vs 硬编码 +0.11)。D_f 公式修正 Phase B (γ>1) — 使用离散累积和代替连续近似。LLaMA-3、Mistral、Gemma 现在报告正确的压缩值。",
"v053.release.banner": "🔧 v0.5.3 — 审计驱动的修复:KV 压缩 D_f 现使用离散和(适用于所有 γ);δ_SWA 禁用(n=1 校准);论文 §5.2 C_V 系数勘误 (1/4 → 1/12)。",
// §35 v0.6 — γ 预测 vs 观测 诊断
"gamma_check.title": "🔍 γ 预测 vs 观测",
"gamma_check.desc": "输入你经验测量的 γ。工具自动检测体制:欺诈 (θ 虚高) / 压缩 / 超 Padé / SWA-随机 / 正常。",
"gamma_check.gobs_label": "γ_观测",
"gamma_check.gobs_tip": "从模型注意力分数经验测量的 γ。使用 Diagnose CLI 从真实权重获取。",
"gamma_check.random_label": "随机语料?",
"gamma_check.random_tip": "若 γ_观测在随机/无结构 token 上测得请勾选。区分 SWA 签名 (γ_obs > 1) 与异常。",
"gamma_check.regime": "体制",
"gamma_check.regime.normal": "正常",
"gamma_check.regime.fraud": "欺诈 (θ 虚高)",
"gamma_check.regime.compressed": "上下文压缩",
"gamma_check.regime.overpade": "超 Padé",
"gamma_check.regime.swa": "SWA 签名 (随机语料)",
"gamma_check.regime.unknown": "未知",
"gamma_check.regime.normal.desc": "η ∈ [0.85, 1.15]:模型完全利用名义上下文,无异常。",
"gamma_check.regime.fraud.desc": "η < 0.01:名义 θ 虚高。模型表现如同 θ 远小于宣称值。可能是 YaRN/营销虚标,无真实上下文扩展。",
"gamma_check.regime.compressed.desc":"η ∈ [0.01, 0.5):上下文压缩 (模型注意距离比名义 θ 预测更短)。常见于 instruction-tuned / RLHF 模型。",
"gamma_check.regime.overpade.desc": "η > 1.5:模型注意距离超过 Padé 预测。可能是 Lerch 修正体制或欠训练早期 checkpoint。",
"gamma_check.regime.swa.desc": "随机语料上 γ_obs > 1.05 = 滑动窗口注意力签名 (Mistral / Gemma 系列)。",
"gamma_check.regime.unknown.desc": "输入超范围或 γ_obs > 1 但未标记随机语料。请核验测量。",
"gamma_check.glossary.title": "ⓘ 词汇表 — 变量含义",
"gamma_check.glossary.gamma_pade": "γ_Padé:闭式预测 (2−z)/(2+z), z = T√2/θ。论文 §sec:gamma_decomposition。",
"gamma_check.glossary.gamma_obs": "γ_观测:从注意力分数经验测得 (在真实权重上运行 Diagnose CLI)。",
"gamma_check.glossary.theta_eff_obs":"θ_eff (观测):由 γ_obs 反演 T√2 / (1 − γ_obs)。测量隐含的有效 θ。",
"gamma_check.glossary.theta_eff_pade":"θ_eff (Padé):θ + T/√2。闭式公式预测的有效 θ。",
"gamma_check.glossary.efficiency": "η:θ_eff_obs / θ_eff_Padé 比值。≈1 = 正常 · <0.01 = 欺诈 · <0.5 = 压缩 · >1.5 = 超 Padé。",
"gamma_check.glossary.delta_h": "ΔH_Cardy:log(θ_eff_obs / θ_nominal)。Cardy 熵变。负值 = 压缩熵。~0 = 与名义匹配。",
"gamma_check.glossary.regime": "体制:基于 η + γ_obs + 随机语料标志的自动分类器。",
// §36 v0.6 — 内联 ⓘ 图标提示
"tooltip.gamma_pade": "γ_Padé(T_eval):闭式预测 (2−z)/(2+z), z = T√2/θ。论文 §sec:gamma_decomposition。",
"tooltip.gamma_decomposed": "γ_分解:基于完整架构分解的 γ。Padé 基线 + GQA 偏移 + post-IH 偏移 (校准审计已复制子集)。",
"tooltip.d_horizon": "d_horizon:有效注意力视野。超过此位置分数低于噪声底 (论文 §26)。",
"tooltip.L_NIAH": "L_NIAH 上限:当前 d_horizon 下针-在-干草堆检索可靠性的预测上限。",
"tooltip.chi": "χ 易感性:χ = 1/(1−γ)。在 Hagedorn 线 γ=1 处发散。",
"tooltip.kv_memory": "KV 内存 @ T_eval (BF16):每请求 KV 缓存 = 2 · n_layers · n_kv_heads · d_head · T_eval 字节。",
"tooltip.theta_eff_obs": "θ_eff (观测):由 γ_观测 隐含的有效 θ:T√2 / (1 − γ_obs)。",
"tooltip.theta_eff_pade": "θ_eff (Padé):闭式公式预测的有效 θ:θ + T/√2。",
"tooltip.efficiency": "η = θ_eff_obs / θ_eff_Padé:效率比。≈1 = 正常 · <0.01 = 欺诈 · <0.5 = 压缩 · >1.5 = 超 Padé。",
"tooltip.delta_h_cardy": "ΔH_Cardy:log(θ_eff_obs / θ_nominal)。Cardy 熵变。负值 = 压缩熵。~0 = 与名义匹配。",
"tooltip.verdict_aggregate": "判定:所有配方中最差。✅ 通过 = 全绿 · ⚠ 降级 = ≥1 黄 · ❌ 否 = ≥1 红。",
"tooltip.verdict_breakdown": "各配方分解:每个配方测试一个独立的决策轴 (长上下文 · 预算 · 硬件 · 自训 vs API · KV 压缩)。X-1 上的 ❌ 表示「按你的量级用 API」而非「模型失败」——展开 Recipes 节查看各轴上下文。",
"tooltip.gamma_pill": "γ 头条:γ_分解 (或 γ_Padé 回退)。范围 (0,1) = 相位 A (反伊辛)。γ ≥ 1 = Hagedorn / 相位 B。",
"tooltip.anti_ising": "反伊辛类:相位 A → β = γ−1 < 0。机器证明 (Sage + Lean Mathlib4)。见 §35 v0.5。",
// §37 v0.6 — Lean+Mathlib 定理表
"lean.table.title": "📑 Lean+Mathlib 定理表",
"lean.table.desc": "下方每一项都已机器证明对 Lean 4 + Mathlib4。点击任意 L# 链接跳转到 GitHub 源码行。按主题分组——点击标题展开。",
"lean.table.theorem": "定理",
"lean.table.claim": "陈述",
"lean.table.tactic": "策略",
"lean.table.source": "出处",
"lean.table.lean": "Lean",
"lean.findings.title": "🔎 实质性发现",
"lean.findings.detected_by": "检测于",
"lean.findings.fixed_by": "修正于",
"lean.findings.recommendation":"建议",
"lean.meta.repo": "仓库",
"lean.meta.build": "构建",
"lean.meta.theorems": "定理",
"lean.meta.verified": "已验证",
"lean.meta.rejected": "已拒绝",
"lean.meta.sorry": "sorry",
"lean.meta.findings": "项实质性发现",
"lean.manifest.loading": "正在加载 Lean 清单…",
"lean.manifest.error": "Lean 清单不可用",
// 帮助弹窗 — v0.6 节
"help.v06.title": "🆕 v0.6 — γ 预测-vs-观测 + Cardy ΔH + Lean 徽章",
"help.v06.intro": "v0.6 (2026-05-06):三个新诊断位于 TAF 卡的 🔬 诊断 下。全部在浏览器运行;γ_观测来自在真实权重上运行 Diagnose CLI。",
"help.v06.layout.title": "TAF 卡布局 (v0.6 新增)",
"help.v06.layout.body": "点击 🚀 生成完整画像 后,卡片展示:顶部一条 hero 条 (架构类 + 元信息 + 3 个 pill:聚合判定 ✅/⚠/❌、γ 头条、🧲 反伊辛若处于相位 A) 和四个 可展开节:📋 配方 (默认展开 — 各维度判定)、🔬 诊断 (关键数字、γ 预测 vs 观测、what-if 浏览器)、✓ 验证 (Sage+Lean 代数一致性、可证伪 F1-F23)、📂 来源与分享 (校准审计 + JSON 下载 / 链接 / 注册表提交)。点击任意标题展开。每个变量都有内联 ⓘ 提示。",
"help.v06.gamma_check.title": "γ 预测 vs 观测",
"help.v06.gamma_check.body": "输入经验测量的 γ,工具计算 η = θ_eff_obs / θ_eff_Padé 并分类到 5 种体制之一:",
"help.v06.case.normal": "正常 (η ∈ [0.85, 1.15]) — 模型完整使用名义上下文。用例:在采用前验证新发布。",
"help.v06.case.fraud": "欺诈 (η < 0.01) — 名义 θ 虚高;模型表现如同 θ ≪ 宣称值。用例:检测 YaRN/营销虚标 (CodeLlama / Mistral-Nemo 模式)。",
"help.v06.case.compressed": "压缩 (η < 0.5) — 上下文压缩;模型注意距离比名义 θ 短。用例:识别 RLHF/指令调优引起的压缩 (LLaMA-2 模式)。",
"help.v06.case.overpade": "超 Padé (η > 1.5) — 模型注意距离超过 Padé 预测。用例:识别 Lerch 修正体制或欠训练早期 checkpoint (pythia-1b 模式)。",
"help.v06.case.swa": "SWA 随机语料 (γ_obs > 1.05 且 随机语料=是) — 滑动窗口注意力签名。用例:在随机 token 上确认 Mistral / Gemma SWA。",
"help.v06.cardy.title": "Cardy ΔH 诊断",
"help.v06.cardy.body": "ΔH_Cardy = log(θ_eff_obs / θ_nominal)。观测有效 θ 与名义 θ 之间的熵变。强负值 = 压缩熵;接近零 = 与名义匹配。在边界情况下补充 η。",
"help.v06.lean.title": "Lean + Mathlib 验证徽章",
"help.v06.lean.body": "TAF 恒等式在 Lean Mathlib4 中形式化机器证明:37 个定理分布于 7 组(Padé、RG 流、Cayley、D-SAGE、审计发现、CV 勘误、杂项)+ 1 项实质性发现(V 导数 2 倍因子,定理 V_derivative_ne_RG_beta)。源:github.com/karlesmarin/lean-taf(commit 25c77fd)。本地重新验证:git clone --depth=1 https://github.com/karlesmarin/lean-taf && cd lean-taf && lake exe cache get && lake env lean Taf/Identities.lean。Hero 中的 🧲 反伊辛 pill 与验证手风琴链接到具体源码行。",
"help.v06.glossary.title": "变量词汇表 (亦嵌入 TAF 卡)",
"help.v06.glossary.body": "TAF 卡中每个变量都有内联 ⓘ 提示。完整列表:γ、γ_Padé、γ_分解、γ_观测、θ、θ_eff_obs、θ_eff_Padé、η、ΔH_Cardy、χ、d_horizon、L_NIAH、KV 内存、体制。鼠标悬停任意 ⓘ 查看定义 + 论文章节。",
"hero.title": "🔬 TAF Agent",
"hero.tagline": "在花费 GPU/$ 之前,测试任意 Transformer LLM。",
"hero.subtitle": "所有计算在您的浏览器本地运行。免费。无限制。可审计。",
"hero.help": "📘 帮助和示例",
"hero.about": "由独立研究员构建。开源。不隶属于任何模型供应商。",
"modes.title": "🎯 模式",
"modes.profile": "📇 模型画像",
"modes.compare": "🆚 比较模型",
"modes.inspector": "🔍 检查 config",
"modes.ask": "💬 自由提问",
"modes.recipe": "📋 选择配方",
"modes.diagnose": "🩺 诊断 CLI",
"diagnose.title": "🩺 诊断 CLI 命令生成器",
"diagnose.tip": "浏览器从 config 预测 γ;CLI 在真实权重上测量 γ_obs。此生成器产生在本地运行的精确命令。",
"diagnose.desc": "选择选项并将生成的命令复制粘贴到本地机器(Python + transformers + numpy)。快速模式 ≈5 分钟 CPU;完整 ≈20–60 分钟 GPU。",
"diagnose.model_label": "HF 模型 id:",
"diagnose.theta_label": "θ(留空自动):",
"diagnose.n_label": "上下文 N:",
"diagnose.options_label": "选项:",
"diagnose.opt_fast": "--fast(CPU,≈5 分钟)",
"diagnose.opt_cpu": "--cpu(强制 CPU)",
"diagnose.opt_4bit": "--load_in_4bit(≥7B 模型)",
"diagnose.local_label": "--local 路径(可选):",
"diagnose.build_btn": "📋 生成命令",
"diagnose.cmd_title": "生成的命令:",
"diagnose.copy_btn": "📋 复制到剪贴板",
"diagnose.next_steps": "下一步: (1) git clone https://github.com/karlesmarin/tafagent (2) cd tafagent && pip install torch transformers numpy (3) 运行命令 (4) JSON 结果 → 通过 Inspect 模式上传以进行完整 TAF 分析。",
"modes.phase": "📊 相图",
"phase.title": "📊 相图(γ × θ)",
"phase.tip": "每个点是论文经验数据集中的一个模型。x 轴: log θ; y 轴: γ。Hagedorn 线 γ=1 分隔 A 相和 B 相。悬停查看详情,点击加载到表单。",
"phase.desc": "数据集中 23 个模型;Padé 曲线在 T=2000。",
"modes.desc": "最快开始: 粘贴任意 HuggingFace 模型 id (例如 meta-llama/Meta-Llama-3-8B),点击 画像。秒内看到所有 5 个配方的评分。",
"profile.title": "📇 模型画像",
"profile.desc": "面向技术人员: 当您需要候选模型的完整可行性快照时。一键运行所有 5 个配方,生成统一的 TAF 卡。",
"profile.preset_label": "预设:",
"profile.preset_default": "— 或从列表中选择 —",
"profile.hf_label": "HF 模型 id:",
"profile.fetch_btn": "📥 获取",
"profile.btn": "🚀 生成完整画像",
"profile.quickstart": "💡 快速开始: 选择任意预设 → 点击生成。或从 HF Hub 热门 粘贴一个 id → 📥 获取 → 生成。",
"compare.title": "🆚 模型并排比较",
"compare.desc": "面向技术人员: 当为特定部署场景在 2-3 个候选模型之间选择时。同一配方,多个模型,并排判定。",
"compare.recipe_label": "配方:",
"compare.T_eval_label": "T_eval (目标上下文):",
"compare.models_title": "要比较的模型(最多 3 个)",
"compare.btn": "🚀 比较",
"compare.example": "💡 尝试: 粘贴 3 个流行的 7-8B 模型 (Meta-Llama-3-8B, Mistral-7B-v0.1, Qwen/Qwen2.5-7B),配方 X-2, T_eval=16000。查看哪个最适合长上下文。",
"ask.title": "❓ 您的问题",
"ask.placeholder": "例如: Mistral-7B 能处理 16K NIAH 检索吗?或: 我有 5,000 美元,可以训练什么模型?或: 以每天 1 亿 tokens 提供 Llama-70B 的最便宜 GPU?",
"ask.btn": "🚀 分析",
"ask.example_btn": "💡 尝试示例",
"recipe.title": "📋 配方",
"recipe.default": "— 选择一个配方 —",
"recipe.input_title": "🎯 输入",
"verdict.title": "📊 判定",
"chain.title": "🔍 计算链",
"chain.desc": "下面每个数字都是确定性 Python。点击步骤展开。",
"answer.title": "💬 自然语言回答",
"share.btn": "🔗 复制分享链接",
"share.copied": "✅ 已复制到剪贴板!",
"share.download": "💾 下载 JSON",
"share.submit": "📤 提交到 registry",
"share.import_title": "📂 导入共享的 TAF 结果",
"share.import_desc": "有他人 TAF 分析的 JSON 文件? 在这里加载以本地查看判定 + 链。与您自己运行的视图相同。",
"share.import_btn": "📂 加载共享的 JSON",
"synthesis.system": "您是 transformer LLM 的精确诊断助手。给定预先计算的 TAF 公式结果,用 4-6 句中文写出清晰的摘要。为每个提到的数字引用章节号 (§X.Y)。始终给出具体建议。不要编造数字。",
// INSPECTOR 模式
"inspector.title": "🔍 架构检查器",
"inspector.desc": "粘贴 config.json 的原始内容。工具提取架构参数并运行完整的 5 配方 Profile。",
"inspector.tip": "直接粘贴任意 config.json。工具解析它并运行完整 Profile。适用于:私有模型、开发中的 configs、尚未在 HuggingFace 的模型,或比较自定义架构的行为。",
"inspector.quickstart": "💡 用例:您有未在 HF Hub 上的私有模型,或正在设计的 config。粘贴下面的原始 JSON,获取完整 TAF 画像。",
"inspector.placeholder": "{\n \"model_type\": \"llama\",\n \"rope_theta\": 500000,\n \"max_position_embeddings\": 8192,\n \"num_attention_heads\": 32,\n \"num_key_value_heads\": 8,\n \"hidden_size\": 4096,\n \"num_hidden_layers\": 32\n}",
"inspector.T_eval": "T_eval (您的目标上下文):",
"inspector.btn": "🚀 检查并画像",
// WHAT-IF 滑块
"whatif.title": "🎚 What-if: 拖动 T_eval 实时查看 γ 变化",
"whatif.desc": "纯 JS 重新计算 (不调用 Pyodide)。滑动时显示几何 γ_Padé 和 d_horizon。点击按钮重新运行完整链。",
"whatif.T_eval": "T_eval",
"whatif.gamma_pade": "γ_Padé",
"whatif.d_horizon": "d_horizon",
"whatif.l_niah": "L_NIAH 上限",
"whatif.predicted": "预测几何判定",
"whatif.rerun": "↻ 在此 T_eval 重新计算完整链",
// COMMUNITY 反馈
"community.title": "🌐 社区最近提交",
"community.desc": "公共 registry 的实时反馈。点击任意提交查看完整分析。",
"community.browse_all": "浏览全部 →",
"community.loading": "加载中...",
"community.no_repo": "Registry 仓库尚未创建。一旦它存在并有提交,它们将在此处实时显示。",
"community.no_submissions": "暂无提交。成为第一个 — 生成一个 Profile 并点击 📤 提交到 registry。",
// FALSIFICATION 仪表板
"falsification.title": "🔬 论文预测 — 可证伪状态",
"falsification.desc": "TAF 框架基于可证伪的预测 (F1-F23)。每一个都经过经验测试。这是论文中每个预测的实时状态。",
"falsification.summary": "{confirmed} 已确认 · {partial} 部分 · {refuted} 已反驳 · {untested} 未测试 (共 {total} 个预测)",
"falsification.col.id": "ID",
"falsification.col.claim": "Claim",
"falsification.col.status": "状态",
"falsification.col.evidence": "证据",
"tafcard.title": "📇 TAF 卡 — 完整模型画像",
"tafcard.recipes_title": "📋 配方 — 各维度判定",
"tafcard.recipes_count_label": "维度",
"tafcard.numbers_title": "🔢 关键数字 (paper §26)",
"tafcard.fals_title": "🔬 可证伪状态 (F1-F23)",
"tafcard.fals_none": "无适用的可证伪。",
"tafcard.diag_title": "🔬 诊断 — 数字 · γ 检验 · what-if",
"tafcard.verify_title": "✓ 验证 — Lean + Sage + 可证伪",
"tafcard.share_title": "📂 来源与分享",
"tafcard.whatif_title": "🎚️ What-if 浏览器",
"verdict.go": "通过",
"verdict.no": "否",
"verdict.degraded": "降级",
"compare.title_out": "🆚 比较表",
"status.loading_pyodide": "⏳ 加载 Python 运行时 (~10MB,首次加载)...",
"status.loading_taf": "⏳ 加载 TAF 公式 + 配方...",
"status.ready": "✅ 就绪。选择一个模型并点击画像开始。",
"status.computing": "🧮 计算 TAF 链...",
"status.done": "✅ 完成。",
"profile.hf_placeholder": "例如: meta-llama/Meta-Llama-3-8B 或 Qwen/Qwen2.5-7B",
"compare.hf_placeholder": "HF 模型 id (例如: meta-llama/Meta-Llama-3-8B)",
"compare.slot1_placeholder": "HF 模型 id (例如: meta-llama/Meta-Llama-3-8B)",
"compare.slot2_placeholder": "HF 模型 id #2",
"compare.slot3_placeholder": "HF 模型 id #3 (可选)",
"compare.preset_default": "— 或预设 —",
// 表单参数
"param.theta": "θ (rope_theta)",
"param.theta.tip": "RoPE 基础频率 来自 config.rope_theta。越高 = 长程能力越强。",
"param.T_train": "T_train",
"param.T_train.tip": "训练最大上下文。来自 max_position_embeddings。超出此范围属于外推。",
"param.T_eval": "T_eval (您的目标)",
"param.T_eval.tip": "您的目标推理上下文。关键问题: 模型在 这个 长度下表现是否良好?",
"param.n_attn": "n_attention_heads",
"param.n_attn.tip": "每层 attention heads 数。来自 num_attention_heads。",
"param.n_kv": "n_kv_heads",
"param.n_kv.tip": "KV heads。若 < n_attention_heads → GQA (Grouped Query Attention)。降低 KV 内存但将 γ 推向 Hagedorn。",
"param.d_head": "head_dim",
"param.d_head.tip": "每 head 维度。典型 64、96、128。来自 head_dim 或 hidden_size / num_attention_heads。",
"param.n_layers": "n_layers",
"param.n_layers.tip": "Transformer 块数。来自 num_hidden_layers。",
"param.n_params": "n_params (例如 8e9)",
"param.n_params.tip": "总参数量。约 400M 阈值出现 induction heads。影响 KV 内存和预算配方。",
"param.has_swa": "有 SWA 吗?",
"param.has_swa.tip": "Sliding Window Attention。Mistral、gemma-2、phi-3 为 true。v0.5.3 校准审计禁用了历史 δ_SWA 校正 (n=1 拟合)。",
"common.yes": "是",
"common.no": "否",
// 模式提示
"modes.tip": "七种使用方式。
📇 画像: 粘贴模型 id → 一次运行所有 8 个配方 = TAF 卡。
🆚 比较: 2-3 个模型在一个配方上并排比较。
🔍 检查 config: 粘贴原始 config.json → 完整画像。
💬 提问: 自由形式问题,浏览器 LLM 选择配方。
📋 配方: 手动选择,完全控制表单。
🩺 CLI 诊断: 生成 Python 命令在本地测量 γ。
📊 相图: 23 个面板模型在 (log θ, γ) 平面上。",
"profile.tip": "一键完整诊断。粘贴任意 HF 模型 id (或选择预设)。工具运行所有 5 个配方 (长上下文、KV 压缩、自定义 vs API、预算、硬件),生成单个 TAF 卡,显示每个维度的判定 + 关键数字 + 架构分类。
用例: \"我正在为生产评估 Qwen2.5-32B — 它的完整可行性概况是什么?\" → 粘贴 id → 画像 → 完成。",
"compare.tip": "同一配方,多个模型。选择 2-3 个候选模型和一个配方。在单个比较表中查看判定。
用例: \"我需要在 16K 进行长上下文检索 — 哪个最好: Llama-3-8B、Mistral-7B 或 Qwen-7B?\" → 选择 3 个 + X-2 + 16K → 看赢家。",
// 帮助模态框
"help.title": "📘 TAF Agent — 用户手册",
"help.what.title": "它做什么?",
"help.what.body": "在花费 GPU/$ 之前,预测任意 transformer LLM 的实际可行性。回答诸如 \"这个模型能在 L=32K 工作吗?\" 或 \"我应该自定义训练还是使用 API?\" 等问题,使用确定性 Python 公式 (TAF — Thermodynamic Attention Framework)。",
"help.modes.title": "如何使用 — 7 种模式",
"help.modes.profile": "📇 画像: 粘贴模型 id → 同时运行所有配方 = TAF 卡。最佳起点。",
"help.modes.compare": "🆚 比较: 2-3 个模型在同一配方上并排。最适合在候选者之间选择。",
"help.modes.inspector": "🔍 检查 config: 粘贴原始 config.json → 工具解析并运行完整画像。适用于私有模型、开发中的配置、或尚未在 HF Hub 上的模型。",
"help.modes.ask": "💬 自由提问: 自然语言问题,浏览器 LLM 选择配方。最适合随意探索。",
"help.modes.recipe": "📋 配方 + 表单: 手动选择,完全控制参数。最适合需要精确控制时。",
"help.modes.diagnose": "🩺 CLI 诊断: 生成 Python 命令在你的本地机器上测量 γ (transformers + numpy)。快速 ≈5 分钟 CPU;完整 ≈20–60 分钟 GPU。结果 JSON 可通过 Inspect 重新上传。",
"help.modes.phase": "📊 相图: 23 个面板模型在 (log θ, γ) 平面上的散点图。Hagedorn 线 γ=1 分隔 A 相和 B 相。点击点将该模型加载到配方表单。",
"help.recipes.title": "可用的 8 个配方",
"help.recipe.x1.title": "X-1 自定义训练 vs API — 比较训练自己模型的成本与付费使用 API 的成本。",
"help.recipe.x1.example": "尝试: \"我应该训练 8B 自定义模型还是使用 GPT-4o 处理每月 50M tokens?\"
答案: 是 (自定义) / 否 (API),含损益平衡月数。",
"help.recipe.x2.title": "X-2 长上下文可行性 — 预测模型是否能可靠地服务目标上下文长度。",
"help.recipe.x2.example": "尝试: \"Meta-Llama-3-8B 能处理 32000 tokens 检索吗?\"
链: γ_Padé → 分解 → d_horizon → NIAH 上限 → 幻觉 → KV 内存。
判定: 是 / 降级 / 否,如需则提供缓解措施。",
"help.recipe.x3.title": "X-3 预算预飞行 — 给定 $ 预算,可行训练什么模型?",
"help.recipe.x3.example": "尝试: \"我有 $5000,可以训练什么模型?\"
答案: GO / TINY-MODEL / MEMORY-LIMITED 含具体的 N (参数) 和 D (tokens)。",
"help.recipe.x5.title": "X-5 硬件选择 — 应该使用哪个 GPU 以达到目标吞吐量?",
"help.recipe.x5.example": "尝试: \"以每天 1000 万 tokens 提供 Llama-3-8B 的最便宜硬件\"
答案: 最佳 GPU + $/Mtok + 容量 vs 目标。",
"help.recipe.x19.title": "X-19 KV 压缩决策 — 应该使用 soft decay、hard cutoff 还是文献方法?",
"help.recipe.x21.title": "X-21 Imprint 纯度诊断 — 通过 ν=−1/(2π) 预测 RANDOM token 上的 γ;模型的 RoPE 预测有多干净?",
"help.recipe.x22.title": "X-22 Compute-Context 不变量 — γ × log(N²·D) 是否落在 51.2 ± 16.8 区间内?检测 scaling/training 异常。",
"help.recipe.x23.title": "X-23 IH-Phase 检测器 — 前- 还是后-induction-head?通过 sign(γ_text − γ_random) 进行廉价探测。",
"help.recipe.x19.example": "尝试: \"如何为 Qwen2.5-7B 在 32K 压缩 KV 缓存?\"
答案: USE SOFT DECAY / USE D_f CUTOFF / USE LITERATURE METHODS / USE HARD T_train.",
"help.recipe.x21.example": "尝试: \"Llama-3-8B 上的 RoPE 预测有多干净?\"
答案: 预测的 γ_random + 诊断 (CLEAN / OVER-IMPRINTED / UNDER-IMPRINTED)。",
"help.recipe.x22.example": "尝试: \"Mistral-7B 是否符合 compute-context 不变量?\"
答案: K = γ·log(N²·D)、z-score、IN-BAND 或 OUTLIER。",
"help.recipe.x23.example": "尝试: \"Qwen2.5-7B 是后-induction-head 吗?\"
答案: CONFIRMED PRE-IH / CONFIRMED POST-IH / ANOMALY。",
"help.section.v04": "v0.4 新增 (第 29 次研究会话, 2026-04-28): 来自 cross-model panel 分析 (n=22 LLMs) 的三个诊断 recipes。",
"help.divider.v04_s29": "— v0.4 (第 29 次会话发现) —",
"footer.tech_stack": "计算:Pyodide · 综合:WebLLM (Qwen2.5-0.5B 本地) · 托管:GitHub Pages · 成本:$0",
"help.v04.imprint": "学习印记斜率 ν = −1/(2π): RoPE 旋转周期 2π 在权重上引发位置偏置, 与 log(N_params) 成正比。即使 random token 也显示此 scaling。ν 是 DERIVED — 非拟合 (经验误差 0.3%)。",
"help.v04.invariant": "Chinchilla-attention 不变量 K: γ × log(N²·D) ≈ 51.2 ± 16.8 (CV=0.329)。将 compute scaling 和 attention 指数连接为单一无量纲数。",
"help.v04.ih_probe": "Δγ 作为 IH 探测: sign(γ_text − γ_random) > 0 ⟺ post-induction-head。比运行 in-context-learning 基准更便宜。",
"help.v04.constants": "γ 簇落在著名常数上 (有趣, n=4): CodeLlama-13b γ=0.382 ≈ 1−1/φ (黄金共轭, err 0.0003); pythia-1.4b γ=0.705 ≈ 1/√2; Llama-2-7b γ=0.287 ≈ 1−1/√2; Mistral-Nemo γ=0.428 ≈ log_10(e)。Caveat: 可能是巧合。",
"help.param.theta": "θ (rope_theta): RoPE 基础频率。越高 = 长程能力越强。典型: 10000 (早期),500000 (Llama-3),1000000 (Qwen2.5)。",
"help.param.T_train": "T_train: 模型训练时的最大上下文。来自 max_position_embeddings。",
"help.param.T_eval": "T_eval: 您的 目标推理上下文长度。关键旋钮。",
"help.param.gqa": "n_kv_heads < n_attention_heads: 模型使用 GQA (Grouped Query Attention)。减少 KV 内存但将 γ 推向 Hagedorn。",
"help.param.swa": "has_SWA: 模型使用 Sliding Window Attention (Mistral、gemma-2)。",
"help.param.nparams": "n_params: 总参数数量。诱导头出现的阈值约 400M。",
"help.add_models.title": "添加新模型 (3 种方式)",
"help.add_models.preset": "预设列表: 11 个流行模型已策划。从下拉菜单选择。",
"help.add_models.hf": "HF Hub 获取: 粘贴任意 id (例如 Qwen/Qwen2.5-32B-Instruct),点击 📥 获取。浏览器直接从 HuggingFace 下载 config.json,填充表单。适用于任何公共模型。",
"help.add_models.manual": "手动: 用模型卡的值直接填充表单字段。",
"help.audit.title": "可审计链",
"help.audit.body": "每个结果都显示完整的计算链 — 每个公式步骤及其输入、输出和解释。点击任意步骤展开。引用的章节号 (§26.1、§19.1 等) 指向论文中的推导。",
"help.synthesis.title": "自然语言回答",
"help.synthesis.body": "在确定性链运行后,浏览器中的 LLM (Qwen2.5-0.5B,首次加载后约 350MB 缓存) 综合自然语言摘要。上面的数字始终正确 (确定性 Python);综合由 LLM 生成 — 如有疑问,请对照链验证。",
"help.params.title": "常见参数解释",
"help.verdicts.title": "判定中要看什么",
"help.verdict.yes": "是 / GO — 自信地继续;数字支持选择。",
"help.verdict.deg": "降级 / TINY-MODEL — 有警告地工作;阅读操作。",
"help.verdict.no": "否 / MEMORY-LIMITED — 不要按原样进行;提供缓解措施。",
"help.privacy.title": "隐私",
"help.privacy.body": "一切都在您的浏览器中运行。无遥测,无分析,无数据发送到任何地方。即使是 LLM 模型也通过 WebGPU/WebAssembly 在本地运行。您的 model_ids 和问题永不离开此页面。",
"help.source.title": "源代码和论文",
"help.source.body": "源代码: github.com/karlesmarin/tafagent
论文: Marin 2026 — Predicting How Transformers Attend (Zenodo; arXiv 即将)
数据集: taf-attention-decay — 32个模型上的58次γ测量 (CC-BY-4.0)",
"footer.text": "© 2026 Carles Marin · Apache-2.0 · 独立研究 · 闭合论文回路的工具。",
},
};
let currentLang = "en";
export function getLang() {
return currentLang;
}
export function setLang(code) {
if (!TRANSLATIONS[code]) return;
currentLang = code;
try { localStorage.setItem("tafagent_lang", code); } catch (e) {}
applyTranslations();
// Highlight active flag
document.querySelectorAll("[data-lang]").forEach(el => {
el.classList.toggle("lang-active", el.dataset.lang === code);
});
}
export function t(key) {
return TRANSLATIONS[currentLang][key] ?? TRANSLATIONS.en[key] ?? key;
}
export function applyTranslations() {
document.querySelectorAll("[data-i18n]").forEach(el => {
const key = el.dataset.i18n;
const value = t(key);
// Allow HTML in translations (we control them)
el.innerHTML = value;
});
document.querySelectorAll("[data-i18n-placeholder]").forEach(el => {
el.placeholder = t(el.dataset.i18nPlaceholder);
});
}
// Expose so dynamically-inserted DOM (renderProfile, renderCompare) can re-apply
if (typeof window !== "undefined") {
window.__taf_applyTranslations = applyTranslations;
}
export function initI18n() {
// Browser default lang detection or stored preference
let stored = null;
try { stored = localStorage.getItem("tafagent_lang"); } catch (e) {}
if (stored && TRANSLATIONS[stored]) {
currentLang = stored;
} else {
const browserLang = (navigator.language || "en").slice(0, 2);
if (TRANSLATIONS[browserLang]) currentLang = browserLang;
}
applyTranslations();
// Mark active flag
document.querySelectorAll("[data-lang]").forEach(el => {
el.classList.toggle("lang-active", el.dataset.lang === currentLang);
});
}