Skip to content

Remove dead lce_forward_deprecated path from qwen2#1241

Merged
vaibhavjindal merged 1 commit into
mainfrom
cleanup/remove-lce-forward-deprecated-qwen2
May 26, 2026
Merged

Remove dead lce_forward_deprecated path from qwen2#1241
vaibhavjindal merged 1 commit into
mainfrom
cleanup/remove-lce-forward-deprecated-qwen2

Conversation

@vaibhavjindal
Copy link
Copy Markdown
Collaborator

@vaibhavjindal vaibhavjindal commented May 26, 2026

Summary

Cleaning up lce_forward_deprecated in qwen2.py as it is not being used anywhere.

Testing Done

  • Hardware Type: NVIDIA GeForce RTX 4090
  • run make test to ensure correctness
  • run make checkstyle to ensure code style
  • run make test-convergence to ensure convergence

lce_forward_deprecated in transformers/model/qwen2.py was the pre-
logits_to_keep codepath. It has had zero references in src/, test/, or
benchmark/ for some time and the active lce_forward right below it has
been the only one wired into the monkey patch. Removing it also drops
four imports that only it used (CrossEntropyLoss, CausalLMOutputWithPast,
LigerFusedLinearCrossEntropyLoss, and the redundant blank line).

Net: -120 LOC, no behavior change.
@vaibhavjindal vaibhavjindal added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit bbbafc9 May 26, 2026
10 of 14 checks passed
@vaibhavjindal vaibhavjindal deleted the cleanup/remove-lce-forward-deprecated-qwen2 branch May 26, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants