Skip to content

Commit bc8afd5

Browse files
justinchubyCopilot
andcommitted
Add small-model GGUF runtime evidence
Add pinned SmolLM and SmolLM2 F16 GGUF L4/L5 cases with immutable artifact, reference, tensor-census, import-route, and golden provenance checks. Exercise CLI save/reload, full-logit prefill and cache-threaded decode parity, deterministic generation, and wire exact level-specific cases into affected-model and fast integration CI selection. Pin every HuggingFace reference resource, validate L5 provenance independently, and fail closed for malformed or unmappable evidence selectors. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent 9703140 commit bc8afd5

18 files changed

Lines changed: 1147 additions & 53 deletions

‎.github/workflows/gpu_l4_golden_parity.yml‎

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,30 @@ on:
88
inputs:
99
affected_models:
1010
description: >-
11-
JSON array of model names. Empty string or empty array runs all models.
11+
JSON array of model types.
12+
Empty string or empty array runs all models.
13+
required: false
14+
type: string
15+
default: ""
16+
affected_cases:
17+
description: JSON array of exact golden case IDs.
1218
required: false
1319
type: string
1420
default: ""
1521
workflow_call:
1622
inputs:
1723
affected_models:
1824
description: >-
19-
JSON array of affected model names (e.g. '["qwen2", "llama"]').
25+
JSON array of affected model types (e.g. '["qwen2", "llama"]').
2026
Empty string or empty array means run all models.
2127
required: false
2228
type: string
2329
default: ""
30+
affected_cases:
31+
description: JSON array of exact golden case IDs.
32+
required: false
33+
type: string
34+
default: ""
2435
secrets:
2536
HF_TOKEN:
2637
required: false
@@ -84,9 +95,13 @@ jobs:
8495
env:
8596
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8697
MOBIUS_TEST_DEVICE: cuda
98+
AFFECTED_MODELS: ${{ inputs.affected_models }}
99+
AFFECTED_CASES: ${{ inputs.affected_cases }}
87100
run: |
88-
AFFECTED='${{ inputs.affected_models }}'
89-
if [ -z "$AFFECTED" ] || [ "$AFFECTED" = "[]" ]; then
101+
AFFECTED="$AFFECTED_MODELS"
102+
CASES="$AFFECTED_CASES"
103+
if { [ -z "$AFFECTED" ] || [ "$AFFECTED" = "[]" ]; } && \
104+
{ [ -z "$CASES" ] || [ "$CASES" = "[]" ]; }; then
90105
echo "Running all L4 golden comparison tests"
91106
pytest tests/e2e_golden_test.py \
92107
-m golden \
@@ -96,21 +111,31 @@ jobs:
96111
--cov=src --cov-report=xml --cov-branch \
97112
--tb=short
98113
else
99-
echo "Running L4 golden tests for affected models: $AFFECTED"
100-
# Convert JSON array to comma-separated list for --models
101-
MODELS=$(echo "$AFFECTED" | python -c "import json, sys; print(','.join(json.load(sys.stdin)))")
102-
if [ -n "$MODELS" ]; then
103-
pytest tests/e2e_golden_test.py \
114+
if [ -n "$AFFECTED" ] && [ "$AFFECTED" != "[]" ]; then
115+
echo "Running L4 golden tests for affected models: $AFFECTED"
116+
# Convert JSON array to comma-separated list for --models
117+
MODELS=$(echo "$AFFECTED" | python -c "import json, sys; print(','.join(json.load(sys.stdin)))")
118+
if [ -n "$MODELS" ]; then
119+
pytest tests/e2e_golden_test.py \
120+
-m golden \
121+
-v \
122+
--models "$MODELS" \
123+
--timeout=300 \
124+
--junitxml=junit-l4-models.xml \
125+
--cov=src --cov-report=xml --cov-branch \
126+
--tb=short \
127+
|| { rc=$?; if [ $rc -eq 5 ]; then echo "No matching tests found — skipping"; else exit $rc; fi; }
128+
fi
129+
fi
130+
if [ -n "$CASES" ] && [ "$CASES" != "[]" ]; then
131+
echo "Running L4 golden tests for exact cases: $CASES"
132+
MOBIUS_GOLDEN_CASES="$CASES" pytest tests/e2e_golden_test.py \
104133
-m golden \
105134
-v \
106-
--models "$MODELS" \
107135
--timeout=300 \
108-
--junitxml=junit-l4.xml \
109-
--cov=src --cov-report=xml --cov-branch \
110-
--tb=short \
111-
|| { rc=$?; if [ $rc -eq 5 ]; then echo "No matching tests found — skipping"; else exit $rc; fi; }
112-
else
113-
echo "No affected models — skipping"
136+
--junitxml=junit-l4-cases.xml \
137+
--cov=src --cov-append --cov-report=xml --cov-branch \
138+
--tb=short
114139
fi
115140
fi
116141
timeout-minutes: 60
@@ -128,12 +153,12 @@ jobs:
128153
token: ${{ secrets.CODECOV_TOKEN }}
129154
flags: gpu-l4
130155
report-type: test_results
131-
files: junit-l4.xml
156+
files: junit-l4*.xml
132157

