mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
try except removed
This commit is contained in:
parent
bb8e9d726b
commit
6f5b554043
@ -992,16 +992,13 @@ class GgufModelTests(unittest.TestCase):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# You need to have an FP16 version of your GGUF model for accurate comparison
|
# You need to have an FP16 version of your GGUF model for accurate comparison
|
||||||
try:
|
|
||||||
converted_model = AutoModelForCausalLM.from_pretrained(
|
converted_model = AutoModelForCausalLM.from_pretrained(
|
||||||
self.deci_model_id,
|
self.deci_model_id,
|
||||||
gguf_file=self.fp16_deci_model_id,
|
gguf_file=self.fp16_deci_model_id,
|
||||||
torch_dtype=torch.float16,
|
torch_dtype=torch.float16,
|
||||||
device_map="auto",
|
device_map="auto",
|
||||||
)
|
)
|
||||||
except Exception as e:
|
|
||||||
self.skipTest(f"GGUF FP16 model not available: {e}")
|
|
||||||
return
|
|
||||||
|
|
||||||
converted_state_dict = converted_model.state_dict()
|
converted_state_dict = converted_model.state_dict()
|
||||||
original_state_dict = original_model.state_dict()
|
original_state_dict = original_model.state_dict()
|
||||||
|
Loading…
Reference in New Issue
Block a user