beyondllm icon indicating copy to clipboard operation
beyondllm copied to clipboard

LLM package import overhead

Open sk5268 opened this issue 1 year ago • 1 comments

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 avatar Dec 30 '24 12:12 sk5268

@tarun-aiplanet @arya-aiplanet

sk5268 avatar Dec 30 '24 12:12 sk5268