Skip to content

support quant#540

Open
liusy58 wants to merge 1 commit into
sgl-project:mainfrom
liusy58:quant_support
Open

support quant#540
liusy58 wants to merge 1 commit into
sgl-project:mainfrom
liusy58:quant_support

Conversation

@liusy58
Copy link
Copy Markdown

@liusy58 liusy58 commented Apr 17, 2026

Motivation

Modifications

Related Issues

Accuracy Test

Benchmark & Profiling

Checklist

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for quantization in the SGLang backend by adding a new sglang_quantization argument to the SGLangBackendArgs class. The changes include updating the argument parser, the factory method, and the keyword argument conversion. A review comment suggests accessing the new attribute directly in the from_args method to maintain consistency with existing fields, as the attribute is guaranteed to be present.

Comment thread specforge/args.py
if hasattr(args, "target_batch_size") and hasattr(args, "max_length")
else None
),
sglang_quantization=getattr(args, "sglang_quantization", None),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with the other sglang_* fields in this method (lines 189-200), you should access args.sglang_quantization directly. Since this argument is explicitly added to the parser in the add_args method of this class, it is guaranteed to be present in the args namespace when from_args is called.

Suggested change
sglang_quantization=getattr(args, "sglang_quantization", None),
sglang_quantization=args.sglang_quantization,

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