Parcourir la source

Fix infer warmup (#530)

* fully support ormsgpack

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* dependency

* torch==2.4.1 windows compilable

* Update docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove autorerank

* api usage

* back slash

* fix docs

* Fix infer warmup params

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* max_new_tokens=1024

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
spicysama il y a 1 an
Parent
commit
4ae0d0734c
3 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 2 1
      tools/api.py
  2. 1 0
      tools/smart_pad.py
  3. 2 2
      tools/webui.py

+ 2 - 1
tools/api.py

@@ -424,7 +424,8 @@ if __name__ == "__main__":
                 text="Hello world.",
                 references=[],
                 reference_id=None,
-                max_new_tokens=0,
+                max_new_tokens=1024,
+                chunk_length=200,
                 top_p=0.7,
                 repetition_penalty=1.2,
                 temperature=0.7,

+ 1 - 0
tools/smart_pad.py

@@ -12,6 +12,7 @@ from tools.file import AUDIO_EXTENSIONS, list_files
 
 threshold = 10 ** (-50 / 20.0)
 
+
 def process(file):
     waveform, sample_rate = torchaudio.load(str(file), backend="sox")
     if waveform.size(0) > 1:

+ 2 - 2
tools/webui.py

@@ -471,8 +471,8 @@ if __name__ == "__main__":
             enable_reference_audio=False,
             reference_audio=None,
             reference_text="",
-            max_new_tokens=2048,
-            chunk_length=100,
+            max_new_tokens=1024,
+            chunk_length=200,
             top_p=0.7,
             repetition_penalty=1.2,
             temperature=0.7,