Repository navigation
feat(gemma4): support Gemma4 in Gemini - #5117
douglas-reid wants to merge 3 commits into
Conversation
|
Hi @douglas-reid , Thank you for your contribution through this pull request! This PR has merge conflicts that require changes from your end. Could you please rebase your branch with the latest main branch to address these? Once this is complete, please let us know so we can proceed with the review. |
Should be done now. Please let me know if more is needed. |
- Update docstrings for Gemma, Gemma3Ollama, and GemmaFunctionCallingMixin to clarify they are Gemma 3-only - Add Gemma 4 usage guidance pointing to Gemini/LiteLlm classes - Add hello_world_gemma4 sample using standard Gemini class - Add header comments and READMEs to existing Gemma 3 samples - Add registry non-collision test for Gemma 4 model strings - Update registration comments in models/__init__.py
51851ba to
c4489eb
Compare
c4489eb to
eae4c1e
Compare
|
@rohityan what else can i do to move this forward? |
|
Hi @douglas-reid, thanks for the PR, we should have gemma support for ADK, but we should not have one sample for each model version, it's ok to have one sample for one model type, e.g gemma in general. |
Merge #5117 The main intent of this PR is to clarify Gemma 3 classes and add Gemma 4 sample now that Gemma 4 is released. As part of that work, this PR adds `gemma-4-*` to the allowlist for Gemini models for use in ADK. This PR: - Adds `gemma-4-*` to the allowlist for Gemini models - Updates docstrings for Gemma, Gemma3Ollama, and GemmaFunctionCallingMixin to clarify they are Gemma 3-only - Adds Gemma 4 usage guidance pointing to Gemini/LiteLlm classes - Adds hello_world_gemma4 sample using standard Gemini class - Adds header comments and READMEs to existing Gemma 3 samples - Adds registry non-collision test for Gemma 4 model strings - Updates registration comments in models/__init__.py ### Testing Plan _Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes._ **Unit Tests:** - [ X ] I have added or updated unit tests for my change. - [ X ] All unit tests pass locally. _Please include a summary of passed `pytest` results._ ``` ❯ pytest tests/unittests/models/test_google_llm.py ... tests/unittests/models/test_google_llm.py ............................................... [100%] ... =============================================================================== 47 passed, 3 warnings in 4.40s =============================================================================== ❯ pytest tests/unittests/models/test_gemma_llm.py .... tests/unittests/models/test_gemma_llm.py ...................... [100%] ===================================================================================== 22 passed in 1.05s ===================================================================================== ``` **Manual End-to-End (E2E) Tests:** Ran `adk run contributing/samples/hello_world_gemma4` with success ### Checklist - [ X ] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [ X ] I have performed a self-review of my own code. - [ X ] I have commented my code, particularly in hard-to-understand areas. - [ X ] I have added tests that prove my fix is effective or that my feature works. - [ X ] New and existing unit tests pass locally with my changes. - [ X ] I have manually tested my changes end-to-end. - [ X ] Any dependent changes have been merged and published in downstream modules. ### Additional context Co-authored-by: George Weale <gweale@google.com> COPYBARA_INTEGRATE_REVIEW=#5117 from douglas-reid:gemma4-docs-clarity 9c90961 PiperOrigin-RevId: 933295498
|
Thank you @douglas-reid for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 573f043. Closing this PR as the changes are now in the main branch. |
Merge google#5117 The main intent of this PR is to clarify Gemma 3 classes and add Gemma 4 sample now that Gemma 4 is released. As part of that work, this PR adds `gemma-4-*` to the allowlist for Gemini models for use in ADK. This PR: - Adds `gemma-4-*` to the allowlist for Gemini models - Updates docstrings for Gemma, Gemma3Ollama, and GemmaFunctionCallingMixin to clarify they are Gemma 3-only - Adds Gemma 4 usage guidance pointing to Gemini/LiteLlm classes - Adds hello_world_gemma4 sample using standard Gemini class - Adds header comments and READMEs to existing Gemma 3 samples - Adds registry non-collision test for Gemma 4 model strings - Updates registration comments in models/__init__.py ### Testing Plan _Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes._ **Unit Tests:** - [ X ] I have added or updated unit tests for my change. - [ X ] All unit tests pass locally. _Please include a summary of passed `pytest` results._ ``` ❯ pytest tests/unittests/models/test_google_llm.py ... tests/unittests/models/test_google_llm.py ............................................... [100%] ... =============================================================================== 47 passed, 3 warnings in 4.40s =============================================================================== ❯ pytest tests/unittests/models/test_gemma_llm.py .... tests/unittests/models/test_gemma_llm.py ...................... [100%] ===================================================================================== 22 passed in 1.05s ===================================================================================== ``` **Manual End-to-End (E2E) Tests:** Ran `adk run contributing/samples/hello_world_gemma4` with success ### Checklist - [ X ] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [ X ] I have performed a self-review of my own code. - [ X ] I have commented my code, particularly in hard-to-understand areas. - [ X ] I have added tests that prove my fix is effective or that my feature works. - [ X ] New and existing unit tests pass locally with my changes. - [ X ] I have manually tested my changes end-to-end. - [ X ] Any dependent changes have been merged and published in downstream modules. ### Additional context Co-authored-by: George Weale <gweale@google.com> COPYBARA_INTEGRATE_REVIEW=google#5117 from douglas-reid:gemma4-docs-clarity 9c90961 PiperOrigin-RevId: 933295498
The main intent of this PR is to clarify Gemma 3 classes and add Gemma 4 sample now that Gemma 4 is released. As part of that work, this PR adds
gemma-4-*to the allowlist for Gemini models for use in ADK.This PR:
gemma-4-*to the allowlist for Gemini modelsTesting Plan
Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.
Unit Tests:
Please include a summary of passed
pytestresults.Manual End-to-End (E2E) Tests:
Ran
adk run contributing/samples/hello_world_gemma4with successChecklist
Additional context