[Gemma3] Update integration test expected values for A10G (#48036)
* [Gemma3] Update integration test expected values for A10G (CUDA 8.6)
Update 4 failing Gemma3IntegrationTest expected values on A10G runners:
- test_model_4b_batch ("cuda", (8,6)) batch[0]: "clear turquoise water...It looks like" → "turquoise water...It looks like a"
- test_model_4b_crops ("cuda", (8,6)): curly apostrophe U+2019 → straight U+0027 in "There's"
- test_model_4b_batch_crops ("cuda", (8,6)): same apostrophe fix
- test_model_1b_text_only ("cuda", 8): "data flows, a silent stream..." → "data streams, a boundless flow..."
All actual outputs verified by running pytest -s with explicit print(output_text) on A10G
runners at both Sep-23 commit (7258ea44bc) and today's main (0650ff3545).
test_model_4b_crops/batch_crops/1b_text_only produce identical outputs at both commits
(stale expected values); test_model_4b_batch drifted due to attention masking fix
(1f3294c82c, "Fix bidirectional attention masking crossing sliding window boundaries").
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [Generation] Restore explicit cache_implementation='hybrid' override in generate()
Commit a81e04a923 moved the hybrid→None conversion unconditionally after all
kwargs are merged, so explicitly passing cache_implementation="hybrid" to
generate() now silently falls back to dynamic cache.
Fix: only unset hybrid when the user did NOT explicitly pass cache_implementation
via generate() kwargs, restoring the original intent (override model Hub defaults
but respect explicit user requests).
This fixes test_dynamic_sliding_window_is_default which asserts that explicitly
passing cache_implementation="hybrid" uses the static hybrid cache (not dynamic).
Regression introduced by a81e04a923, first observed in CI on Dec 19 2025.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [Gemma3] Fix syntax error: switch single-quoted string to double quotes
There's (straight apostrophe U+0027) inside a single-quoted string terminates
the string early. Use double quotes for the ("cuda", (8,6)) entry in
test_model_4b_crops to avoid the SyntaxError.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [Gemma3] Fix test_model_4b_batch_crops: restore curly apostrophe U+2019
Dynamic cache produces curly apostrophe (U+2019) in There's; static cache
produces straight (U+0027). test_model_4b_batch_crops uses dynamic cache so
the expected value needs curly apostrophe, not straight.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* [Gemma3] Revert generation/utils.py fix; update test to reflect hybrid→dynamic behavior
`cache_implementation="hybrid"` is always overridden to dynamic (by design,
per #40039 / #40135). Update assertNotIn → assertIn and drop the
`not in kwargs` guard from utils.py.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com> Y
Yih-Dar committed
ff09c381890ffd7850292a11c4121dd1c7b05ceb
Parent: e801869
Committed by GitHub <noreply@github.com>
on 8/18/2026, 1:31:28 PM