[Migration] Migrate bitsandbytes support to OOT plugin (#43529)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> Signed-off-by: Isotr0py <Isotr0py@outlook.com>
This commit is contained in:
+1
-4
@@ -521,10 +521,7 @@ class HfRunner:
|
||||
):
|
||||
model = model.to(dtype=self.dtype)
|
||||
|
||||
if (
|
||||
getattr(model, "quantization_method", None) != "bitsandbytes"
|
||||
and len({p.device for p in model.parameters()}) < 2
|
||||
):
|
||||
if len({p.device for p in model.parameters()}) < 2:
|
||||
model = model.to(device=self.device)
|
||||
|
||||
self.model = model
|
||||
|
||||
Reference in New Issue
Block a user