-
Notifications
You must be signed in to change notification settings - Fork 79
[ws1]: WS1 Full Qwen3-8B Dense Train-Inference Closeout #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
frank-2077
merged 31 commits into
RL-Align:test
from
maxiaosong1124:feat/ws1-c6-c11-closeout-266
Aug 18, 2026
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
af4d9c2
feat(ws1): land C1 four-judgment numerical contract (#267)
maxiaosong1124 70286fb
docs(ws1): add #267 C1 closeout evidence map
maxiaosong1124 087156e
docs(ws1): streamline C1 gtest documentation
maxiaosong1124 81ddd65
fix(ws1): address tolerance contract review
maxiaosong1124 e857084
feat(ws1): land C2 canonical workload identity (#268)
maxiaosong1124 fca1656
fix(ws1): address PR 292 review feedback
maxiaosong1124 362562e
style(testing): apply isort export ordering
maxiaosong1124 b41c6f8
fix(ws1): satisfy mypy workload validation
maxiaosong1124 f1bfbc5
feat(ws1): land C3 forward config-invariance harness (#269)
maxiaosong1124 2e4a30a
fix ws1 provenance review issues
maxiaosong1124 596feb0
feat(ws1): land C4 gradient-invariance harness and adapters (#270)
maxiaosong1124 69455aa
feat(ws1): land C1-C5/C8 gtest framework and single-op gates
maxiaosong1124 91261d6
feat(ws1): close C8 four-judgment gtest port and evidence gaps
maxiaosong1124 5c33dcd
fix(ws1): record launched C2 candidate id on C8 invariance cells
maxiaosong1124 83029c7
docs(ws1): bind C8 execute evidence to 5c33dcd on H20
maxiaosong1124 3b3e681
test(ws1): fix CPU sampling smoke and add CUDA/Triton C8 CI gate
maxiaosong1124 89312cd
fix(ws1): keep C8 evidence git-clean and tighten GPU CI safety
maxiaosong1124 15e25dd
chore: ignore local ws1-c8-ci.json dumps
maxiaosong1124 fffed4b
Merge branch 'test' into feat/ws1-c1-c5-c8-gtest
maxiaosong1124 79c7d4d
fix(ci): satisfy pre-commit formatting and mypy checks
maxiaosong1124 ecdaa4b
fix(ws1): address PR #305 review feedback
maxiaosong1124 cce9e94
style(ws1): apply black formatting for CI lint
maxiaosong1124 c386d47
feat(ws1): complete C6-C11 closeout gates
maxiaosong1124 85e1373
chain test
maxiaosong1124 af07ca2
fix(ws1): accumulate Triton LM-head hidden gradients in fp32
maxiaosong1124 e4bf38e
fix(ws1): avoid retained transposed weights in chain gate
maxiaosong1124 3b2e640
fix(ws1): canonicalize chunked training backward replay
maxiaosong1124 fdf5bcc
fix(ws1): close chunked dual-backend gradient paths
maxiaosong1124 10ccc85
docs(ws1): record H20 C8 and C10 evidence
maxiaosong1124 27f5e01
fix(ci): satisfy lint and secure fork GPU gate
maxiaosong1124 be609fa
fix(ci): allow CPU collection without Triton
maxiaosong1124 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # WS1 C10/C11 full Qwen3-8B Dense model-level gate (CUDA BF16 + Triton-on-CUDA BF16). | ||
| # Required check: no skip / xfail / synthetic weights / silent fallback. | ||
| # Security: do not use pull_request_target. Fork PRs never see RunPod secrets. | ||
| # Fork commits require an explicit maintainer workflow_dispatch from a trusted branch. | ||
|
|
||
| name: WS1-chain-GPU | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main, test ] | ||
| push: | ||
| branches: [ main, test ] | ||
| workflow_dispatch: | ||
| inputs: | ||
| source_repository: | ||
| description: "Public repository containing the reviewed commit (owner/name)" | ||
| required: true | ||
| default: "RL-Align/RL-Kernel" | ||
| type: string | ||
| source_sha: | ||
| description: "Exact reviewed 40-character commit SHA to execute on the GPU pod" | ||
| required: true | ||
| type: string | ||
|
|
||
| concurrency: | ||
| group: ws1-chain-gpu-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| fork-pr-notice: | ||
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Report required trusted execution | ||
| run: | | ||
| echo "Fork code cannot receive RunPod credentials." | ||
| echo "A maintainer must dispatch this workflow from a trusted upstream branch." | ||
| echo "source_repository=${{ github.event.pull_request.head.repo.full_name }}" | ||
| echo "source_sha=${{ github.event.pull_request.head.sha }}" | ||
|
|
||
| ws1-chain: | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 180 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - { gpu_id: "NVIDIA H100 80GB HBM3", target_sm: "9.0", force_sm90: "1", name: "sm90-c10-c11" } | ||
| steps: | ||
| - name: Validate trusted dispatch target | ||
| if: github.event_name == 'workflow_dispatch' | ||
| env: | ||
| SOURCE_REPOSITORY: ${{ inputs.source_repository }} | ||
| SOURCE_SHA: ${{ inputs.source_sha }} | ||
| run: | | ||
| [[ "$SOURCE_REPOSITORY" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]] | ||
| [[ "$SOURCE_SHA" =~ ^[0-9a-fA-F]{40}$ ]] | ||
|
|
||
| - name: Checkout trusted GPU orchestrator | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event_name == 'workflow_dispatch' && github.sha || github.event.pull_request.head.sha || github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Install runpodctl | ||
| run: | | ||
| wget -qO runpodctl https://github.com/runpod/runpodctl/releases/latest/download/runpodctl-linux-amd64 | ||
| chmod +x runpodctl | ||
| sudo mv runpodctl /usr/local/bin/runpodctl | ||
|
|
||
| - name: Configure runpodctl | ||
| run: runpodctl config --apiKey "${{ secrets.RUNPOD_API_KEY }}" | ||
|
|
||
| - name: Setup SSH key | ||
| run: | | ||
| mkdir -p ~/.ssh && chmod 700 ~/.ssh | ||
| printf '%s\n' "${{ secrets.RUNPOD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | ||
| chmod 600 ~/.ssh/id_ed25519 | ||
|
|
||
| - name: Run WS1 full-model C10/C11 on RunPod H100/H20-class | ||
| env: | ||
| RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} | ||
| PR_REPO_URL: ${{ github.event_name == 'workflow_dispatch' && format('https://github.com/{0}.git', inputs.source_repository) || github.event.pull_request.head.repo.clone_url || github.event.repository.clone_url }} | ||
| PR_SHA: ${{ github.event_name == 'workflow_dispatch' && inputs.source_sha || github.event.pull_request.head.sha || github.sha }} | ||
| GPU_ID: ${{ matrix.gpu_id }} | ||
| GPU_COUNT: "1" | ||
| TARGET_SM: ${{ matrix.target_sm }} | ||
| KERNEL_ALIGN_FORCE_SM90: ${{ matrix.force_sm90 }} | ||
| TEST_SUITE: ws1-chain | ||
| WS1_WEIGHTS_PATH: "" | ||
| run: bash ci/run_gpu_ci.sh | ||
|
|
||
| - name: Upload C8/C10/C11 JSON | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ws1-closeout-${{ matrix.name }} | ||
| path: | | ||
| artifacts/ws1-c8-ci.json | ||
| artifacts/ws1-c10-*.json | ||
| if-no-files-found: error |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # WS1 single-op gtest + C8 four-judgment GPU gate (CUDA BF16 and Triton-on-CUDA BF16). | ||
| # Uses the same RunPod orchestrator as gpu-ci.yml. Fails closed on C8 red cells | ||
| # and on C3/C4 silent fallback. Hopper must have zero pending_hopper. | ||
| # | ||
| # Security: do not use pull_request_target. Fork PRs never see RunPod secrets. | ||
| # Same-repo PRs, pushes to main, and maintainer workflow_dispatch are allowed. | ||
|
|
||
| name: WS1-gtest-GPU | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - "rl_engine/kernels/gtest/**" | ||
| - "rl_engine/kernels/ops/**" | ||
| - "rl_engine/testing/**" | ||
| - "scripts/sweep_ws1_four_judgments.py" | ||
| - "scripts/check_forward_invariance.py" | ||
| - "scripts/check_gradient_invariance.py" | ||
| - "scripts/ws1_candidate_evidence.py" | ||
| - "tests/test_ws1_*.py" | ||
| - "tests/test_forward_invariance.py" | ||
| - "tests/test_gradient_invariance.py" | ||
| - "tests/test_four_judgment_matrix.py" | ||
| - "tests/test_triton_batch_invariant_attention.py" | ||
| - "ci/run_ws1_gtest.sh" | ||
| - "ci/run_gpu_ci.sh" | ||
| - ".github/workflows/ws1-gtest-gpu.yml" | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - "rl_engine/kernels/gtest/**" | ||
| - "rl_engine/kernels/ops/**" | ||
| - "rl_engine/testing/**" | ||
| - "scripts/sweep_ws1_four_judgments.py" | ||
| - "scripts/check_forward_invariance.py" | ||
| - "scripts/check_gradient_invariance.py" | ||
| - "scripts/ws1_candidate_evidence.py" | ||
| - "tests/test_ws1_*.py" | ||
| - "tests/test_forward_invariance.py" | ||
| - "tests/test_gradient_invariance.py" | ||
| - "tests/test_four_judgment_matrix.py" | ||
| - "tests/test_triton_batch_invariant_attention.py" | ||
| - "ci/run_ws1_gtest.sh" | ||
| - "ci/run_gpu_ci.sh" | ||
| - ".github/workflows/ws1-gtest-gpu.yml" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ws1-gtest-gpu-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| ws1-gtest: | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 90 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - { gpu_id: "NVIDIA RTX A4000", target_sm: "8.6", name: "sm86-cuda-triton" } | ||
| - { gpu_id: "NVIDIA H100 80GB HBM3", target_sm: "9.0", force_sm90: "1", name: "sm90-c8-execute" } | ||
| steps: | ||
| - name: Checkout the commit under test | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Install runpodctl | ||
| run: | | ||
| wget -qO runpodctl https://github.com/runpod/runpodctl/releases/latest/download/runpodctl-linux-amd64 | ||
| chmod +x runpodctl | ||
| sudo mv runpodctl /usr/local/bin/runpodctl | ||
|
|
||
| - name: Configure runpodctl | ||
| run: runpodctl config --apiKey "${{ secrets.RUNPOD_API_KEY }}" | ||
|
|
||
| - name: Setup SSH key | ||
| run: | | ||
| mkdir -p ~/.ssh && chmod 700 ~/.ssh | ||
| printf '%s\n' "${{ secrets.RUNPOD_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | ||
| chmod 600 ~/.ssh/id_ed25519 | ||
|
|
||
| - name: Run WS1 CUDA/Triton gtest + C8 on RunPod | ||
| env: | ||
| RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} | ||
| PR_REPO_URL: ${{ github.event.pull_request.head.repo.clone_url || github.event.repository.clone_url }} | ||
| PR_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| GPU_ID: ${{ matrix.gpu_id }} | ||
| GPU_COUNT: "1" | ||
| TARGET_SM: ${{ matrix.target_sm }} | ||
| KERNEL_ALIGN_FORCE_SM90: ${{ matrix.force_sm90 }} | ||
| TEST_SUITE: ws1-gtest | ||
| run: bash ci/run_gpu_ci.sh | ||
|
|
||
| - name: Upload C8 execute JSON | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ws1-c8-execute-${{ matrix.name }} | ||
| path: artifacts/ws1-c8-ci.json | ||
| if-no-files-found: error |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Two CI paths degrade the WS1 gate silently instead of failing closed. Both scripts treat a broken or unexpected environment as a valid, weaker configuration. The WS1 contract requires no silent fallback, so each path must fail with a clear message.
ci/run_gpu_ci.sh#L208-L216: ifWS1_WEIGHTS_PATHis set but the directory is absent on the pod, exit with an error instead of downloading into the default/workspace/models/Qwen3-8Bpath.ci/run_ws1_gtest.sh#L38-L48: separate "no CUDA device or probe failure" from "non-Hopper device", and exit non-zero for the former instead of settingHOPPER=0and passing--allow-pending-hopper.📍 Affects 2 files
ci/run_gpu_ci.sh#L208-L216(this comment)ci/run_ws1_gtest.sh#L38-L48🤖 Prompt for AI Agents