Closed andreducfer closed 10 months ago
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
hi @andreducfer
do you still face this issue with the latest transformers version? pip install -U transformers
Hi @younesbelkada I did a Test with the Transformers version 4.36.0.dev0 and I am still facing the same problems. The log is attached. slurm.log
The issue is that you are passing the quantization config to the tokenizer?
tokenizer = AutoTokenizer.from_pretrained(
MODEL,
cache_dir=MODEL,
token=TOKEN_HF,
device_map="auto",
quantization_config=bnb_config
)
the error tracebacks to the serialization of the tokenizer by saying:
File "/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py", line 2445, in save_pretrained
out_str = json.dumps(tokenizer_config, indent=2, sort_keys=True, ensure_ascii=False) + "\n"
and
TypeError: Object of type BitsAndBytesConfig is not JSON serializable
just don't pass it to the tokenizers.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Hi, Was this issue solved. I'm getting similar error while using SFTTrainer from trl==0.9.6 and transformers==4.44.0
Hi, Was this issue solved. I'm getting similar error while using SFTTrainer from trl==0.9.6 and transformers==4.44.0
The solution given by @ArthurZucker worked for me. Don't pass the quantization config to the tokenizer.
System Info
I am running via script inside a Docker running in a Linux environment.
Who can help?
@younesbelkada this issue is similar but not equal to #24137.
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Bellow is the script used to finetune a LLama2-7b-chat:
Bellow you can see 4 lines of the dataset that I am using:
Expected behavior
I'm trying to use QLoRA for fine-tuning llama2-7b-chat-hf for CASUAL_LM.
I am getting the following error:
This error happened when I started using the parameter gradient_checkpointing=True in the TrainingArguments(). So in the step when saving the checkpoint (in our code example the step 25, because save_steps=25), it gives the error:
TypeError: Object of type BitsAndBytesConfig is not JSON serializable