Skip to content

LLM package import overhead #88

Open
@sk5268

Description

@sk5268

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions