JackRyan

Results comments of JackRyan

> 所以其实影响观感速度的原因是因为chatgpt流式输出...

附议,这样才算chat

多个线程同时访问共享数据,导致数据的不一致性。解决这个问题需要允许线程独占地访问共享数据,这就是线程同步。可以使用同步锁来解决这个问题。ChatGLM

> 解决了,多谢@rjk-git 可以参考: #377 stream_generate方法的while True中forward的前面加锁(threadLock.acquire())forward后解锁(threadLock.release())保证只有一个线程跑forward,避免数据竞争。 具体修改如下: 在stream_generate函数中的 while true中 ``` while True: lock.acquire() model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs) # forward pass to get next token outputs = self( **model_inputs, return_dict=True,...

> Try enabling the rounding memory pool. `export MXNET_GPU_MEM_POOL_TYPE=Round` before running the script will enable it. It should help stabilize the memory consumption After using export MXNET_GPU_MEM_POOL_TYPE=Round, the memory consumption...

same error

> same error resolved by running "pip install holoviews --upgrade".