助一刀

助一刀,收集分享拼多多助力群和快速助力刷人的消息,与网友们一起更快助力达成任务提取任务现金。

目录:

1.树莓派gpio扩展板

2.树莓派gpio接口是干什么的

3.树莓派外置gpu

4.树莓派gpio模拟i2c

5.树莓派读取gpio口数据

6.树莓派vga

7.树莓派gpio扩展usb

8.树莓派扩展gpio

9.树莓派打开gpio

10.树莓派上的gpio口是什么

1.树莓派gpio扩展板

机器之心报道编辑:小舟Meta 发布的开源系列模型 LLaMA,将在开源社区的共同努力下发挥出极大的价值Meta 在上个月末发布了一系列开源大模型 ——LLaMA(Large Language Model Meta AI),参数量从 70 亿到 650 亿不等。

2.树莓派gpio接口是干什么的

由于模型参数量较少,只需单张显卡即可运行,LLaMA 因此被称为 ChatGPT 的平替发布以来,已有多位开发者尝试在自己的设备上运行 LLaMA 模型,并分享经验虽然相比于 ChatGPT 等需要大量算力资源的超大规模的语言模型,单张显卡的要求已经很低了,但还能更低!最近有开发者实现了在 MacBook 上运行 LLaMA,还有开发者成功在 4GB RAM 的树莓派上运行了 LLaMA 7B。

3.树莓派外置gpu

这些都得益于一个名为 llama.cpp 的新项目,该项目在 GitHub 上线三天,狂揽 4.6k star。

4.树莓派gpio模拟i2c

项目地址:https://github.com/ggerganov/llama.cppGeorgi Gerganov 是资深的开源社区开发者,曾为 OpenAI 的 Whisper 自动语音识别模型开发 whisper.cpp。

5.树莓派读取gpio口数据

这次,llama.cpp 项目的目标是在 MacBook 上使用 4-bit 量化成功运行 LLaMA 模型,具体包括:没有依赖项的普通 C/C++ 实现;Apple silicon first-class citizen—— 通过 Arm Neon 和 Accelerate 框架;

6.树莓派vga

AVX2 支持 x86 架构;混合 F16 / F32 精度;4-bit 量化支持;在 CPU 上运行llama.cpp 让开发者在没有 GPU 的条件下也能运行 LLaMA 模型项目发布后,很快就有开发者尝试在 MacBook 上运行 LLaMA,并成功在 64GB M2 MacBook Pro 上运行了 LLaMA 7B 和 LLaMA 13B。

7.树莓派gpio扩展usb

在 M2 MacBook 上运行 LLaMA 的方法:https://til.simonwillison.net/llms/llama-7b-m2如果 M2 芯片 MacBook 这个条件还是有点高,没关系,M1 芯片的 MacBook 也可以。

8.树莓派扩展gpio

另一位开发者分享了借助 llama.cpp 在 M1 Mac 上运行 LLaMA 模型的方法

9.树莓派打开gpio

在 M1 Mac 上运行 LLaMA 的方法:https://dev.l1x.be/posts/2023/03/12/using-llama-with-m1-mac/除了在 MacBook 上运行,还有开发者借助 llama.cpp 在 4GB RAM Raspberry Pi 4 上成功运行了 LLaMA 7B 模型。

10.树莓派上的gpio口是什么

Meta 首席 AI 科学家、图灵奖得主 Yann LeCun 也点赞转发了

以上是 3 个在普通硬件设备上成功运行 LLaMA 模型的例子,几位开发者都是借助 llama.cpp 实现的,可见 llama.cpp 项目的实用与强大我们来具体看一下 llama.cpp 的使用方法。

以 7B 模型为例,运行 LLaMA 的大体步骤如下:# build this repogitclone https://github.com/ggerganov/llama.cppcd llama.cpp

make# obtain the original LLaMA model weights and place them in ./modelsls./models65B30B 13B 7B tokenizer_checklist.chk tokenizer.model

# install Python dependenciespython3-m pip install torch numpy sentencepiece# convert the 7B model to ggml FP16 format

python3convert-pth-to-ggml.py models/7B/ 1# quantize the model to 4-bits./quantize.sh7B# run the inference

./main-m ./models/7B/ggml-model-q4_0.bin -t 8 -n 128运行更大的 LLaMA 模型,需要设备有足够的存储空间来储存中间文件如果想获得像 ChatGPT 一样的交互体验,开发者只需要以 – i 作为参数来启动交互模式。

./main-m ./models/13B/ggml-model-q4_0.bin -t 8 -n 256 –repeat_penalty 1.0 –color -i -r “User:” \ -p \ “Transcript of a dialog, where the User interacts with an Assistant named Bob. Bob is helpful, kind, honest, good at writing, and never fails to answer the Users requests immediately and with precision.

