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

How can we use CPU offloading when using AutoModelForCausalLM and THUDM/cogvlm2-llama3-chat-19B #35751

Open
FurkanGozukara opened this issue Jan 17, 2025 · 0 comments
Labels

Comments

@FurkanGozukara
Copy link

FurkanGozukara commented Jan 17, 2025

It is working great with below however still not sufficient. Uses around 16 GB VRAM

I want to further lower the requirement if possible

How can I achieve that?

model path is : THUDM/cogvlm2-llama3-chat-19B

                    model = AutoModelForCausalLM.from_pretrained(
                        MODEL_PATH,
                        torch_dtype=TORCH_TYPE,
                        trust_remote_code=True,
                        quantization_config=BitsAndBytesConfig(load_in_4bit=True),
                        low_cpu_mem_usage=True
                    ).eval()

Who can help?

text models: @ArthurZucker
vision models: @amyeroberts, @qubvel
pipelines: @Rocketknight1
quantization (bitsandbytes, autogpt): @SunMarc @MekkCyber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant