Skip to content

Commit 3104fab

Browse files
authored
feat!: support gemini-2.0-X, change default llm model to gemini-2.0-flash-001, remove PaLM2TextGenerator and PaLM2TextEmbeddingGenerator (#1558)
* feat!: support gemini-2.0-X, and fix change default llm model to gemini-2.0-flash-001 * get ride of fine-tune change * add a test for gemini-2.0-X * remove PaLM2TextGenerator and PaLM2TextEmbeddingGenerator * remove empty file * remove palma test * remove gen_ai_model_test.py
1 parent 4f91009 commit 3104fab

11 files changed

+376
-2426
lines changed

bigframes/ml/llm.py

+24-537
Large diffs are not rendered by default.

bigframes/ml/loader.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,15 @@
5656

5757
_BQML_ENDPOINT_TYPE_MAPPING = MappingProxyType(
5858
{
59-
llm._TEXT_GENERATOR_BISON_ENDPOINT: llm.PaLM2TextGenerator,
60-
llm._TEXT_GENERATOR_BISON_32K_ENDPOINT: llm.PaLM2TextGenerator,
61-
llm._EMBEDDING_GENERATOR_GECKO_ENDPOINT: llm.PaLM2TextEmbeddingGenerator,
62-
llm._EMBEDDING_GENERATOR_GECKO_MULTILINGUAL_ENDPOINT: llm.PaLM2TextEmbeddingGenerator,
63-
llm._GEMINI_PRO_ENDPOINT: llm.GeminiTextGenerator,
6459
llm._GEMINI_1P5_PRO_PREVIEW_ENDPOINT: llm.GeminiTextGenerator,
6560
llm._GEMINI_1P5_PRO_FLASH_PREVIEW_ENDPOINT: llm.GeminiTextGenerator,
6661
llm._GEMINI_1P5_PRO_001_ENDPOINT: llm.GeminiTextGenerator,
6762
llm._GEMINI_1P5_PRO_002_ENDPOINT: llm.GeminiTextGenerator,
6863
llm._GEMINI_1P5_FLASH_001_ENDPOINT: llm.GeminiTextGenerator,
6964
llm._GEMINI_1P5_FLASH_002_ENDPOINT: llm.GeminiTextGenerator,
7065
llm._GEMINI_2_FLASH_EXP_ENDPOINT: llm.GeminiTextGenerator,
66+
llm._GEMINI_2_FLASH_001_ENDPOINT: llm.GeminiTextGenerator,
67+
llm._GEMINI_2_FLASH_LITE_001_ENDPOINT: llm.GeminiTextGenerator,
7168
llm._CLAUDE_3_HAIKU_ENDPOINT: llm.Claude3TextGenerator,
7269
llm._CLAUDE_3_SONNET_ENDPOINT: llm.Claude3TextGenerator,
7370
llm._CLAUDE_3_5_SONNET_ENDPOINT: llm.Claude3TextGenerator,
@@ -95,8 +92,6 @@ def from_bq(
9592
imported.TensorFlowModel,
9693
imported.ONNXModel,
9794
imported.XGBoostModel,
98-
llm.PaLM2TextGenerator,
99-
llm.PaLM2TextEmbeddingGenerator,
10095
llm.Claude3TextGenerator,
10196
llm.TextEmbeddingGenerator,
10297
llm.MultimodalEmbeddingGenerator,

notebooks/generative_ai/bq_dataframes_llm_gemini_2.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@
369369
"name": "python",
370370
"nbconvert_exporter": "python",
371371
"pygments_lexer": "ipython3",
372-
"version": "3.10.14"
372+
"version": "3.10.15"
373373
}
374374
},
375375
"nbformat": 4,

0 commit comments

Comments
 (0)