5行命令教你在MAC上撸个AI问答系统

安装

# 耐心等待
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugin wasi_nn-ggml

# After install the wasmedge, you have to activate the environment.
# Assuming you use zsh (the default shell on macOS), you will need to run the following command
source $HOME/.zshenv

curl -LO https://github.com/second-state/WasmEdge-WASINN-examples/blob/master/wasmedge-ggml-llama-interactive/wasmedge-ggml-llama-interactive.wasm

# 文件大、下载慢、耐心等待
curl -LO https://huggingface.co/TheBloke/Llama-2-7b-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_M.gguf

启动

# 耐心等待
wasmedge --dir .:. \  --nn-preload default:GGML:CPU:llama-2-7b-chat.Q5_K_M.gguf \  wasmedge-ggml-llama-interactive.wasm default

当启动成功时,你会看到提示词“Question:“

使用

输入任何你想提问的问题即可。

image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容