fastllm icon indicating copy to clipboard operation
fastllm copied to clipboard

纯c++的全平台llm加速库,支持python调用,chatglm-6B级模型单卡可达10000+token / s,支持glm, llama, moss基座,手机端流畅运行

Results 170 fastllm issues
Sort by recently updated
recently updated
newest added

Traceback (most recent call last): File "web_demo3.py", line 9, in <module> model = llm.from_hf(model, tokenizer, dtype = "float16") # dtype支持 "float16", "int8", "int4" File "/home/remotesense/anaconda3/envs/glm/lib/python3.8/site-packages/fastllm_pytools-0.0.1-py3.8.egg/fastllm_pytools/llm.py", line 94, in from_hf return...

![image](https://github.com/ztxz16/fastllm/assets/9248572/2a0ed772-4c63-470e-845c-c40608feb033)

运行chaglm成功,但是测试baichuan2-7b-chat出错 测试代码: import sys from transformers import AutoModelForCausalLM, AutoTokenizer from transformers.generation.utils import GenerationConfig model_path = '/data/zhoukai/open_models/Baichuan/Baichuan2-7B-Chat' model = AutoModelForCausalLM.from_pretrained(model_path, device_map='cpu', trust_remote_code=True) tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) model.generation_config = GenerationConfig.from_pretrained(model_path) from build.tools.fastllm_pytools...

如果在进程里kill掉相关程序,容易导致显卡驱动崩溃,需要硬重启,想问问是什么原因以及是否有释放模型的接口

修正错误的脚本路径。

用lima数据集微调了两个简单版本,一个使用baichuan2模板,一个使用vicuna模板。 用transformer模式大致能推理,但是转换后使用stream_response接口返回很混乱。 用stream_response时能有办法指定模板吗?

看代码中有 `DataType::BFLOAT16` 类型的逻辑 但在flm格式转换,和 `hf_model` 中都没有bfloat16 格式的支持, 希望能够打通整个 bfloat16 格式的支持

例如: https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat-4bits 目前 `torch2flm` 内部还是将已经量化的模型转换为float16,再按标准方式进行量化的。速度很慢 这其中还容易遇到除0错误。 希望能够直接适配转换这种已经按照量化发布的模型,快速导入,并且自动设置 c_min c_max等。

![image](https://github.com/ztxz16/fastllm/assets/75319189/9c97a0c6-949c-4cce-af4e-f42bc2c83787) 像上图红框框的位置,原来是cpu,代码运行成功,但我想把模型加载在cuda:0卡上,把"cpu"改成"cuda:0"后,报下面这个错误了,要怎么改,才能让模型部署到gpu上呢? ![image](https://github.com/ztxz16/fastllm/assets/75319189/11489a6c-dc46-4ae2-8354-c4b839c62ae8) 另外,也尝试了下面这种方式,模型依旧不能加载到cuda0卡上,大佬指点一下吧 ![image](https://github.com/ztxz16/fastllm/assets/75319189/4b5e2a43-6df2-4461-be35-c303c5c43917)