[PR #1063] [MERGED] Fix TypeError when invoke KLinearCPUInfer.forward() #1546

Closed
opened 2026-10-29 14:53:22 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/ktransformers/pull/1063
Author: @aubreyli
Created: 4/7/2025
Status: ✅ Merged
Merged: 4/7/2025
Merged by: @Azure-Tang

Base: main ← Head: KLinearCPUInfer.forward-fix


📝 Commits (1)

  • 12a4c63 Fix TypeError when invoke KLinearCPUInfer.forward()

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 ktransformers/operators/linear.py (+1 -1)

📄 Description

Fix the following error:

File "/home/aubrey/work/ktransformers/ktransformers/operators/linear.py", line 825, in forward
y = self.generate_linear.forward(x, bsz_tensor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: KLinearCPUInfer.forward() takes 2 positional arguments but 3 were given


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/ktransformers/pull/1063 **Author:** [@aubreyli](https://github.com/aubreyli) **Created:** 4/7/2025 **Status:** ✅ Merged **Merged:** 4/7/2025 **Merged by:** [@Azure-Tang](https://github.com/Azure-Tang) **Base:** `main` ← **Head:** `KLinearCPUInfer.forward-fix` --- ### 📝 Commits (1) - [`12a4c63`](https://github.com/kvcache-ai/ktransformers/commit/12a4c631dfe8234fd70e6453f72a13f25af98ec3) Fix TypeError when invoke KLinearCPUInfer.forward() ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ktransformers/operators/linear.py` (+1 -1) </details> ### 📄 Description Fix the following error: File "/home/aubrey/work/ktransformers/ktransformers/operators/linear.py", line 825, in forward y = self.generate_linear.forward(x, bsz_tensor) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: KLinearCPUInfer.forward() takes 2 positional arguments but 3 were given --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:53:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#1546
No description provided.