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

Renamed LLMModel.name to LLMModel.model #47

Closed
wants to merge 1 commit into from
Closed

Conversation

maykcaldas
Copy link
Collaborator

This is just a renaming. No new feature is implemented. Reasoning behind the renaming:
-pqa expects to receive a name to its LLM. This name is used to create the config as litellm.router expects it, if not provided. A model_list is created and added to the config:

{
"model_list": [
                    {
                        "model_name": data["name"],
                        "litellm_params": {
                            "model": data["name"],
                            "n": data["config"].get("n", 1),
                            "temperature": data["config"].get("temperature", 0.1),
                            "max_tokens": data["config"].get("max_tokens", 4096),
                        }
  • ldp uses a model keyword to refer to the name.

I am proposing this change because I think model is more aligned with litellm nomenclature. Then, opening this PR to get feedback on that

@maykcaldas maykcaldas self-assigned this Jan 28, 2025
@maykcaldas maykcaldas requested a review from a team January 28, 2025 18:09
@@ -178,7 +178,7 @@ class LLMModel(ABC, BaseModel):
model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True)

llm_type: str | None = None
name: str
model: str
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel this creates a recursive nature to naming, which is not intuitive to me. I prefer name to model

model = LLMModel(model=model)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the interface is more important than adapter implementations being slightly more confusing. We should just unit test the adapters

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, the repetition on naming is a good point. Maybe because I think of that as llm=LLMModel(model=model), renaming made sense to me.
Gotcha. Will close this PR and keep name

@maykcaldas maykcaldas closed this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants