mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-26 11:59:32 +00:00
format code
This commit is contained in:
parent
a88e8aa51b
commit
5da4b38964
@ -93,8 +93,8 @@ class ChatGLMAdapater(BaseLLMAdaper):
|
|||||||
AutoModel.from_pretrained(
|
AutoModel.from_pretrained(
|
||||||
model_path, trust_remote_code=True, **from_pretrained_kwargs
|
model_path, trust_remote_code=True, **from_pretrained_kwargs
|
||||||
)
|
)
|
||||||
.half()
|
.half()
|
||||||
.cuda()
|
.cuda()
|
||||||
)
|
)
|
||||||
return model, tokenizer
|
return model, tokenizer
|
||||||
|
|
||||||
|
@ -73,7 +73,9 @@ class ModelWorker:
|
|||||||
for output in self.generate_stream_func(
|
for output in self.generate_stream_func(
|
||||||
self.model, self.tokenizer, params, DEVICE, CFG.MAX_POSITION_EMBEDDINGS
|
self.model, self.tokenizer, params, DEVICE, CFG.MAX_POSITION_EMBEDDINGS
|
||||||
):
|
):
|
||||||
# 生产请不要打开输出!gpt4all线程与父进程共享stdout, 打开会影响前端输出
|
# Please do not open the output in production!
|
||||||
|
# The gpt4all thread shares stdout with the parent process,
|
||||||
|
# and opening it may affect the frontend output.
|
||||||
# print("output: ", output)
|
# print("output: ", output)
|
||||||
ret = {
|
ret = {
|
||||||
"text": output,
|
"text": output,
|
||||||
|
Loading…
Reference in New Issue
Block a user