Problems with CoT, Coconut, SIM-CoT training

Open
#6 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start with the README and the training configurations for the CoT, Coconut, and SIM-CoT stages, then compare the reported validation-loss and accuracy behavior with the documented procedure. Reproduce the GPT2 training using the stated configuration changes, and consider the issue done when the cause of the metric degradation is identified or the training instructions are corrected.

Written by the indexing model from the issue text.

Description

Hi, thank you for an interesting and insightful work.

I tried to train GPT2 with your code for SIM-CoT reasoning but during training I got strange model behavior.

Image

Firstly, as I understood from README and training configs in order to train a model for SIM-CoT you need 3 stages:

  1. Train in CoT regime using SFT
  2. Train in Coconut regime
  3. Train in SIM-CoT regime

I tried to change as little as possible in your code and configs when I ran my experiments. I just changed precision to bf16 and added tensorboard support. So when I trained model in CoT regime the validation loss wouldn't go below 0.6 and final validation accuracy was just 8 %. Previously, I had already conducted training of GPT2 for CoT using my own code and the model reached validation loss of 0.1 and accuracy of 40 %. I didn't manage to find the problem with your code and the reason why I couldn't reach similar metrics with it. Maybe you had similar issues?

Secondly, when I continued training in Coconut regime the loss behaviour was also strange. With each latent schedule iteration the validation loss would only increase. It reached minimal value early in the training process and after that increased to the absolute value of 1.2 by the end of training. The accuracy bahave correspondingly. It reached the value of 23 % and after that started to decrease up to 16 %. Maybe you could also clarify this beahavior?

I also launched SIM-CoT training (from standard GPT2 checkpoint) and got the same validation loss behaviour as in the case of Coconut training. Only the accuracy was just 4 %.

Thank you in advance for response!

Dominant language
Python
Stars
219
Forks
17
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InternLM/SIM-CoT

All issues in InternLM/SIM-CoT

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.