boun-tabi-LMG / turkish-lm-tuner

Turkish LM Tuner
https://boun-tabi-lmg.github.io/turkish-lm-tuner/
MIT License
76 stars 6 forks source link

Fixes in Fine-Tuning Script #10

Closed gokceuludogan closed 10 months ago

gokceuludogan commented 10 months ago

This pull request introduces a series of bug fixes to the NER fine-tuning script. The changes are detailed as follows:

  1. Commit 7a5c4e5c60c2f04d71c64022f62b0c17f14b3e8a:

    • A new configuration setting has been added to facilitate debugging. When this setting is used, validation is executed at every 100 steps, unlike the default configuration.
  2. Commit 0d2ace48a36f433df826714858ca202855e64cbb:

    • Set the generation of outputs during validation as a configurable parameter in the default configuration.
  3. Commit c00e7d633ca95abd77f8df612b05a4452b80603a:

    • Transitioned from using the generic Trainer class to Seq2SeqTrainer. This change was necessary to support generation during training, something the default trainer does not accommodate.
  4. Commit b7ab3b8daf74dc74ef49f950ee47def2eeb68e68:

    • Resolved an issue where a rouge key error was occurring.
  5. Commit 452eec8fd783a259155719ba1ba6aae4ec1a8439:

    • Made corrections to the postprocess_text function.
    • Added debug print statements to provide more insights during the execution.
gokceuludogan commented 10 months ago

Nice changes, I wonder, will it be too frequent to make validation every 100 steps for larger downstream datasets? Other than that integration with wandb, Seq2SeqTrainer changes are really nice, thank you :)

Since most datasets are small, it makes sense to validate every 100 steps. The eval_steps parameter can be adjusted for specific dataset/task configurations. I used that configuration to check for errors during preprocessing, to ensure the labels and predictions are reasonable, and to observe if the loss decreases. Therefore, specific steps are not necessary for these purposes.