没有显卡? cpu跑llama 3.1 405B教程

火山方舟向量数据库大模型

llama 3.1效果有多好,全网铺天盖地的推文,已经无需多言了。

如果是简单试用,可以在huggingface chat上试用https://huggingface.co/chat/models/meta-llama/Meta-Llama-3.1-405B-Instruct-FP8

cpu本地跑,可以试试gguf量化,可以得到1.67 token/s的输出,10 token/s的输入,很慢但是不是不可用~

picture.image

首先下载gguf权重:https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf

权重这么大,怎么快速下载呢?试用Aria2并行下载。

linux: apt install -y aria2 ;Mac: brew install aria2

下载权重:


        
          
aria2c -x 16 -s 16 -k 1M -o meta-405b-inst-cpu-optimized-q4048-00001-of-00006.gguf https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf/resolve/main/meta-405b-inst-cpu-optimized-q4048-00001-of-00006.gguf  
aria2c -x 16 -s 16 -k 1M -o meta-405b-inst-cpu-optimized-q4048-00002-of-00006.gguf https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf/resolve/main/meta-405b-inst-cpu-optimized-q4048-00002-of-00006.gguf  
aria2c -x 16 -s 16 -k 1M -o meta-405b-inst-cpu-optimized-q4048-00003-of-00006.gguf https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf/resolve/main/meta-405b-inst-cpu-optimized-q4048-00003-of-00006.gguf  
aria2c -x 16 -s 16 -k 1M -o meta-405b-inst-cpu-optimized-q4048-00004-of-00006.gguf https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf/resolve/main/meta-405b-inst-cpu-optimized-q4048-00004-of-00006.gguf  
aria2c -x 16 -s 16 -k 1M -o meta-405b-inst-cpu-optimized-q4048-00005-of-00006.gguf https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf/resolve/main/meta-405b-inst-cpu-optimized-q4048-00005-of-00006.gguf  
aria2c -x 16 -s 16 -k 1M -o meta-405b-inst-cpu-optimized-q4048-00006-of-00006.gguf https://huggingface.co/nisten/meta-405b-instruct-cpu-optimized-gguf/resolve/main/meta-405b-inst-cpu-optimized-q4048-00006-of-00006.gguf  

      

然后就可以试用llama.cpp跑起来了


        
          
 ./llama-cli -t 32 --temp 0.4 -fa -m ~/meow/meta-405b-inst-cpu-optimized-q4048-00001-of-00006.gguf -b 512 -c 9000 -p "Adopt the persona of a NASA JPL mathmatician and firendly helpful programmer." -cnv -co -i  

      

占用个246GB。picture.image

PS:给公众号添加【星标⭐️】不迷路!您的点赞、在看、关注 是我坚持的最大动力!

欢迎多多关注公众号「NLP前沿」,加入交流群,交个朋友吧,一起学习,一起进步!

最新文章推荐阅读

RAG全景图:从RAG启蒙到高级RAG之36技,再到终章Agentic RAG!

0
0
0
0
关于作者
关于作者

文章

0

获赞

0

收藏

0

相关资源
火山引擎 EMR 基于 Proton 的存算分离实践
EMR 团队针对这些挑战自研了 Proton 加速引擎,深度优化对象存储读写能力,与 Hive/Spark/Trino 等计算引擎集成后,在不改变用户使用习惯的前提条件下,可提供对象存储数据集的透明加速服务。在离线场景下,其性能基本持平存算一体架构。本次分享将介绍 Proton 技术能力和最佳实践。
相关产品
评论
未登录
看完啦,登录分享一下感受吧~
暂无评论