minor: Add basic editorconfig and pre-commit hooks to enforce style for whitespaces (#1926)

This commit is contained in:
Xuehai Pan
2024-11-06 21:46:04 +08:00
committed by GitHub
parent 96766101b4
commit a5e0defb5a
77 changed files with 209 additions and 172 deletions

File diff suppressed because one or more lines are too long

0
test/srt/models/test_generation_models.py Executable file → Normal file
View File

View File

@@ -45,7 +45,7 @@ TORCH_DTYPES = [torch.float16]
PROMPTS = [
"""
### Instruction:
Write a poem about the transformers Python library.
Write a poem about the transformers Python library.
Mention the word "large language models" in that poem.
### Response:
The Transformers are large language models,

View File

@@ -53,7 +53,7 @@ class TestDataParallelism(unittest.TestCase):
# pause a few seconds then send again
time.sleep(5)
response = requests.post(
self.base_url + "/update_weights",
json={"model_path": DEFAULT_MODEL_NAME_FOR_TEST},

View File

@@ -11,9 +11,9 @@ from sglang.test.test_utils import (
)
MANY_NEW_TOKENS_PROMPT = """
Please write an extremely detailed and vivid fantasy story, set in a world full of intricate magic systems, political intrigue, and complex characters.
Ensure that you thoroughly describe every scene, character's motivations, and the environment. Include long, engaging dialogues and elaborate on the inner thoughts of the characters.
Each section should be as comprehensive as possible to create a rich and immersive experience for the reader.
Please write an extremely detailed and vivid fantasy story, set in a world full of intricate magic systems, political intrigue, and complex characters.
Ensure that you thoroughly describe every scene, character's motivations, and the environment. Include long, engaging dialogues and elaborate on the inner thoughts of the characters.
Each section should be as comprehensive as possible to create a rich and immersive experience for the reader.
The story should span multiple events, challenges, and character developments over time. Aim to make the story at least 3,000 words long.
"""
@@ -109,7 +109,7 @@ class TestMatchedStop(unittest.TestCase):
llama_format_prompt = """
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>
What is 2 + 2?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
"""
eos_token_id = 128009