133158
- name: Upload test results
134159
if: always() && steps.check_golden.outputs.has_golden == 'true'
135160
uses: actions/upload-artifact@v7
136161
with:
137162
name: gpu-l4-test-results
138-
path: junit-l4.xml
163+
path: junit-l4*.xml
139164
retention-days: 30

‎.github/workflows/gpu_l5_generation_e2e.yml‎

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,30 @@ on:
88
inputs:
99
affected_models:
1010
description: >-
11-
JSON array of model names. Empty string or empty array runs all models.
11+
JSON array of model types.
12+
Empty string or empty array runs all models.
13+
required: false
14+
type: string
15+
default: ""
16+
affected_cases:
17+
description: JSON array of exact golden case IDs.
1218
required: false
1319
type: string
1420
default: ""
1521
workflow_call:
1622
inputs:
1723
affected_models:
1824
description: >-
19-
JSON array of affected model names (e.g. '["qwen2", "llama"]').
25+
JSON array of affected model types (e.g. '["qwen2", "llama"]').
2026
Empty string or empty array means run all models.
2127
required: false
2228
type: string
2329
default: ""
30+
affected_cases:
31+
description: JSON array of exact golden case IDs.
32+
required: false
33+
type: string
34+
default: ""
2435
secrets:
2536
HF_TOKEN:
2637
required: false
@@ -72,9 +83,13 @@ jobs:
7283
env:
7384
HF_TOKEN: ${{ secrets.HF_TOKEN }}
7485
MOBIUS_TEST_DEVICE: cuda
86+
AFFECTED_MODELS: ${{ inputs.affected_models }}
87+
AFFECTED_CASES: ${{ inputs.affected_cases }}
7588
run: |
76-
AFFECTED='${{ inputs.affected_models }}'
77-
if [ -z "$AFFECTED" ] || [ "$AFFECTED" = "[]" ]; then
89+
AFFECTED="$AFFECTED_MODELS"
90+
CASES="$AFFECTED_CASES"
91+
if { [ -z "$AFFECTED" ] || [ "$AFFECTED" = "[]" ]; } && \
92+
{ [ -z "$CASES" ] || [ "$CASES" = "[]" ]; }; then
7893
echo "Running all L5 generation E2E tests"
7994
pytest tests/e2e_golden_test.py \
8095
-m generation \
@@ -84,21 +99,31 @@ jobs:
8499
--cov=src --cov-report=xml --cov-branch \
85100
--tb=short
86101
else
87-
echo "Running L5 generation tests for affected models: $AFFECTED"
88-
# Convert JSON array to comma-separated list for --models
89-
MODELS=$(echo "$AFFECTED" | python -c "import json, sys; print(','.join(json.load(sys.stdin)))")
90-
if [ -n "$MODELS" ]; then
91-
pytest tests/e2e_golden_test.py \
102+
if [ -n "$AFFECTED" ] && [ "$AFFECTED" != "[]" ]; then
103+
echo "Running L5 generation tests for affected models: $AFFECTED"
104+
# Convert JSON array to comma-separated list for --models
105+
MODELS=$(echo "$AFFECTED" | python -c "import json, sys; print(','.join(json.load(sys.stdin)))")
106+
if [ -n "$MODELS" ]; then
107+
pytest tests/e2e_golden_test.py \
108+
-m generation \
109+
-v \
110+
--models "$MODELS" \
111+
--timeout=300 \
112+
--junitxml=junit-l5-models.xml \
113+
--cov=src --cov-report=xml --cov-branch \
114+
--tb=short \
115+
|| { rc=$?; if [ $rc -eq 5 ]; then echo "No matching tests found — skipping"; else exit $rc; fi; }
116+
fi
117+
fi
118+
if [ -n "$CASES" ] && [ "$CASES" != "[]" ]; then
119+
echo "Running L5 generation tests for exact cases: $CASES"
120+
MOBIUS_GOLDEN_CASES="$CASES" pytest tests/e2e_golden_test.py \
92121
-m generation \
93122
-v \
94-
--models "$MODELS" \
95123
--timeout=300 \
96-
--junitxml=junit-l5.xml \
97-
--cov=src --cov-report=xml --cov-branch \
98-
--tb=short \
99-
|| { rc=$?; if [ $rc -eq 5 ]; then echo "No matching tests found — skipping"; else exit $rc; fi; }
100-
else
101-
echo "No affected models — skipping"
124+
--junitxml=junit-l5-cases.xml \
125+
--cov=src --cov-append --cov-report=xml --cov-branch \
126+
--tb=short
102127
fi
103128
fi
104129
timeout-minutes: 60
@@ -116,12 +141,12 @@ jobs:
116141
token: ${{ secrets.CODECOV_TOKEN }}
117142
flags: gpu-l5
118143
report-type: test_results
119-
files: junit-l5.xml
144+
files: junit-l5*.xml
120145

