Commit f5a20eb
fix: LLM - De-hardcoded the
The previously default value (128) was inconsistent with the service-side default values of the models: `code-bison` has 1024 and `code-gecko` has 64.
More so, the default value was out of range of the `code-gecko` model.
This CL fixes these issues.
The SDK now relies on the service-side default values when the user does not pass a parameter value explicitly.
What can change: When using the `code-bison` model, the default value of `max_output_tokens` effectively increases from 128 to 1024 (the current service-side default value).
PiperOrigin-RevId: 559266968max_output_tokens default value for the CodeGenerationModel
1 parent d11b8e6 commit f5a20eb
File tree
2 files changed
+5
-12
lines changed- tests/unit/aiplatform
- vertexai/language_models
2 files changed
+5
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2187 | 2187 | | |
2188 | 2188 | | |
2189 | 2189 | | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
2193 | 2190 | | |
2194 | 2191 | | |
2195 | 2192 | | |
| |||
2213 | 2210 | | |
2214 | 2211 | | |
2215 | 2212 | | |
2216 | | - | |
| 2213 | + | |
2217 | 2214 | | |
2218 | 2215 | | |
2219 | 2216 | | |
| |||
2255 | 2252 | | |
2256 | 2253 | | |
2257 | 2254 | | |
2258 | | - | |
2259 | | - | |
2260 | | - | |
2261 | 2255 | | |
2262 | 2256 | | |
2263 | 2257 | | |
| |||
2278 | 2272 | | |
2279 | 2273 | | |
2280 | 2274 | | |
2281 | | - | |
| 2275 | + | |
2282 | 2276 | | |
2283 | 2277 | | |
2284 | 2278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1686 | 1686 | | |
1687 | 1687 | | |
1688 | 1688 | | |
1689 | | - | |
1690 | 1689 | | |
1691 | 1690 | | |
1692 | 1691 | | |
1693 | 1692 | | |
1694 | 1693 | | |
1695 | 1694 | | |
1696 | | - | |
| 1695 | + | |
1697 | 1696 | | |
1698 | 1697 | | |
1699 | 1698 | | |
| |||
1732 | 1731 | | |
1733 | 1732 | | |
1734 | 1733 | | |
1735 | | - | |
| 1734 | + | |
1736 | 1735 | | |
1737 | 1736 | | |
1738 | 1737 | | |
| |||
1771 | 1770 | | |
1772 | 1771 | | |
1773 | 1772 | | |
1774 | | - | |
| 1773 | + | |
1775 | 1774 | | |
1776 | 1775 | | |
1777 | 1776 | | |
| |||
0 commit comments