-
Notifications
You must be signed in to change notification settings - Fork 621
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
[Proposal] Weak model proposal #1363
Comments
Hi @mrT23, Please take a look at this proposal. If it's reasonable, I would like to open a PR to do so. |
@KennyDizi thanks for the idea. the original intention of the 'turbo' model was supposed to be like this, but during the process it turned out to be something a bit different. I am trying to understand the proposed code, and I am not sure I understand it. def _get_all_models(model_type: ModelType = ModelType.REGULAR) -> List[str]:
if model_type == ModelType.WEAK and get_settings().config.model_weak:
model = get_settings().config.model_weak
else:
model = get_settings().config.model
fallback_models = get_settings().config.fallback_models
if not isinstance(fallback_models, list):
fallback_models = [m.strip() for m in fallback_models.split(",")]
all_models = [model] + fallback_models
return all_models meaning if we define some operation as one that can accept a what do you think about this logic ? |
@mrT23 hi, that's a good one.
|
By the way this PR description has written by model |
@KennyDizi my suggestion is this:
def _get_all_models(allow_weak_model=False) -> List[str]:
if allow_weak_model and get_settings().config.model_weak:
model = get_settings().config.model_weak
else:
model = get_settings().config.model
fallback_models = get_settings().config.fallback_models
if not isinstance(fallback_models, list):
fallback_models = [m.strip() for m in fallback_models.split(",")]
all_models = [model] + fallback_models
return all_models |
That's a good idea, I will start to work on it soon @mrT23 |
Start to implement it. |
Close this as completed. |
In some cases, e.g., generate PR description, PR update change log, PR add docs, PR generates labels,... the model like:
claude-3-5-haiku-20241022
,gpt-4o-mini-2024-07-18
, ... are intelligent enough to take on the requirements. This is the cheapest and fastest version of its provider. Therefore, I suggest a solution to this idea. It looks like this:model_weak
to the configuration section, for example:retry_with_fallback_models
, like this:await retry_with_fallback_models(self._prepare_prediction, model_type=ModelType.WEAK)
_get_all_models
to perform get all modelsThe text was updated successfully, but these errors were encountered: