Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latency is high #29

Open
ben-8878 opened this issue Nov 27, 2024 · 2 comments
Open

latency is high #29

ben-8878 opened this issue Nov 27, 2024 · 2 comments

Comments

@ben-8878
Copy link

use the docker "ghcr.io/coqui-ai/xtts-streaming-server", when post request, I get the follow first chunk time:

Time to make POST: 0.18376178992912173s
Time to first chunk: 0.8716433839872479s

when I use the local inference.
first chunk: 0.2440338134765625s

@VinMing
Copy link

VinMing commented Nov 27, 2024 via email

@ben-8878
Copy link
Author

使用fastapi的时候 deepspeed=True未生效。我改了一下代码强制 deepspeed=True时候报以下错误。

    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    |     return self._call_impl(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    |     return forward_call(*args, **kwargs)
    |   File "/app/TTS/tts/layers/xtts/gpt_inference.py", line 97, in forward
    |     transformer_outputs = self.transformer(
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    |     return self._call_impl(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    |     return forward_call(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/transformers/models/gpt2/modeling_gpt2.py", line 888, in forward
    |     outputs = block(
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    |     return self._call_impl(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    |     return forward_call(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/deepspeed/model_implementations/transformers/ds_transformer.py", line 171, in forward
    |     self.attention(input,
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    |     return self._call_impl(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    |     return forward_call(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/deepspeed/model_implementations/transformers/ds_transformer.py", line 171, in forward
    |     self.attention(input,
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    |     return self._call_impl(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    |     return forward_call(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/deepspeed/ops/transformer/inference/ds_attention.py", line 152, in forward
    |     qkv_out = self.qkv_func(input=input,
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    |     return self._call_impl(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    |     return forward_call(*args, **kwargs)
    |   File "/opt/conda/lib/python3.10/site-packages/deepspeed/ops/transformer/inference/op_binding/qkv_gemm.py", line 82, in forward
    |     output, norm = self.qkv_gemm_func(input, weight, q_scale, bias, gamma, beta, self.config.epsilon, add_bias,
    | RuntimeError: The specified pointer resides on host memory and is not registered with any CUDA device.
    +------------------------------------

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

No branches or pull requests

2 participants