diff --git a/backends/exllamav2/grammar.py b/backends/exllamav2/grammar.py index 47c5ed5..f9bb464 100644 --- a/backends/exllamav2/grammar.py +++ b/backends/exllamav2/grammar.py @@ -95,8 +95,11 @@ class ExLlamaV2Grammar: # Validate KBNF and create formatter f = FormatterBuilder() f.append_line( - f"""{f.extractor(lambda nonterminal: - CFGExtractor(nonterminal, kbnf_string))}""" + f"""{ + f.extractor( + lambda nonterminal: CFGExtractor(nonterminal, kbnf_string) + ) + }""" ) except Exception: logger.error( diff --git a/common/model.py b/common/model.py index 0241d4a..44a35fa 100644 --- a/common/model.py +++ b/common/model.py @@ -151,8 +151,7 @@ async def load_model_gen(model_path: pathlib.Path, **kwargs): ) else: raise ValueError( - f"Invalid backend '{backend}'. " - f"Available backends: {available_backends}" + f"Invalid backend '{backend}'. Available backends: {available_backends}" ) logger.info(f"Using backend {backend}") diff --git a/endpoints/Kobold/utils/generation.py b/endpoints/Kobold/utils/generation.py index 0d345d8..f08e758 100644 --- a/endpoints/Kobold/utils/generation.py +++ b/endpoints/Kobold/utils/generation.py @@ -103,8 +103,7 @@ async def stream_generation(data: GenerateRequest, request: Request): ) except Exception: yield get_generator_error( - f"Kobold generation {data.genkey} aborted. " - "Please check the server console." + f"Kobold generation {data.genkey} aborted. Please check the server console." ) diff --git a/endpoints/OAI/types/embedding.py b/endpoints/OAI/types/embedding.py index 860c3ed..41419c4 100644 --- a/endpoints/OAI/types/embedding.py +++ b/endpoints/OAI/types/embedding.py @@ -15,8 +15,7 @@ class EmbeddingsRequest(BaseModel): ) encoding_format: str = Field( "float", - description="Encoding format for the embeddings. " - "Can be 'float' or 'base64'.", + description="Encoding format for the embeddings. Can be 'float' or 'base64'.", ) model: Optional[str] = Field( None, @@ -31,7 +30,7 @@ class EmbeddingObject(BaseModel): ..., description="Embedding values as a list of floats." ) index: int = Field( - ..., description="Index of the input text corresponding to " "the embedding." + ..., description="Index of the input text corresponding to the embedding." ) diff --git a/tests/wheel_test.py b/tests/wheel_test.py index 1fcd9be..733c618 100644 --- a/tests/wheel_test.py +++ b/tests/wheel_test.py @@ -7,16 +7,14 @@ successful_packages = [] errored_packages = [] if find_spec("flash_attn") is not None: - print( - f"Flash attention on version {version('flash_attn')} " "successfully imported" - ) + print(f"Flash attention on version {version('flash_attn')} successfully imported") successful_packages.append("flash_attn") else: print("Flash attention 2 is not found in your environment.") errored_packages.append("flash_attn") if find_spec("exllamav2") is not None: - print(f"Exllamav2 on version {version('exllamav2')} " "successfully imported") + print(f"Exllamav2 on version {version('exllamav2')} successfully imported") successful_packages.append("exllamav2") else: print("Exllamav2 is not found in your environment.")