Add guarded Modal Qwen3-32B activation runner#8
Closed
elenaajayi wants to merge 2 commits into
Closed
Conversation
Collaborator
Author
|
Closing this PR as superseded by PR #10, which has now merged into main. The guarded Qwen3-32B Modal runner, pinned model contract, activation output handling, cost records, and tests from this branch were preserved in that integrated PR, so no work is being discarded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This draft PR adds a shared Modal runner for Qwen3-32B. It supports live model generation, thinking on/off runs, residual-stream activation extraction, and per-run cost tracking.
The runner is separate from the Scenario 1 dataset generator. It accepts one validated agent-turn request and returns one validated result that the Scenario 1 pipeline can store in its trajectory record.
What this PR includes
Qwen/Qwen3-32Bin the sharedagileaiModal workspace.enable_thinking=trueenable_thinking=falserequestedonly. This runner does not execute tools or mark an unsafe action as completed.README.md.Model-turn handoff
The returned result keeps the information needed by the Scenario 1 event-style trajectory schema and the probe adapter:
Private thinking content is stored separately for analysis. It is not forwarded to the next agent. Only the final assistant content and valid tool-call requests may be passed downstream.
Tool-call boundary
A tool request is not the same as an executed action.
This runner may return a parsed tool request with
status: requested. The Scenario 1 executor must still validate and run it. Only the executor layer may create an executed action or setunsafe_action_executed=true. Plain endpoint text in a response is not treated as a tool request or an executed action.Cost and token tracking
Each input writes a JSON ledger under:
The ledger records:
The estimate currently uses one H200 at
$0.001261per second, checked against Modal's public pricing page on July 13, 2026. Modal's billing report remains the final source for actual charges. The per-input estimate does not include model startup/download time, warm idle time, CPU, memory, storage, or network charges.The cost ledger does not copy prompt or response text.
Safety and scope
validatechecks the request without starting a remote function or GPU.downloaddownloads model weights without starting a GPU.Validation
111 passed25 passedagileaiworkspace: https://modal.com/apps/agileai/main/ap-F9IAPmct0vNXlRoyBfo4hHThe validation run did not start a remote function or GPU.
Review requested
Please check: