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

LLM package import overhead #88

Open
sk5268 opened this issue Dec 30, 2024 · 1 comment
Open

LLM package import overhead #88

sk5268 opened this issue Dec 30, 2024 · 1 comment

Comments

@sk5268
Copy link

sk5268 commented Dec 30, 2024

Issue

when we import the llm classes:

from beyondllm.llm import somemodel

the __init__.py kicks in which is import all the llm classes in that package

For reference, here is the __init__.py file (src/beyondllm/llm/)

from .base import BaseLLMModel
from .hf import HuggingFaceHubModel
from .gemini import GeminiModel
from .chatopenai import ChatOpenAIModel
from .azurechat import AzureOpenAIModel
from .ollama import OllamaModel
from .multimodal import GeminiMultiModal
from .gpt4o import GPT4oOpenAIModel
from .chatgroq import GroqModel
from .claude import ClaudeModel
from .mistral import MistralModel
from .cohere import CohereModel  
from .together import TogetherModel 

Is it necessary for init.py to import all the models when it is not necessary?

@sk5268
Copy link
Author

sk5268 commented Dec 30, 2024

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

No branches or pull requests

1 participant