{
  "schema_version": "1.0.0",
  "run_id": "migmaq-v1-rc1",
  "created_at": "2026-07-12T09:25:00Z",
  "status": "complete_research_preview_live",
  "purpose": "Train and evaluate a first noncommercial English-to-Mi'gmaq research candidate without exposing the frozen test set during model selection.",
  "rights": {
    "dataset_license": "CC-BY-NC-4.0",
    "base_model_license": "CC-BY-NC-4.0",
    "commercial_use": false,
    "public_status": "research-only",
    "attribution": "Mi'gmaq/Mi'kmaq Online Talking Dictionary (mikmaqonline.org), CC BY-NC 4.0."
  },
  "dataset": {
    "release_id": "migmaq-online-example-parallel-v1.0.0-20260712",
    "archive": "migmaq-online-example-parallel-v1.0.0-20260712.tar.gz",
    "archive_sha256": "805c225aeebf0596fa4f892d89cf930a23a395e2b58c1c059cb47a7092f86368",
    "train_rows": 5798,
    "validation_rows": 686,
    "frozen_test_rows": 742,
    "split_leakage_violations": 0,
    "test_access_policy": "The full training process receives no --test-file. The frozen test is evaluated once after checkpoint and decoding selection are fixed from validation."
  },
  "code": {
    "repository_commit": "4229c2226987e9b24acd38df5356b581a0c7a502",
    "working_tree_note": "The repository is shared and dirty; the run is defined by this exact code bundle rather than commit state alone.",
    "bundle": "migmaq-v1-code-20260712T0925Z.tar.gz",
    "bundle_sha256": "423bf6977adff865089e1f57bd017df0fd4e46508435a33818e8a57d72689f0c",
    "gate_fix_bundle": "migmaq-v1-gate-fix-code-20260712T1000Z.tar.gz",
    "gate_fix_bundle_sha256": "ef4effb14f4ccc056be124af5b5859ef47405167b9690b622d1c3e31473ea679",
    "evaluation_bundle": "migmaq-v1-evaluation-code-20260712T1033Z.tar.gz",
    "evaluation_bundle_sha256": "37286e683247aecbfc2e2573c1dee089770110349bbb7f32b8e337efffe70b6c"
  },
  "model": {
    "model_id": "mobtranslate/migmaq-nllb-lora",
    "candidate_version": "1.0.0-rc1",
    "base_model": "facebook/nllb-200-distilled-600M",
    "base_model_revision": "f8d333a098d19b4fd9a8b18f94170487ad3f821d",
    "direction": "eng-mic",
    "source_token": "eng_Latn",
    "target_token": "mic_Latn",
    "target_token_builtin": false,
    "target_token_initialization": {
      "copied_from": "tpi_Latn",
      "rationale": "A previously exercised NLLB custom-token plumbing seed. This is only a numerical initialization and makes no genealogical, typological, dialect, or equivalence claim. The target embedding and language-model head are trainable."
    }
  },
  "plumbing_gate": {
    "train_rows": 128,
    "sanity_rows": 64,
    "data_scope": "training split only",
    "epochs": 30,
    "pass_conditions": {
      "required_artifacts": true,
      "custom_token_survives_reload": true,
      "train_loss_max": 2.0,
      "overfit_chrf_min": 65.0,
      "overfit_exact_min": 0.15,
      "empty_outputs": 0,
      "sanity_unique_outputs_min": 8
    },
    "attempts": [
      {
        "id": "gate-v1",
        "started_at": "2026-07-12T09:33:46Z",
        "ended_at": "2026-07-12T09:40:25Z",
        "status": "fail",
        "training_result": {
          "epochs": 30,
          "final_validation_chrf": 40.59762699632375,
          "final_validation_bleu": 11.90854704874837,
          "final_logged_loss": 1.7091
        },
        "failure": "The saved merged model did not preserve the runtime decoder embedding alias: 92/128 outputs were empty and other outputs degenerated after reload.",
        "disposition": "Full training remained blocked. The failed verdict and predictions were preserved."
      },
      {
        "id": "merge-diagnostic-fix",
        "status": "pass",
        "finding": "PEFT replaced model.shared while the encoder and decoder retained the original runtime embedding. Safe serialization reloaded decoder.embed_tokens from the wrong shared matrix, with maximum absolute divergence 1.5062255859375.",
        "fix": "Canonicalize model.shared to the runtime decoder embedding, keep the trained lm_head untied, and materialize shared/encoder/decoder serialization keys independently.",
        "verification": "The corrected diagnostic has zero state-dict differences and identical in-memory-versus-reloaded merged predictions."
      },
      {
        "id": "gate-v2-continuation",
        "status": "pass",
        "resume_checkpoint": "gate-v1 checkpoint-480",
        "target_total_epochs": 100,
        "reason": "The save/merge defect was fixed, but the original 30-epoch gate did not meet the predeclared memorization thresholds. The same training-only gate was continued rather than lowering thresholds post hoc.",
        "ended_at": "2026-07-12T10:14:54Z",
        "result": {
          "overfit_rows": 128,
          "overfit_bleu": 100.00000000000004,
          "overfit_chrf": 100.0,
          "overfit_exact": 1.0,
          "overfit_empty_outputs": 0,
          "final_logged_loss": 0.0982,
          "sanity_rows": 64,
          "sanity_empty_outputs": 0,
          "sanity_unique_outputs": 64,
          "verdict": "pass"
        }
      }
    ]
  },
  "training": {
    "started_at": "2026-07-12T10:18:12Z",
    "completed_at": "2026-07-12T10:52:08Z",
    "epochs": 8,
    "batch_size": 8,
    "gradient_accumulation_steps": 4,
    "effective_batch_size": 32,
    "learning_rate": 0.0001,
    "warmup_ratio": 0.08,
    "weight_decay": 0.01,
    "seed": 42,
    "lora": {
      "r": 32,
      "alpha": 64,
      "dropout": 0.05,
      "target_modules": ["q_proj", "k_proj", "v_proj", "out_proj", "fc1", "fc2"],
      "modules_to_save": ["model.shared", "lm_head"]
    },
    "selection": {
      "metric": "validation chrF++",
      "eval_steps": 180,
      "save_steps": 180,
      "save_total_limit": 3
    },
    "progress_observations": [
      {
        "step": 180,
        "epoch": 0.993103448275862,
        "validation_loss": 4.335728645324707,
        "validation_bleu": 0.16765838926628987,
        "validation_chrf": 12.463361942763411,
        "best_checkpoint": true
      },
      {
        "step": 360,
        "epoch": 1.9820689655172414,
        "validation_loss": 3.8356380462646484,
        "validation_bleu": 0.48404126819549576,
        "validation_chrf": 15.359716652391825,
        "best_checkpoint": true
      },
      {
        "step": 540,
        "epoch": 2.9710344827586206,
        "validation_loss": 3.6013119220733643,
        "validation_bleu": 0.6223286620873894,
        "validation_chrf": 16.471575253145918,
        "best_checkpoint": true
      },
      {
        "step": 720,
        "epoch": 3.96,
        "validation_loss": 3.4398512840270996,
        "validation_bleu": 0.8660361185193649,
        "validation_chrf": 18.47887061026974,
        "best_checkpoint": true
      },
      {
        "step": 900,
        "epoch": 4.94896551724138,
        "validation_loss": 3.345947027206421,
        "validation_bleu": 0.9134969735073716,
        "validation_chrf": 19.630807799535308,
        "best_checkpoint": true
      },
      {
        "step": 1080,
        "epoch": 5.937931034482759,
        "validation_loss": 3.2714765071868896,
        "validation_bleu": 1.2834734566308728,
        "validation_chrf": 20.59770622137929,
        "best_checkpoint": true
      },
      {
        "step": 1260,
        "epoch": 6.926896551724138,
        "validation_loss": 3.2290875911712646,
        "validation_bleu": 1.1601988315075908,
        "validation_chrf": 20.71442465389354,
        "best_checkpoint": true
      },
      {
        "step": 1440,
        "epoch": 7.9158620689655175,
        "validation_loss": 3.216315269470215,
        "validation_bleu": 1.1713297280145971,
        "validation_chrf": 20.90273868497496,
        "best_checkpoint": true
      }
    ],
    "result": {
      "global_steps": 1448,
      "train_runtime_seconds": 1623.2654,
      "train_loss": 3.790959213320063,
      "best_checkpoint": "checkpoint-1440",
      "best_validation_chrf": 20.90273868497496,
      "manifest_test_file": null,
      "post_close_checksum_status": "pass"
    },
    "frozen_test_accessed": true
  },
  "validation_selection": {
    "completed_at": "2026-07-12T11:06:46Z",
    "rows": 686,
    "selected_label": "balanced",
    "decoding": {
      "num_beams": 4,
      "no_repeat_ngram_size": 3,
      "repetition_penalty": 1.1,
      "length_penalty": 1.0
    },
    "metrics": {
      "bleu": 1.3867095890270624,
      "chrf": 21.043364156861834,
      "exact_match": 0.0,
      "empty_outputs": 0,
      "source_copy_outputs": 0,
      "repeated_trigram_outputs": 0,
      "mean_length_ratio_from_evaluation_summary": 0.8758146699845953
    },
    "bootstrap_95": {
      "bleu": [0.9756152218038505, 2.1039590881029357],
      "chrf": [20.40827569829013, 21.651766995647545]
    },
    "paired_base_proxy_chrf_delta": {
      "point": 9.734393256609902,
      "bootstrap_95": [9.106300350638811, 10.30088559309848]
    },
    "unconstrained_candidate_repeated_trigram_outputs": 45,
    "selection_checksum_status": "pass",
    "frozen_test_accessed": false
  },
  "frozen_test": {
    "access_policy": "One-shot evaluation after the checkpoint and decoding configuration were fixed from validation.",
    "access_reserved_at": "2026-07-12T11:08:40Z",
    "completed_at": "2026-07-12T11:11:15Z",
    "rows": 742,
    "split": "test",
    "decoding": {
      "num_beams": 4,
      "no_repeat_ngram_size": 3,
      "repetition_penalty": 1.1,
      "length_penalty": 1.0
    },
    "metrics": {
      "bleu": 1.779488646466125,
      "chrf": 21.42976562133535,
      "exact_match": 0.0,
      "empty_outputs": 0,
      "source_copy_outputs": 0,
      "training_target_matches": 0,
      "repeated_bigram_outputs": 6,
      "repeated_trigram_outputs": 0,
      "unique_outputs": 734,
      "maximum_output_frequency": 3,
      "mean_character_length_ratio": 0.9063,
      "punctuation_preservation_rate": 0.9838,
      "apostrophe_presence_preservation_rate": 0.8976
    },
    "bootstrap_95": {
      "bleu": [0.9307708062998958, 2.6028682264443948],
      "chrf": [20.812761585835972, 22.033230864419387]
    },
    "headword_scope": "Every frozen-test source headword group is absent from training by construction.",
    "prediction_sha256": "5d294244e21e160a8d9e8ae35eb385a93b3608cd51df534505088778767c7566",
    "analysis_sha256": "2e02ba0250c38cddbc54392872c7d1bd3d0ae73291eecce46b2339a0f6b50fb7",
    "checksum_status": "pass",
    "promotion_ruling": "Machine-integrity gates pass. Linguistic-quality promotion fails pending qualified Mi'gmaq review; expose only as a visibly warned research preview."
  },
  "artifact_verification": {
    "completed_at": "2026-07-12T11:36:00Z",
    "remote_post_close_inventory": "reports/final-run/SHA256SUMS.post-close",
    "adapter_sha256": "d85184d614f614815910442cbc5324f440c4030cdebd6b5cff2d3d7046381c67",
    "merged_model_sha256": "8df8467e96ba480e790951f86cdc30919cd1d441faf7d1c5c5521cef1c78eb01",
    "best_checkpoint_adapter_sha256": "d85184d614f614815910442cbc5324f440c4030cdebd6b5cff2d3d7046381c67",
    "model_manifest_sha256": "3d22c22718db939aa1d6af69d0a5705368afe83421385cc5a825ee33d05fbaa0",
    "adapter_files": "pass",
    "merged_files": "pass",
    "recovery_checkpoint_files": "pass",
    "selection_ledger": "pass",
    "frozen_test_ledger": "pass"
  },
  "serving_verification": {
    "started_at": "2026-07-12T11:37:00Z",
    "ready_at": "2026-07-12T11:39:25Z",
    "service": "mobtranslate-migmaq-v1-infer.service",
    "endpoint": "http://127.0.0.1:8766/translate",
    "backend": "CPU float32",
    "selected_decoding_loaded": true,
    "health_check": "pass",
    "heldout_smoke_requests": 2,
    "request_latency_seconds": [5.042, 4.011],
    "memory_peak_bytes": 5371129856,
    "memory_swap_bytes": 0,
    "restart_count": 0,
    "backend_variance_note": "Frozen evaluation used CUDA bfloat16 while the live host uses CPU float32. Beam search selected a one-character variant for one smoke row and a different later clause for another; model weights, tokenizer, and decoding settings are unchanged, but byte-identical predictions are not claimed across numerical backends."
  },
  "public_deployment": {
    "completed_at": "2026-07-12T12:57:18Z",
    "status": "guarded_research_preview",
    "translator_url": "https://mobtranslate.com/labs/migmaq",
    "dictionary_url": "https://mobtranslate.com/dictionaries/migmaq",
    "model_registry_url": "https://mobtranslate.com/models",
    "model_card_url": "https://mobtranslate.com/docs/migmaq-model-card.html",
    "training_handoff_url": "https://mobtranslate.com/docs/migmaq-model-training.html",
    "evaluation_url": "https://mobtranslate.com/docs/migmaq-evaluation.html",
    "dataset_url": "https://mobtranslate.com/datasets/migmaq/migmaq-online-example-parallel-v1.0.0-20260712.tar.gz",
    "model_archive_url": "https://mobtranslate.com/model-artifacts/migmaq-nllb-lora/1.0.0-rc1/migmaq-nllb-lora-1.0.0-rc1-merged.tar.gz",
    "model_archive_bytes": 2247094395,
    "model_archive_sha256": "2abe9602ee2b47cee8037b6839ce8faa052f867280591d0d917b2eea4260d591",
    "archive_range_request": "pass",
    "api_empty_request_status": 400,
    "api_oversize_request_status": 413,
    "desktop_visual_check": "pass",
    "mobile_visual_check": "pass",
    "mobile_horizontal_overflow": false,
    "kuku_yalanji_regression_check": "pass",
    "external_script_note": "The app is error-free when external analytics are blocked. Cloudflare Zaraz currently injects openpanel.dev/op1.js, which throws an opaque cross-origin line-0 TypeError; this is a pre-existing third-party analytics issue, not a translator exception."
  },
  "dictionary_browse_consolidation": {
    "completed_at": "2026-07-12T12:57:18Z",
    "retained_database_rows": 13643,
    "browse_superseded_rows": 6581,
    "visible_entries": 7062,
    "visible_duplicate_lexeme_class_keys": 0,
    "copied_legacy_only_definitions": 3,
    "copied_definition_linked_translations": 2467,
    "copied_legacy_only_examples": 111,
    "active_recordings": 28323,
    "recording_playback_range_request": "206 pass",
    "deletes": 0,
    "pre_consolidation_inventory": "reports/dictionary-consolidation-preflight.SHA256SUMS"
  },
  "default_decoding": {
    "num_beams": 4,
    "max_new_tokens": 128,
    "no_repeat_ngram_size": 4,
    "repetition_penalty": 1.15,
    "length_penalty": 0.8
  },
  "runpod": {
    "requested_gpu": "NVIDIA A40",
    "requested_vram_gb": 48,
    "cloud_type": "SECURE",
    "template": "runpod-torch-v240",
    "workspace_gb": 60,
    "container_disk_gb": 30,
    "auto_termination": "required",
    "pod_id": "8fyl89yeeesbyu",
    "actual_gpu": "NVIDIA A40 46068 MiB",
    "cost_per_hour_usd": 0.44,
    "location": "SE",
    "started_at": "2026-07-12T09:25:12Z",
    "terminate_after": "2026-07-12T15:25:03Z",
    "ended_at": "2026-07-12T11:41:38Z",
    "elapsed_seconds": 8186,
    "estimated_elapsed_cost_usd": 1.0005,
    "billing_snapshot_at": "2026-07-12T13:03:00Z",
    "billing_snapshot_usd": 1.0207132642390206,
    "billing_time_milliseconds": 8191142,
    "billing_snapshot_note": "Final posted RunPod pod ledger; includes RunPod's complete billing calculation.",
    "deletion_confirmed": true
  },
  "promotion_policy": {
    "automatic_metrics_sufficient": false,
    "speaker_review_required_for_unrestricted_public_routing": true,
    "candidate_can_be_exposed_before_speaker_review": "Only in a clearly labelled research interface with source/license and limitations visible.",
    "registry_promotion": false
  }
}
