TinyLLaVA / TinyLLaVA_Factory

A Framework of Small-scale Large Multimodal Models
https://arxiv.org/abs/2402.14289
Apache License 2.0
658 stars 68 forks source link

Error about save model #6

Closed xushilin1 closed 8 months ago

xushilin1 commented 9 months ago

Hi, I encountered this error while fine-tuning the TinyLlaVA. I am using transformers==4.37.2, and can you help me solve this problem? Thanks a lot.

Traceback (most recent call last): File "/home/xsl/miniconda3/envs/dev/lib/python3.8/site-packages/transformers/trainer.py", line 2873, in save_model self._save(output_dir, state_dict=state_dict) File "/data/home/xsl/project/DistillLLaVA/tinyllava/train/llava_trainer.py", line 272, in _save super(LLaVATrainer, self)._save(output_dir, state_dict) File "/home/xsl/miniconda3/envs/dev/lib/python3.8/site-packages/transformers/trainer.py", line 2958, in _save self.model.save_pretrained( File "/home/xsl/miniconda3/envs/dev/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2364, in save_pretrained model_to_save.generation_config.save_pretrained(save_directory) File "/home/xsl/miniconda3/envs/dev/lib/python3.8/site-packages/transformers/generation/configuration_utils.py", line 560, in save_pretrained raise ValueError( ValueError: The generation config instance is invalid -- .validate() throws warnings and/or exceptions. Fix these issues to save the configuration.

baichuanzhou commented 9 months ago

May I see your training setup and your environment?

xushilin1 commented 9 months ago
tokenizers==0.13.2
transformers==4.37.2
pytorch==1.13.1+cu116

Can you tell me the environment you used for training?

baichuanzhou commented 9 months ago

Our version of the tokenizers is 0.15.1, and torch is 2.0.1. We recommend following the requirements to set up your environment.😊