Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/sglang/srt/models/deepseek_nextn.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def forward(
zero_allocator = BumpAllocator(
buffer_size=2,
dtype=torch.float32,
device=input_ids.device,
device=(
input_embeds.device if input_embeds is not None else input_ids.device
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to update deepseek_nextn?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it has input_embeds field and related logics (if input_embeds is None: ... else: ...), so I do it to be safe.

),
)

if input_embeds is None:
Expand Down
4 changes: 3 additions & 1 deletion python/sglang/srt/models/deepseek_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,9 @@ def forward(
# TODO for two-batch-overlap, we need a larger buffer size
buffer_size=len(self.layers) * 2,
dtype=torch.float32,
device=input_ids.device,
device=(
input_embeds.device if input_embeds is not None else input_ids.device
),
)

if input_embeds is None:
Expand Down
Loading