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

bug OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run git lfs install followed by git lfs pull in the folder you cloned. #38

Open
ucas010 opened this issue Sep 25, 2023 · 2 comments

Comments

@ucas010
Copy link

ucas010 commented Sep 25, 2023

python main.py --base_model model/chatglm-6b

Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:06<00:00, 1.30it/s]
2023-09-25 17:02:43,232 [INFO] [SentenceTransformer.py:66] Load pretrained SentenceTransformer: ./text2vec/text2vec-large-chinese/
2023-09-25 17:02:43,232 [WARNING] [SentenceTransformer.py:805] No sentence-transformers model found with name ./text2vec/text2vec-large-chinese/. Creating a new one with MEAN pooling.
Traceback (most recent call last):
File "/data/sg/lib/python3.9/site-packages/transformers/modeling_utils.py", line 415, in load_state_dict
return torch.load(checkpoint_file, map_location="cpu")
File "/data/sg/lib/python3.9/site-packages/torch/serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/data/sg/lib/python3.9/site-packages/torch/serialization.py", line 1002, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/g/LexiLaw/demo/main.py", line 26, in
application = LangChainApplication(config)
File "/data/g/LexiLaw/demo/clc/langchain_application.py", line 26, in init
self.source_service = SourceService(config)
File "/data/g/LexiLaw/demo/clc/source_service.py", line 25, in init
self.embeddings = HuggingFaceEmbeddings(model_name=self.config.embedding_model_name)
File "/data/sg/lib/python3.9/site-packages/langchain/embeddings/huggingface.py", line 54, in init
self.client = sentence_transformers.SentenceTransformer(
File "/data/sg/lib/python3.9/site-packages/sentence_transformers/SentenceTransformer.py", line 97, in init
modules = self._load_auto_model(model_path)
File "/data/sg/lib/python3.9/site-packages/sentence_transformers/SentenceTransformer.py", line 806, in _load_auto_model
transformer_model = Transformer(model_name_or_path)
File "/data/sg/lib/python3.9/site-packages/sentence_transformers/models/Transformer.py", line 29, in init
self._load_model(model_name_or_path, config, cache_dir)
File "/data/sg/lib/python3.9/site-packages/sentence_transformers/models/Transformer.py", line 49, in _load_model
self.auto_model = AutoModel.from_pretrained(model_name_or_path, config=config, cache_dir=cache_dir)
File "/data/sg/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 464, in from_pretrained
return model_class.from_pretrained(
File "/data/sg/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2301, in from_pretrained
state_dict = load_state_dict(resolved_archive_file)
File "/data/sg/lib/python3.9/site-packages/transformers/modeling_utils.py", line 420, in load_state_dict
raise OSError(
OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run git lfs install followed by git lfs pull in the folder you cloned.

@ucas010
Copy link
Author

ucas010 commented Sep 25, 2023

模型文件咋放啊?
ls model/
chatglm-6b LexiLaw_finetune readme.md

@ucas010
Copy link
Author

ucas010 commented Sep 25, 2023

python inference_ptuning.py

AttributeError: 'ChatGLMModel' object has no attribute 'prefix_encoder'

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

1 participant