Skip to content

Phase 3: Modal Labs GPU + PBT hyperparameter search (+20-30% speedup) #295

Closed

Description

@gHashTag

Goal

Миграция тренинга на GPU для 3-5x ускорения + PBT для быстрого поиска гиперпараметров.

Tasks

1. Modal Labs Integration

  • Создать modal_train.py обёртку для HSLM тренинга
  • Docker-native, serverless GPU (A10G/A100)
  • Pay-per-use: платишь только во время тренинга
  • Ожидание: 3-5x raw speedup

2. Гибридная архитектура

  • Railway остаётся для оркестрации (Cloud Dev агенты)
  • Modal Labs для GPU compute
  • tri train --gpu флаг для диспатча на Modal

3. Population-Based Training (PBT)

  • 4-5 параллельных runs с разными гиперпараметрами
  • Каждые N шагов: evaluate, мутация bottom-2 с параметрами top-2
  • Поиск: LR, batch_size, tau_schedule, label_smoothing_eps
  • Ожидание: 30-50% быстрее к оптимуму

4. Альтернативы для оценки

  • Vast.ai: самый дешёвый для длинных runs (спот-рынок)
  • Runpod: Docker-native, низкий overhead

Depends on

Priority

P1 — дни 5-7

Cost

  • Modal A10G: ~$0.60/hr, A100: ~$2.50/hr
  • Railway CPU 32vCPU: ~$0.89/hr
  • Break-even при 3x speedup

Files to modify

src/tri-api/, bin/tri-train, .modal/

Verification

  1. Modal job запускается и выдаёт логи
  2. GPU training 3x+ быстрее CPU baseline
  3. PBT находит лучшие гиперпараметры за 4-5 runs

Activity

  1. github-actions commented on Mar 12, 2026

    @github-actions
    Contributor

    🚀 Agent container spawned! Deploying on Railway. Tracking in this issue.

  2. github-actions commented on Mar 12, 2026

    @github-actions
    Contributor

    🚀 Agent container spawned! Deploying on Railway. Tracking in this issue.

  3. github-actions commented on Mar 12, 2026

    @github-actions
    Contributor

    🚀 Agent container spawned! Deploying on Railway. Tracking in this issue.

  4. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent | 2026-03-12T06:01:09Z
    📋 Step: 1/8 — Authenticating with GitHub
    🔄 Status: AWAKENING
    ⏱️ Elapsed: 0s

  5. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #295

    Field Value
    Status AWAKENING
    Step 1/8
    Detail Authenticating with GitHub
    Elapsed 0s
    Container agent-295
    Updated 2026-03-12T06:01:09Z
  6. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ☠️ Trinity Agent | 2026-03-12T06:01:12Z
    📋 Step: 2/8 — Container terminated by signal
    🔄 Status: KILLED
    ⏱️ Elapsed: 3s

  7. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ☠️ Trinity Agent Dashboard — Issue #295

    Field Value
    Status KILLED
    Step 2/8
    Detail Container terminated by signal
    Elapsed 3s
    Container agent-295
    Updated 2026-03-12T06:01:12Z
  8. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent | 2026-03-12T06:01:18Z
    📋 Step: 1/8 — Authenticating with GitHub
    🔄 Status: AWAKENING
    ⏱️ Elapsed: 0s

  9. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #295

    Field Value
    Status AWAKENING
    Step 1/8
    Detail Authenticating with GitHub
    Elapsed 0s
    Container agent-295
    Updated 2026-03-12T06:01:18Z
  10. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #295

    Field Value
    Status AWAKENING
    Step 2/8
    Detail Creating worktree from bare repository
    Elapsed 4s
    Container agent-295
    Updated 2026-03-12T06:01:22Z
  11. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📖 Trinity Agent | 2026-03-12T06:01:26Z
    📋 Step: 3/8 — Reading issue #295
    🔄 Status: READING
    ⏱️ Elapsed: 8s

  12. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ⚡ Trinity Agent Dashboard — Issue #295

    Field Value
    Status CODING
    Step 4/8
    Detail Claude Code running (timeout: 3600s)
    Elapsed 13s
    Container agent-295
    Updated 2026-03-12T06:01:31Z
  13. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ⚡ Trinity Agent | 2026-03-12T06:01:31Z
    📋 Step: 4/8 — Claude Code running (timeout: 3600s)
    🔄 Status: CODING
    ⏱️ Elapsed: 13s

  14. 17 remaining items

  15. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ❌ Trinity Agent | 2026-03-12T19:29:07Z
    📋 Step: 8/8 — Compilation gate failed after 3 repair attempts — skipping PR
    🔄 Status: FAILED
    ⏱️ Elapsed: 698s

  16. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ❌ Trinity Agent: Compilation gate FAILED after 3 repair attempts. Code does not build.

    timeout: failed to run command 'zig': No such file or directory
    

    PR creation skipped. Issue needs manual attention.

  17. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent | 2026-03-12T19:29:22Z
    📋 Step: 1/8 — Authenticating with GitHub
    🔄 Status: AWAKENING
    ⏱️ Elapsed: 0s

  18. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #295

    Field Value
    Status AWAKENING
    Step 1/8
    Detail Authenticating with GitHub
    Elapsed 0s
    Container agent-295
    Updated 2026-03-12T19:29:22Z
  19. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ⚡ Trinity Agent Dashboard — Issue #295

    Field Value
    Status CODING
    Step 5/8
    Detail Claude Code running (timeout: 3600s)
    Elapsed 76s
    Container agent-295
    Updated 2026-03-12T19:30:38Z
  20. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📖 Trinity Agent | 2026-03-12T19:29:29Z
    📋 Step: 3/8 — Reading issue #295
    🔄 Status: READING
    ⏱️ Elapsed: 7s

  21. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📖 Trinity Agent Dashboard — Issue #295

    Field Value
    Status READING
    Step 3/8
    Detail Reading issue #295
    Elapsed 7s
    Container agent-295
    Updated 2026-03-12T19:29:29Z
  22. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ❌ Trinity Agent | 2026-03-12T19:30:03Z
    📋 Step: 4/8 — z.ai attempt 1/3, backoff 30s
    🔄 Status: FAILED
    ⏱️ Elapsed: 41s

  23. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ⚡ Trinity Agent | 2026-03-12T19:30:38Z
    📋 Step: 5/8 — Claude Code running (timeout: 3600s)
    🔄 Status: CODING
    ⏱️ Elapsed: 76s

  24. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📋 Step: 1/7 — Modal Labs GPU wrapper creation
    🔄 Status: THINKING
    Thought: Modal Labs provides serverless GPU (A10G/A100) with Python SDK. Need to create wrapper that runs Zig HSLM training on GPU-enabled containers.
    Action: Creating .modal/hslm_modal.py for GPU training dispatch
    Next: Implement PBT in Zig for hyperparameter search

  25. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📋 Step: 2/7 — Modal Labs Integration complete

    Thought: Modal wrapper complete, will now dispatch to via tri CLI
    Action: Creating . .sm/hslm_modal.py, with updated HSLM training doc
    Next: Test PBT implementation in zig

  26. gHashTag commented on Apr 30, 2026

    @gHashTag
    OwnerAuthor

    Requires GPU training infrastructure. Not actionable without hardware access.

  27. added a commit that references this issue on Apr 30, 2026
    04c2706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent containerenhancementNew feature or request

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions