Skip to content

Commit 18632ae

Browse files
authored
fix(generative-ai): update text-bison stable version to 002 (GoogleCloudPlatform#11229)
1 parent 754f8fe commit 18632ae

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

generative_ai/classify_news_items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def classify_news_items(temperature: float = 0.2) -> None:
2727
"top_k": 1, # A top_k of 1 means the selected token is the most probable among all tokens.
2828
}
2929

30-
model = TextGenerationModel.from_pretrained("text-bison@001")
30+
model = TextGenerationModel.from_pretrained("text-bison@002")
3131
response = model.predict(
3232
"""What is the topic for a given news headline?
3333
- business

generative_ai/evaluate_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def evaluate_model(
3434
vertexai.init(project=project_id, location=location, credentials=credentials)
3535

3636
# Create a reference to a generative AI model
37-
model = TextGenerationModel.from_pretrained("text-bison@001")
37+
model = TextGenerationModel.from_pretrained("text-bison@002")
3838

3939
# Define the evaluation specification for a text classification task
4040
task_spec = EvaluationTextClassificationSpec(

generative_ai/extraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def extractive_question_answering(
3333
"top_k": 1, # A top_k of 1 means the selected token is the most probable among all tokens.
3434
}
3535

36-
model = TextGenerationModel.from_pretrained("text-bison@001")
36+
model = TextGenerationModel.from_pretrained("text-bison@002")
3737
response = model.predict(
3838
"""Background: There is evidence that there have been significant changes \
3939
in Amazon rainforest vegetation over the last 21,000 years through the Last \

generative_ai/ideation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def interview(
3333
"top_k": 40, # A top_k of 1 means the selected token is the most probable among all tokens.
3434
}
3535

36-
model = TextGenerationModel.from_pretrained("text-bison@001")
36+
model = TextGenerationModel.from_pretrained("text-bison@002")
3737
response = model.predict(
3838
"Give me ten interview questions for the role of program manager.",
3939
**parameters,

generative_ai/list_tuned_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def list_tuned_models(
2525
"""List tuned models."""
2626

2727
vertexai.init(project=project_id, location=location)
28-
model = TextGenerationModel.from_pretrained("text-bison@001")
28+
model = TextGenerationModel.from_pretrained("text-bison@002")
2929
tuned_model_names = model.list_tuned_model_names()
3030
print(tuned_model_names)
3131

generative_ai/sentiment_analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def sentiment_analysis(
3333
"top_k": 1, # A top_k of 1 means the selected token is the most probable among all tokens.
3434
}
3535

36-
model = TextGenerationModel.from_pretrained("google/text-bison@001")
36+
model = TextGenerationModel.from_pretrained("text-bison@002")
3737
response = model.predict(
3838
"""I had to compare two versions of Hamlet for my Shakespeare class and \
3939
unfortunately I picked this version. Everything from the acting (the actors \

generative_ai/summarization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def text_summarization(
3333
"top_k": 40, # A top_k of 1 means the selected token is the most probable among all tokens.
3434
}
3535

36-
model = TextGenerationModel.from_pretrained("text-bison@001")
36+
model = TextGenerationModel.from_pretrained("text-bison@002")
3737
response = model.predict(
3838
"""Provide a summary with about two sentences for the following article:
3939
The efficient-market hypothesis (EMH) is a hypothesis in financial \

generative_ai/tuning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def tuning(
6969
eval_spec.tensorboard = aiplatform.Tensorboard(
7070
tensorboard_name=tensorboard_instance_name
7171
)
72-
model = TextGenerationModel.from_pretrained("text-bison@001")
72+
model = TextGenerationModel.from_pretrained("text-bison@002")
7373

7474
model.tune_model(
7575
training_data=training_data,

0 commit comments

Comments
 (0)