Skip to content
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

[TLM] Add o3-mini #355

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions cleanlab_studio/internal/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"o1-preview",
"o1",
"o1-mini",
"o3-mini",
"claude-3-haiku",
"claude-3.5-haiku",
"claude-3-sonnet",
Expand All @@ -37,3 +38,4 @@
TLM_VALID_LOG_OPTIONS: Set[str] = {"perplexity", "explanation"}
TLM_VALID_GET_TRUSTWORTHINESS_SCORE_KWARGS: Set[str] = {"perplexity"}
TLM_VALID_KWARGS: Set[str] = {"constrain_outputs"}
TLM_MODELS_NOT_SUPPORTING_EXPLANATION: Set[str] = {"o1-mini", "o1-preview", "o1", "o3-mini"}
5 changes: 5 additions & 0 deletions cleanlab_studio/internal/tlm/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
TLM_VALID_GET_TRUSTWORTHINESS_SCORE_KWARGS,
TLM_VALID_KWARGS,
TLM_VALID_LOG_OPTIONS,
TLM_MODELS_NOT_SUPPORTING_EXPLANATION,
)

SKIP_VALIDATE_TLM_OPTIONS: bool = (
Expand Down Expand Up @@ -251,6 +252,10 @@ def validate_tlm_options(options: Any) -> None:

invalid_log_options = set(val) - TLM_VALID_LOG_OPTIONS

model = options.get("model", _TLM_DEFAULT_MODEL)
if "explanation" in val and model in TLM_MODELS_NOT_SUPPORTING_EXPLANATION:
raise ValidationError(f"Explanation is not supported for this model: {model}. ")

if invalid_log_options:
raise ValidationError(
f"Invalid options for log: {invalid_log_options}. Valid options include: {TLM_VALID_LOG_OPTIONS}"
Expand Down
5 changes: 3 additions & 2 deletions cleanlab_studio/studio/trustworthy_language_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,10 @@ class TLMOptions(TypedDict):
You can set custom values for these arguments regardless of the quality preset specified.

Args:
model ({"gpt-4o-mini", "gpt-4o", "o1", "o1-mini", "o1-preview", "gpt-3.5-turbo-16k", "gpt-4", "claude-3.5-sonnet-v2", "claude-3.5-sonnet", "claude-3.5-haiku", "claude-3-haiku", "nova-micro", "nova-lite", "nova-pro"}, default = "gpt-4o-mini"):
model ({"gpt-4o-mini", "gpt-4o", "o3-mini", "o1", "o1-mini", "o1-preview", "gpt-3.5-turbo-16k", "gpt-4", "claude-3.5-sonnet-v2",
"claude-3.5-sonnet", "claude-3.5-haiku", "claude-3-haiku", "nova-micro", "nova-lite", "nova-pro"}, default = "gpt-4o-mini"):
Underlying base LLM to use (better models yield better results, faster models yield faster/cheaper results).
- Models still in beta: "o1", "o1-mini", "claude-3.5-sonnet-v2", "claude-3.5-haiku", "nova-micro", "nova-lite", "nova-pro".
- Models still in beta: "o1", "o3-mini", "o1-mini", "claude-3.5-sonnet-v2", "claude-3.5-haiku", "nova-micro", "nova-lite", "nova-pro".
- Recommended models for accuracy: "gpt-4o", "o1", "claude-3.5-sonnet-v2".
- Recommended models for low latency/costs: "nova-micro", "gpt-4o-mini".

Expand Down
2 changes: 2 additions & 0 deletions tests/tlm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"o1-preview",
"o1",
"o1-mini",
"o3-mini",
"nova-lite",
"nova-pro",
]
Expand All @@ -39,6 +40,7 @@
"o1-preview",
"o1",
"o1-mini",
"o3-mini",
"nova-micro",
"nova-lite",
"nova-pro",
Expand Down