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