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

problem: lora_weights data type #671

Open
Alireza3242 opened this issue Dec 25, 2024 · 0 comments
Open

problem: lora_weights data type #671

Alireza3242 opened this issue Dec 25, 2024 · 0 comments

Comments

@Alireza3242
Copy link

Alireza3242 commented Dec 25, 2024

I build my model with bfloat16 for lora data type. But in:
https://github.com/triton-inference-server/tensorrtllm_backend/blob/v0.16.0/all_models/inflight_batcher_llm/tensorrt_llm/1/model.py
lora_weights is float16.

I have to change line 271 in this file:

    if lora_weights is not None:
        kwargs["weights"] = from_numpy(lora_weights).squeeze()

to:

    if lora_weights is not None:
        kwargs["weights"] = from_numpy(lora_weights).squeeze().to(torch.bfloat16)

Can you change these code that work for both float16 and bfloat16

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