alignment-handbook icon indicating copy to clipboard operation
alignment-handbook copied to clipboard

SmolLM2 minor issues

Open ecntu opened this issue 11 months ago • 0 comments

Hello,

On a fresh conda env install following the README, I get two minor annoyances when trying to run SFT on SmolLM2 with

ACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/deepspeed_zero3.yaml scripts/run_sft.py recipes/smollm2/sft/config_smol.yaml
  1. I get an unused parameter exception for use_flash_attention_2 from H4ArgumentParser. Deleting the corresponding line from the config solves the problem (I think).
  2. I get a ValueError: Chat template is already added to the tokenizer. If you want to overwrite it, please set it to None from the setup_chat_format [here](url). Adding
if hasattr(tokenizer, "chat_template") and tokenizer.chat_template is not None:
    tokenizer.chat_template = None  # Reset the chat template

solves the problem (I think).

I don't know if I am doing something wrong or if the solutions I mentioned are actual solutions.

Thanks

ecntu avatar Feb 13 '25 21:02 ecntu