本文主要是介绍大模型LLM 在线量化;GPTQ\AWQ量化及推理,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、大模型LLM 在线量化
参考:https://www.cnblogs.com/bruceleely/p/17348782.html
trust_remote_code=True 一般都需要加上,不然会报错(Tokenizer class QWenTokenizer does not exist or is not currently imported)
##8bit
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).quantize(8)
这篇关于大模型LLM 在线量化;GPTQ\AWQ量化及推理的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!