Skip to content

Updated to latest recommended model (Gemini 1.5 Flash). #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skllm/llm/vertex/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _get_embeddings(self, text: np.ndarray) -> List[List[float]]:


class VertexTunableMixin(BaseTunableMixin):
_supported_tunable_models = ["text-bison@002"]
_supported_tunable_models = ["gemini-1.5-flash"]

def _set_hyperparameters(self, base_model: str, n_update_steps: int, **kwargs):
self.verify_model_is_supported(base_model)
Expand Down
4 changes: 2 additions & 2 deletions skllm/models/vertex/classification/tunable.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class _TunableClassifier(
class VertexClassifier(_TunableClassifier, _SingleLabelMixin):
def __init__(
self,
base_model: str = "text-bison@002",
base_model: str = "gemini-1.5-flash",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe changing the model name for tunable estimators is not enough.

n_update_steps: int = 1,
default_label: str = "Random",
):
Expand All @@ -29,7 +29,7 @@ def __init__(
Parameters
----------
base_model : str, optional
base model to use, by default "text-bison@002"
base model to use, by default "gemini-1.5-flash"
n_update_steps : int, optional
number of epochs, by default 1
default_label : str, optional
Expand Down
8 changes: 4 additions & 4 deletions skllm/models/vertex/classification/zero_shot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ZeroShotVertexClassifier(
):
def __init__(
self,
model: str = "text-bison@002",
model: str = "gemini-1.5-flash",
default_label: str = "Random",
prompt_template: Optional[str] = None,
**kwargs,
Expand All @@ -23,7 +23,7 @@ def __init__(
Parameters
----------
model : str, optional
model to use, by default "text-bison@002"
model to use, by default "gemini-1.5-flash"
default_label : str, optional
default label for failed prediction; if "Random" -> selects randomly based on class frequencies, by default "Random"
prompt_template : Optional[str], optional
Expand All @@ -42,7 +42,7 @@ class MultiLabelZeroShotVertexClassifier(
):
def __init__(
self,
model: str = "text-bison@002",
model: str = "gemini-1.5-flash",
default_label: str = "Random",
prompt_template: Optional[str] = None,
max_labels: Optional[int] = 5,
Expand All @@ -54,7 +54,7 @@ def __init__(
Parameters
----------
model : str, optional
model to use, by default "text-bison@002"
model to use, by default "gemini-1.5-flash"
default_label : str, optional
default label for failed prediction; if "Random" -> selects randomly based on class frequencies, by default "Random"
prompt_template : Optional[str], optional
Expand Down
4 changes: 2 additions & 2 deletions skllm/models/vertex/text2text/tunable.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TunableVertexText2Text(
):
def __init__(
self,
base_model: str = "text-bison@002",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

base_model: str = "gemini-1.5-flash",
n_update_steps: int = 1,
):
"""
Expand All @@ -21,7 +21,7 @@ def __init__(
Parameters
----------
base_model : str, optional
base model to use, by default "text-bison@002"
base model to use, by default "gemini-1.5-flash"
n_update_steps : int, optional
number of epochs, by default 1
"""
Expand Down