josStorer / RWKV-Runner

A RWKV management and startup tool, full automation, only 8MB. And provides an interface compatible with the OpenAI API. RWKV is a large language model that is fully open source and available for commercial use.
https://www.rwkv.com
MIT License
5.28k stars 503 forks source link

模型运行成功,但发的所有消息都显示network error,控制台显示报错。 #336

Open LinWeiM opened 6 months ago

LinWeiM commented 6 months ago

2024-05-10_102640

C:\Work\backend-python\rwkv_pip\model.py:2012: UserWarning: operator () profile_node %361 : int = prim::profile_ivalue(%359) does not have profile information (Triggered internally at ..\torch\csrc\jit\codegen\cuda\graph_fuser.cpp:109.) r, k, v, g, w, xxx, ss = self.v6_0_before( INFO: 127.0.0.1:53765 - "POST /switch-model HTTP/1.1" 200 OK INFO: None:0 - "POST /v1/chat/completions HTTP/1.1" 200 OK max_tokens=1000 temperature=1.0 top_p=0.3 presence_penalty=0.0 frequency_penalty=1.0 penalty_decay=0.996 top_k=0 global_penalty=False ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Work\py310\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "C:\Work\py310\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "C:\Work\py310\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\cors.py", line 83, in call await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 762, in call await self.middleware_stack(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 782, in app await route.handle(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 297, in handle await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 75, in app await response(scope, receive, send) File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 233, in call async with anyio.create_task_group() as task_group: File "C:\Work\py310\Lib\site-packages\anyio_backends_asyncio.py", line 597, in aexit raise exceptions[0] File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 236, in wrap await func() File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 221, in stream_response async for data in self.body_iterator: File "C:\Work\backend-python\routes\completion.py", line 154, in eval_rwkv for response, delta, prompt_tokens, completion_tokens in model.generate( File "C:\Work\backend-python\utils\rwkv.py", line 273, in generate token = self.pipeline.sample_logits( File "C:\Work\backend-python\rwkv_pip\utils.py", line 143, in sample_logits out = torch.multinomial(probs, num_samples=1)[0] RuntimeError: probability tensor contains either inf, nan or element < 0 INFO: None:0 - "POST /v1/chat/completions HTTP/1.1" 200 OK max_tokens=1000 temperature=1.0 top_p=0.3 presence_penalty=0.0 frequency_penalty=1.0 penalty_decay=0.996 top_k=0 global_penalty=False ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Work\py310\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "C:\Work\py310\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "C:\Work\py310\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\cors.py", line 83, in call await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 762, in call await self.middleware_stack(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 782, in app await route.handle(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 297, in handle await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 75, in app await response(scope, receive, send) File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 233, in call async with anyio.create_task_group() as task_group: File "C:\Work\py310\Lib\site-packages\anyio_backends_asyncio.py", line 597, in aexit raise exceptions[0] File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 236, in wrap await func() File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 221, in stream_response async for data in self.body_iterator: File "C:\Work\backend-python\routes\completion.py", line 154, in eval_rwkv for response, delta, prompt_tokens, completion_tokens in model.generate( File "C:\Work\backend-python\utils\rwkv.py", line 273, in generate token = self.pipeline.sample_logits( File "C:\Work\backend-python\rwkv_pip\utils.py", line 143, in sample_logits out = torch.multinomial(probs, num_samples=1)[0] RuntimeError: probability tensor contains either inf, nan or element < 0 INFO: None:0 - "POST /v1/chat/completions HTTP/1.1" 200 OK max_tokens=1000 temperature=1.0 top_p=0.3 presence_penalty=0.0 frequency_penalty=1.0 penalty_decay=0.996 top_k=0 global_penalty=False ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Work\py310\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "C:\Work\py310\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\fastapi\applications.py", line 1054, in call await super().call(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\errors.py", line 186, in call raise exc File "C:\Work\py310\Lib\site-packages\starlette\middleware\errors.py", line 164, in call await self.app(scope, receive, _send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\cors.py", line 83, in call await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 762, in call await self.middleware_stack(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 782, in app await route.handle(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 297, in handle await self.app(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 64, in wrapped_app raise exc File "C:\Work\py310\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "C:\Work\py310\Lib\site-packages\starlette\routing.py", line 75, in app await response(scope, receive, send) File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 233, in call async with anyio.create_task_group() as task_group: File "C:\Work\py310\Lib\site-packages\anyio_backends_asyncio.py", line 597, in aexit raise exceptions[0] File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 236, in wrap await func() File "C:\Work\py310\Lib\site-packages\sse_starlette\sse.py", line 221, in stream_response async for data in self.body_iterator: File "C:\Work\backend-python\routes\completion.py", line 154, in eval_rwkv for response, delta, prompt_tokens, completion_tokens in model.generate( File "C:\Work\backend-python\utils\rwkv.py", line 273, in generate token = self.pipeline.sample_logits( File "C:\Work\backend-python\rwkv_pip\utils.py", line 143, in sample_logits out = torch.multinomial(probs, num_samples=1)[0] RuntimeError: probability tensor contains either inf, nan or element < 0

LinWeiM commented 6 months ago

image image

josStorer commented 6 months ago

换成webgpu或者WebGPU(Python)跑