User: Hello, Bob.Bob: Hello. How may I help you today?User: Please tell me the largest city in Europe.

Bob: Sure. The largest city in Europe is Moscow, the capital of Russia.User:”使用 –color 区分用户输入和生成文本之后,显示效果如下:

一番操作下来,开发者就能在自己的简单设备上运行 LLaMA 模型,获得类 ChatGPT 的开发体验以下是项目作者 Georgi Gerganov 给出的 LLaMA 7B 模型详细运行示例:make-j

&&./main-m./models/7B/ggml-model-q4_0.bin-p”Building a website can be done in 10 simple steps:”-t8-n512

I llama.cpp build info:I UNAME_S:DarwinI UNAME_P:armI UNAME_M:arm64I CFLAGS:-I.-O3-DNDEBUG-std=c11-fPIC

-pthread-DGGML_USE_ACCELERATEI CXXFLAGS:-I.-I./examples-O3-DNDEBUG-std=c++11-fPIC-pthreadI LDFLAGS:-framework

AccelerateI CC:Appleclangversion14.0.0(clang-1400.0.29.202)ICXX:Appleclangversion14.0.0(clang-1400.0.29.202)

make:Nothingtobedonefor`default.main:seed=1678486056llama_model_load:loadingmodelfrom./models/7B/ggml-model-q4_0.bin

-please wait …llama_model_load:n_vocab=32000llama_model_load:n_ctx=512llama_model_load:n_embd=4096llama_model_load:

n_mult=256llama_model_load:n_head=32llama_model_load:n_layer=32llama_model_load:n_rot=128llama_model_load:

f16=2llama_model_load:n_ff=11008llama_model_load:ggmlctxsize=4529.34MBllama_model_load:memory_size=512.00

MB,n_mem=16384llama_model_load:………………………………donellama_model_load:modelsize=4017.27

MB/numtensors=291main: prompt:Building a website can be done in 10 simple steps:main:numberoftokensin

prompt=151->8893->Build292->ing263-> a4700-> website508-> can367-> be2309-> done297-> in29871->29896->

129900->02560-> simple6576-> steps29901->:sampling parameters:temp=0.800000,top_k=40,top_p=0.950000Building

awebsitecanbedonein10simplesteps:1)Selectadomainnameandwebhostingplan2)Completeasitemap3)Listyourproducts

4)Writeproductdescriptions5)Createauseraccount6)Buildthetemplate7)Startbuildingthewebsite8)Advertisethe

website9)Provideemailsupport10)SubmitthewebsitetosearchenginesAwebsiteisacollectionofwebpagesthatareformatted

withHTML.HTMListhecodethatdefineswhatthewebsitelookslikeandhowitbehaves.TheHTMLcodeisformattedintoatemplate

oraformat.Oncethisisdone,itisdisplayedontheusersbrowser.Thewebpagesarestoredinawebserver.Thewebserver

isalsocalledahost.Whenthewebsiteisaccessed,itisretrievedfromtheserveranddisplayedontheuserscomputer.A

websiteisknownasawebsitewhenitishosted.Thismeansthatitisdisplayedonahost.Thehostisusuallyawebserver.A

websitecanbedisplayedondifferentbrowsers.Thebrowsersarebasicallythesoftwarethatrendersthewebsiteonthe

usersscreen.Awebsitecanalsobeviewedondifferentdevicessuchasdesktops,tabletsandsmartphones.Hence,tohave

awebsitedisplayedonabrowser,thewebsitemustbehosted.Adomainnameisanaddressofawebsite.Itisthenameofthewebsite.The

websiteisknownasawebsitewhenitishosted.Thismeansthatitisdisplayedonahost.Thehostisusuallyawebserver.A

websitecanbedisplayedondifferentbrowsers.Thebrowsersarebasicallythesoftwarethatrendersthewebsiteonthe

user’sscreen.Awebsitecanalsobeviewedondifferentdevicessuchasdesktops,tabletsandsmartphones.Hence,tohave

awebsitedisplayedonabrowser,thewebsitemustbehosted.Adomainnameisanaddressofawebsite.Itisthenameofthewebsite.A

websiteisanaddressofawebsite.ItisacollectionofwebpagesthatareformattedwithHTML.HTMListhecodethatdefines

whatthewebsitelookslikeandhowitbehaves.TheHTMLcodeisformattedintoatemplateoraformat.Oncethisisdone,it

isdisplayedontheuser’sbrowser.Awebsiteisknownasawebsitewhenitishostedmain:mempertoken=14434244bytesmain:

loadtime=1332.48msmain:sampletime=1081.40msmain:predicttime=31378.77ms/61.41mspertokenmain:totaltime=

34036.74ms看来,LLaMA 将在 Meta 和开源社区的共同努力下,成为众多开发者钻研大规模语言模型的入口。

发表评论