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

Abstraction for resolve_torch_dtype_device(dtype: Dtype, device: Device) -> tuple[quantization_type, torch.device, torch.dtype] #424

Open
michaelfeil opened this issue Oct 14, 2024 · 1 comment

Comments

@michaelfeil
Copy link
Owner

Feature request

Too much boilerplate template:

Resolves loading, quantization, and device

Eg. if
device: auto -> torch.cuda.is_available() -> cuda or mps.
dtype: float32 -> float32, no quantization
dtype: float16 -> float16, no quantization
dtype: bfloat16 -> float16, no quantization
dtype: auto -> (bfloat16 if possible else float16) if device is cuda else float32, no quantization
dtype: int8 -> float32, int8 quantization
dtype: fp8 -> float32, fp8 quantization

Motivation

Your contribution

@EricLiclair
Copy link

@michaelfeil I believe this method should exist as a method of

class __Infinity_EnvManager:

or a method in the same file?

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

2 participants