Skip to content

Modifying the AutoModelForCausalLM #48

@RDCordova

Description

@RDCordova

I just want to start by saying I love the work that has been done on this project, Here is the issue I'm having

when the model is loaded from HuggingFace using it would be great to be able to select the paramaters of the AutoModelForCausalLM.
self.model = AutoModelForCausalLM.from_pretrained(self.llm)

It works great with small models likee GPT2 but when we advance to larger models (ex mistralai/Mistral-7B-Instruct-v0.1) the GPU quickly runs out of memory . I can generally get around this by using BitsAndBytesConfig to minmize the memory requiered for the LLM but that requires passing addtinal agrumetns to AutoModelForCausalLM ex

model = AutoModelForCausalLM.from_pretrained(
"mistralai/Mistral-7B-Instruct-v0.1",
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions