Skip to content

Remove dead lce_forward_deprecated path from qwen2#1240

Closed
vaibhavjindal wants to merge 1 commit into
linkedin:mainfrom
vaibhavjindal:cleanup/remove-lce-forward-deprecated-qwen2
Closed

Remove dead lce_forward_deprecated path from qwen2#1240
vaibhavjindal wants to merge 1 commit into
linkedin:mainfrom
vaibhavjindal:cleanup/remove-lce-forward-deprecated-qwen2

Conversation

@vaibhavjindal
Copy link
Copy Markdown
Collaborator

@vaibhavjindal vaibhavjindal commented May 26, 2026


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 deleted the cleanup/remove-lce-forward-deprecated-qwen2 branch May 26, 2026 20:46
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.

1 participant