Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

What's the usage of num_logits_to_keep? #6

@FuRuF-11

Description

@FuRuF-11

I was trying to run train.py with Qwen2.5 1.5B. And a error occurred.

File "/home/comp/xxxxx/miniconda3/envs/rex/lib/python3.12/site-packages/torch/amp/autocast_mode.py", line 44, in decorate_autocast
return func(args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/comp/xxxxx/PathIndependent/OpenCoconut/opencoconut/models/qwen2.py", line 368, in forward
outputs = forward_fn(
^^^^^^^^^^^
File "/home/comp/xxxxx/PathIndependent/OpenCoconut/opencoconut/models/qwen2.py", line 329, in train_forward
outputs = super().forward(
^^^^^^^^^^^^^^^^
TypeError: Qwen2ForCausalLM.forward() got an unexpected keyword argument 'num_logits_to_keep'

So I just deleted num_logits_to_keep in qwen2.py. Then the program ran.

But I am still confused about the usage of num_logits_to_keep.

And I am also worried that simply delete this arg will lead to another bug.

I would be very grateful if you could relieve my confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions