update pre-commit config (#18860)

This commit is contained in:
SoluMilken
2026-02-16 00:18:31 +08:00
committed by GitHub
parent f7603203b0
commit 07a24f1a38
135 changed files with 239 additions and 198 deletions
+3 -1
View File
@@ -7,7 +7,9 @@ import torch
from sglang.srt.layers.attention.fla.layernorm_gated import (
_layer_norm_fwd as layer_norm_fwd,
)
from sglang.srt.layers.attention.fla.layernorm_gated import rms_norm_ref
from sglang.srt.layers.attention.fla.layernorm_gated import (
rms_norm_ref,
)
def benchmark_layer_norm_fwd(
+2 -8
View File
@@ -13,8 +13,7 @@ number = 5
def expand_tip(topic, tip, generate):
s = (
"""Please expand a tip for a topic into a detailed paragraph.
s = """Please expand a tip for a topic into a detailed paragraph.
Topic: staying healthy
Tip: Regular Exercise
@@ -28,12 +27,7 @@ Topic: writing a blog post
Tip: structure your content effectively
Paragraph: A well-structured post is easier to read and more enjoyable. Start with an engaging introduction that hooks the reader and clearly states the purpose of your post. Use headings and subheadings to break up the text and guide readers through your content. Bullet points and numbered lists can make information more digestible. Ensure each paragraph flows logically into the next, and conclude with a summary or call-to-action that encourages reader engagement.
Topic: """
+ topic
+ "\nTip: "
+ tip
+ "\nParagraph:"
)
Topic: """ + topic + "\nTip: " + tip + "\nParagraph:"
return generate(s, max_tokens=128, stop=["\n\n"])
+2 -8
View File
@@ -14,8 +14,7 @@ number = 5
@sgl.function
def expand_tip(s, topic, tip):
s += (
"""Please expand a tip for a topic into a detailed paragraph.
s += """Please expand a tip for a topic into a detailed paragraph.
Topic: staying healthy
Tip: Regular Exercise
@@ -29,12 +28,7 @@ Topic: writing a blog post
Tip: structure your content effectively
Paragraph: A well-structured post is easier to read and more enjoyable. Start with an engaging introduction that hooks the reader and clearly states the purpose of your post. Use headings and subheadings to break up the text and guide readers through your content. Bullet points and numbered lists can make information more digestible. Ensure each paragraph flows logically into the next, and conclude with a summary or call-to-action that encourages reader engagement.
Topic: """
+ topic
+ "\nTip: "
+ tip
+ "\nParagraph:"
)
Topic: """ + topic + "\nTip: " + tip + "\nParagraph:"
s += sgl.gen("paragraph", max_tokens=128, stop=["\n\n"], temperature=0)
+2 -8
View File
@@ -2,8 +2,7 @@ number = 5
async def expand_tip_async(topic, tip, generate):
s = (
"""Please expand a tip for a topic into a detailed paragraph.
s = """Please expand a tip for a topic into a detailed paragraph.
Topic: staying healthy
Tip: Regular Exercise
@@ -17,12 +16,7 @@ Topic: writing a blog post
Tip: structure your content effectively
Paragraph: A well-structured post is easier to read and more enjoyable. Start with an engaging introduction that hooks the reader and clearly states the purpose of your post. Use headings and subheadings to break up the text and guide readers through your content. Bullet points and numbered lists can make information more digestible. Ensure each paragraph flows logically into the next, and conclude with a summary or call-to-action that encourages reader engagement.
Topic: """
+ topic
+ "\nTip: "
+ tip
+ "\nParagraph:"
)
Topic: """ + topic + "\nTip: " + tip + "\nParagraph:"
return await generate(s, max_tokens=128, stop="\n\n")