fastllm
fastllm copied to clipboard
纯c++的全平台llm加速库,支持python调用,chatglm-6B级模型单卡可达10000+token / s,支持glm, llama, moss基座,手机端流畅运行
解决arm64 windows下编译报错: 
显卡为4090,系统Ubuntu 22.04 驱动和CUDA Driver Version: 550.54.15 CUDA Version: 12.4 python 3.10 尝试用chatglm2、chatglm3、qwen1.5均只能输出 
如题,默认为true,不影响目前chatglm的推理逻辑,为false后,将去除chatglm的special token。 请帮忙review,感谢~
chatglm3-6b 转化的模型,如果提示词变化不大,那么多次生成结果一致。如果我想要每次生成结果随机,是否可以配置呢?目前我运行官方提供的案例fastapiexamples/web_api.py, examples/web_api_client.py,通过配置temperature,tok,top等参数都没有效果。 
【现象】 qwen1.5-14B-Chat模型在解码时报UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1: unexpected end of data。 【描述】 模型输入是:假设f(x)=x,那么f(x)1到2的积分是多少。模型输出的tokenId包含11995、18137,这两个tokenId会导致上述异常。它们在词表中对应的是特殊字符,解码tokenId的方法是:model = pyfastllm.create_llm(model_path); model.weight.tokenizer.decode([11995, 18137])。另外尝试用原始模型的tokenizer解码是可以解码的,只是显示出来的是人类无法理解的字符,它不抛上述解码异常。我觉得1是要处理解码异常的问题,2是生成的tokenId应该是有问题的,即使它们被正常解码出来了,它们似乎与问题也不太相关。 【flm模型转换方法】 from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained(xxx,...
 
我满足所需条件按照步骤运行不成功,没有生成tools文件   请问我应该如何下载
``` Python #流式输出事件生成器 async def chat_stream_event_generator(request: Request, chatStream): for chunck in chatStream: try: if await request.is_disconnected(): print("连接已中断") break start_time = time.time() print(f"{start_time}->{chunck[0]}") yield chunck[0] print(f"{start_time}->写入完成") except (BrokenPipeError, ConnectionResetError) as e:...