We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
torch==2.0.0 peft==0.3.0.dev0
My code will report a traceback. I'm not sure if it's a version issue.
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /root/luotuoQA/server_start.py:13 in │ │ │ │ 10 with_origin_model: bool = True │ │ 11 │ │ 12 │ │ ❱ 13 model = get_model(model_name, peft_path) │ │ 14 origin_model = None │ │ 15 if with_origin_model: │ │ 16 │ origin_model = get_model(model_name) │ │ │ │ /root/luotuoQA/luotuo_qa/app/infer.py:21 in get_model │ │ │ │ 18 │ torch.set_default_tensor_type(torch.cuda.HalfTensor) │ │ 19 │ model = AutoModel.from_pretrained(model_name, trust_remote_code=True, device_map='au │ │ 20 │ if peft_path is not None and peft_path != "": │ │ ❱ 21 │ │ model = PeftModel.from_pretrained(model, peft_path) │ │ 22 │ return model │ │ 23 │ │ 24 def format_context(story, question): │ │ │ │ in from_pretrained:157 │ │ │ │ /usr/local/lib/python3.10/site-packages/torch/serialization.py:815 in load │ │ │ │ 812 │ │ │ │ return _legacy_load(opened_file, map_location, _weights_only_unpickler, │ │ 813 │ │ │ except RuntimeError as e: │ │ 814 │ │ │ │ raise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None │ │ ❱ 815 │ │ return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args │ │ 816 │ │ 817 │ │ 818 # Register pickling support for layout instances such as │ │ │ │ /usr/local/lib/python3.10/site-packages/torch/serialization.py:1033 in _legacy_load │ │ │ │ 1030 │ │ │ f"Received object of type "{type(f)}". Please update to Python 3.8.2 or ne │ │ 1031 │ │ │ "functionality.") │ │ 1032 │ │ │ ❱ 1033 │ magic_number = pickle_module.load(f, **pickle_load_args) │ │ 1034 │ if magic_number != MAGIC_NUMBER: │ │ 1035 │ │ raise RuntimeError("Invalid magic number; corrupt file?") │ │ 1036 │ protocol_version = pickle_module.load(f, **pickle_load_args) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ UnpicklingError: invalid load key, 'v'.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
torch==2.0.0
peft==0.3.0.dev0
My code will report a traceback.
I'm not sure if it's a version issue.
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /root/luotuoQA/server_start.py:13 in │
│ │
│ 10 with_origin_model: bool = True │
│ 11 │
│ 12 │
│ ❱ 13 model = get_model(model_name, peft_path) │
│ 14 origin_model = None │
│ 15 if with_origin_model: │
│ 16 │ origin_model = get_model(model_name) │
│ │
│ /root/luotuoQA/luotuo_qa/app/infer.py:21 in get_model │
│ │
│ 18 │ torch.set_default_tensor_type(torch.cuda.HalfTensor) │
│ 19 │ model = AutoModel.from_pretrained(model_name, trust_remote_code=True, device_map='au │
│ 20 │ if peft_path is not None and peft_path != "": │
│ ❱ 21 │ │ model = PeftModel.from_pretrained(model, peft_path) │
│ 22 │ return model │
│ 23 │
│ 24 def format_context(story, question): │
│ │
│ in from_pretrained:157 │
│ │
│ /usr/local/lib/python3.10/site-packages/torch/serialization.py:815 in load │
│ │
│ 812 │ │ │ │ return _legacy_load(opened_file, map_location, _weights_only_unpickler, │
│ 813 │ │ │ except RuntimeError as e: │
│ 814 │ │ │ │ raise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None │
│ ❱ 815 │ │ return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args │
│ 816 │
│ 817 │
│ 818 # Register pickling support for layout instances such as │
│ │
│ /usr/local/lib/python3.10/site-packages/torch/serialization.py:1033 in _legacy_load │
│ │
│ 1030 │ │ │ f"Received object of type "{type(f)}". Please update to Python 3.8.2 or ne │
│ 1031 │ │ │ "functionality.") │
│ 1032 │ │
│ ❱ 1033 │ magic_number = pickle_module.load(f, **pickle_load_args) │
│ 1034 │ if magic_number != MAGIC_NUMBER: │
│ 1035 │ │ raise RuntimeError("Invalid magic number; corrupt file?") │
│ 1036 │ protocol_version = pickle_module.load(f, **pickle_load_args) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UnpicklingError: invalid load key, 'v'.
The text was updated successfully, but these errors were encountered: