not appear to have a file named config.json.

#109
by ArcherChiang - opened

I used BitsAndBytesConfig and LoraConfig to train my model. After training, an error message appeared saying "does not appear to have a file named config.json." Why did my .json file disappear?I use BitsAndBytesConfig, LoraConfig to training my model, and after training it say ' does not appear to have a file named config.json.' why my .json is disappeared

Google org

Hi @ArcherChiang ,

We ran the code in Google Colab and couldn't reproduce the issue. The code should work as expected.

   from peft import replace_lora_weights_loftq
   from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
   from peft import LoraConfig, get_peft_model

   bnb_config = BitsAndBytesConfig(load_in_4bit=True)
   tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
   base_model = AutoModelForCausalLM.from_pretrained("google/gemma-7b", quantization_config=bnb_config)
   lora_config = LoraConfig(task_type="CAUSAL_LM")
   peft_model = get_peft_model(base_model, lora_config)
   replace_lora_weights_loftq(peft_model)

If you're working on your local system, please ensure that when the model attribute is set with an incorrect or erroneous path, it results in an OSError indicating that the config.json file is missing. This error typically suggests that the path to the model folder, where config.json is expected to be found, is incorrect.

The OSError itself indicates that there is likely an issue with the specified path. Ensure that the path to the model directory is accurate and correctly points to the folder containing the necessary configuration files.

Thank you.

Sign up or log in to comment