121146
- name: Upload test results
122147
if: always()
123148
uses: actions/upload-artifact@v7
124149
with:
125150
name: gpu-l5-test-results
126-
path: junit-l5.xml
151+
path: junit-l5*.xml
127152
retention-days: 30

‎.github/workflows/main.yml‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ jobs:
3232
runs-on: ubuntu-latest
3333
outputs:
3434
affected: ${{ steps.detect.outputs.affected }}
35+
golden_l4_cases: ${{ steps.detect.outputs.golden_l4_cases }}
36+
golden_l5_cases: ${{ steps.detect.outputs.golden_l5_cases }}
3537
run_all: ${{ steps.detect.outputs.run_all }}
3638
has_affected: ${{ steps.detect.outputs.has_affected }}
39+
has_l4_affected: ${{ steps.detect.outputs.has_l4_affected }}
40+
has_l5_affected: ${{ steps.detect.outputs.has_l5_affected }}
3741
steps:
3842
- uses: actions/checkout@v7
3943
with:
@@ -124,7 +128,7 @@ jobs:
124128
if: >-
125129
always() && !cancelled() &&
126130
(needs.detect-affected.result == 'failure' ||
127-
needs.detect-affected.outputs.has_affected == 'true')
131+
needs.detect-affected.outputs.has_l4_affected == 'true')
128132
steps:
129133
- uses: actions/checkout@v7
130134
- name: Setup Python
@@ -190,10 +194,11 @@ jobs:
190194
if: >-
191195
always() && !cancelled() &&
192196
(needs.detect-affected.result == 'failure' ||
193-
needs.detect-affected.outputs.has_affected == 'true')
197+
needs.detect-affected.outputs.has_l4_affected == 'true')
194198
uses: ./.github/workflows/gpu_l4_golden_parity.yml
195199
with:
196200
affected_models: ${{ needs.detect-affected.outputs.affected }}
201+
affected_cases: ${{ needs.detect-affected.outputs.golden_l4_cases }}
197202
secrets:
198203
HF_TOKEN: ${{ secrets.HF_TOKEN }}
199204
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -204,10 +209,11 @@ jobs:
204209
if: >-
205210
always() && !cancelled() &&
206211
(needs.detect-affected.result == 'failure' ||
207-
needs.detect-affected.outputs.has_affected == 'true')
212+
needs.detect-affected.outputs.has_l5_affected == 'true')
208213
uses: ./.github/workflows/gpu_l5_generation_e2e.yml
209214
with:
210215
affected_models: ${{ needs.detect-affected.outputs.affected }}
216+
affected_cases: ${{ needs.detect-affected.outputs.golden_l5_cases }}
211217
secrets:
212218
HF_TOKEN: ${{ secrets.HF_TOKEN }}
213219
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -273,7 +279,7 @@ jobs:
273279
uses: actions/cache@v6
274280
with:
275281
path: ~/.cache/huggingface
276-
key: hf-integration-fast-${{ hashFiles('tests/integration_test.py') }}
282+
key: hf-integration-fast-${{ hashFiles('tests/integration_test.py', 'tests/gguf_small_model_runtime_integration_test.py') }}
277283
restore-keys: |
278284
hf-integration-fast-
279285
- name: Install PyTorch CUDA
@@ -290,8 +296,8 @@ jobs:
290296
env:
291297
HF_TOKEN: ${{ secrets.HF_TOKEN }}
292298
run: |
293-
pytest tests/integration_test.py -m integration_fast -v \
294-
-k "smollm-135m or albert-base or t5-small or dinov2-small or wav2vec2-base or whisper-tiny or test_gemma3_multimodal or test_qwen35 or test_qwen3_next or test_deepseek or test_sam_vit or test_ocr2" \
299+
pytest tests/integration_test.py tests/gguf_small_model_runtime_integration_test.py -m integration_fast -v \
300+
-k "smollm-135m or smollm2-135m-instruct-f16 or albert-base or t5-small or dinov2-small or wav2vec2-base or whisper-tiny or test_gemma3_multimodal or test_qwen35 or test_qwen3_next or test_deepseek or test_sam_vit or test_ocr2" \
295301
--cov=src --cov-report=xml --cov-branch --junitxml junit.xml
296302
timeout-minutes: 15
297303
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)