当前位置: 首页 > news >正文

wordpress qa专业培训seo的机构

wordpress qa,专业培训seo的机构,组网方案,seo的排名机制前些天发现了一个巨牛的人工智能学习网站#xff0c;通俗易懂#xff0c;风趣幽默#xff0c;忍不住分享一下给大家#xff0c; 可以当故事来看#xff0c;轻松学习。 离了 ChatGPT 本人简直寸步难行#xff0c;今天 ChatGPT 大面积宕机#xff0c;服务直到文章写作通俗易懂风趣幽默忍不住分享一下给大家 可以当故事来看轻松学习。 离了 ChatGPT 本人简直寸步难行今天 ChatGPT 大面积宕机服务直到文章写作下午5点时尚未恢复抓耳挠腮了一下午。已经习惯了用 AI 的我们该怎么办呢 答案就是——自己在本地运行一个大模型只要电脑不关机服务就一直在 那么怎么在自己电脑上轻松方便地运行大模型呢一般来说运行这些模型的 Python / PyTorch 往往包含有 3GB 以上的相互依赖的包。即使设法安装了这些包也总会与你的 GPU 或其他硬件加速器不兼容导致非常糟糕的性能。 其实需要这么复杂的设置我们可以使用 Rust 和 WasmEdge[1]在本地创建和部署非常快速和轻量级的 LLM 推理应用。安装文件也非常小是一个只有几 MB 的简单二进制可执行文件。更赞的是这个负责推理的应用程序从 Rust 编译成Wasm 后完全可以跨广泛的 CPU、GPU 和操作系统移植。最赞的是它完全没有 Python 依赖。让我们开始吧 这个教程我们将涵盖以下内容 在日常使用的 macOS 或几乎任何平台上运行 LLM包括 Llama2 7b 和各种其他 LLM 在几分钟内为你的大模型构建一个轻量级的 AI Agent 在 LLM 之外的 AI 上使用 WasmEdge。 第 1 部分运行 LLM 和 AI 模型的超简单方法 1. 安装具有 LLM 支持的 WasmEdge 可以从一个命令行开始安装完整的 LLM 支持的 WasmEdge runtime。 curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugin wasi_nn-ggml 或者可以按照这里[2]的安装指南手动下载和复制 WasmEdge 安装文件。 2. 下载 Wasm 格式的 LLM 推理应用 接下来获取超小的 2MB 跨平台二进制文件 —— llama-chat.wasm。这是效率的证明无需其他依赖并能在不同环境中无缝操作。这个小的 Wasm 文件是从 Rust 编译的。想要构建自己的 AI 推理 应用请查看 llama-utils[3] Repo。 curl -LO https://github.com/second-state/llama-utils/raw/main/chat/llama-chat.wasm 3. 下载 Llama2 7b chat 模型 curl -LO https://huggingface.co/wasmedge/llama2/blob/main/llama-2-7b-chat-q5_k_m.gguf WasmEdge 还支持 Llama2、CodeLlama、Llemma、Codeshell、Mistrial、MistrialLite、TinyLlama、Baichuan、BELLE、Alpaca、Vicuna、OpenChat、Starcoder、OpenBuddy 等更多 4. 在 CLI 上与 Llama2 7b chat 现在你已经准备好了一切可以开始使用命令行与 Llama2 7b chat 模型聊天。 wasmedge --dir .:. --nn-preload default:GGML:AUTO:llama-2-7b-chat-wasm-q5_k_m.gguf  llama-chat.wasm 现在可以和 Llama2 7b chat 对话啦。让 Llama2 7b chat 模型帮我写代码解决一些看起来比较枯燥的工作 [USER]: I want to combine all the txt files in the local directory. write a python program for me.[ASSISTANT]:Of course! Here is a simple Python program that can combine all the text files in the current directory:import osfor filename in os.listdir(): if filename.endswith(.txt): with open(filename, a) as f: f.write()This program uses the os module to list all the files in the current directory, and then checks if each file ends with the .txt extension using the endswith() method. If a .txt file is found, it is opened in append mode (a) using the open() function, and the contents are written to the file using the write() method.Please let me know if you have any questions or if you need further assistance![USER]: How can I run this program? Im not familar with python.[ASSISTANT]:Of course! Here are the steps to run the Python program:1. Open a terminal or command prompt on your computer.2. Navigate to the directory where the text files are located using the cd command. For example, if the text files are located in the Documents directory, you would type cd Documents.3. Type python combine_txt_files.py and press Enter. This will run the combine_txt_files.py program.4. The program will combine all the text files in the current directory and write the combined contents to a new file called combined_txt_files.txt.If you are using a Python IDE (Integrated Development Environment) such as PyCharm or Visual Studio Code, you can open the combine_txt_files.py file and run it by clicking the Run button or pressing F5.I hope this helps! Let me know if you have any questions. 就这样你还可以使用同样的 llama-chat.wasm 文件来运行其他 LLM如 OpenChat、CodeLlama、Mistral 等。 iframe src//player.bilibili.com/player.html?bvidBV1zQ4y1n7mZpage1 scrollingno border0 frameborderno framespacing0 allowfullscreentrue /iframe 资源 通过以下额外资源探索可以在 WasmEdge 上运行的各种 LLM 运行其他 LLM其他可用 LLM 的综合视频指南[4]。 在 containerd 和 Docker 中运行 LLM了解如何在 Docker Wasm 中运行和管理 LLM 应用[5]。 第 2 部分构建超轻量级 AI Agent 1. 创建一个与 OpenAI 兼容的 API 服务 当用你的领域知识微调了一个模型或你想要运行一个私有模型时仅使用 CLI 运行模型是不够的。我们通常需要依靠这个大模型构建 Agent让 LLM 更好地帮我工作。接下来让我们为大模型设置兼容 OpenAI 的 API 服务然后我们可以将这个私有模型集成到其他 SaaS 工作流程中。这样即便 ChatGPT 宕机你的 Agent 依然可以正常为你工作 这里假设你已经安装了带有 ggml 插件的 WasmEdge 并下载了你需要的模型。 首先通过终端下载构建 API 服务器的 Wasm 文件。 curl -LO https://github.com/second-state/llama-utils/raw/main/api-server/llama-api-server.wasm 其次用基于 WasmEdge 的API 服务运行模型。 wasmedge --dir .:. --nn-preload default:GGML:AUTO:llama-2-7b-chat-wasm-q5_k_m.gguf llama-api-server.wasm -p llama-2-chat -s 0.0.0.0:8080 在看到连接建立后可以使用以下命令行来尝试你的模型。 curl -X POST http://localhost:8080/v1/chat/completions \-H accept: application/json \-H Content-Type: application/json \-d {messages:[{role:system, content: You are a helpful assistant. Answer each question in one sentence.}, {role:user, content: **What is Wasm?**}], model:llama-2-chat} 2. 部署连接 API 服务的聊天机器人 UI 接下来让我们将你的 API 服务链接到由 Second State 提供的 Chatbot-UI[6]为用户提供丝滑的对话体验。 需要做的就是将你的 Chat API 复制并粘贴到左下角侧边栏的 Chat API URL 中。请注意你的 API URL 必须是一个 HTTPs 代理。nike可以使用 ngrok 来实现 HTTPs 代理或者绑定你的域名。 接下来就可以通过 Chatbot-UI 与模型聊天啦。  3. 围绕模型构建 RAG 机器人和 Agent 如果我们将模型的能力应用到现实世界的工作流程中LLM Agent 比 Web 聊天机器人更有帮助。Flows.network[7] 是一个 Severless 平台用 Rust 和 Wasm 构建 LLM Agent 和机器人。flows.network 平台允许开发者将像 ChatGPT 和 Claude 的大模型连接到不同的 SaaS 提供商。由于模型已经具备与 OpenAI 兼容的 API我们可以像在 OpenAI 上做的那样轻松地将模型与 Telegram、Slack 和 Discord 等其他 SaaS 集成。查看如何构建基于 RAG 的 LLM Agent[8] 或者可以使用 LangChain[9] 和 LlamaIndex[10] 来构建 RAG检索增强生成应用程序。 来试一试使用这种方式构建的 RAG 机器人帮助你学习 Rust 语言 https://flows.network/learn-rust 第 3 部分不止于大语言模型 WasmEdge 的 AI 不仅限于 LLM 任务它还扩展到视觉和音频领域。除了 ggml 后端WasmEdge 运行时还支持 PyTorch、TensorFlow 和 OpenVINO AI 框架。为了使 AI 推理更加流畅WasmEdge 还支持使用流行的 OpenCV 和 FFmpeg 库进行图像处理。 了解如何借助 mediapipe-rs 开发图像和音频 AI 应用[11]并上手尝试其他 WASI-NN 示例。 Mediapipe-rs一个基于 Rust 的 Mediapipe 库 源代码Mediapipe-rs GitHub[12] 教程使用 Rust 进行 Mediapipe 推理[13] 更多 WASI NN 示例探索更多使用 WasmEdge 和 Rust 的 AI 推理示例[14]。 结论 在有了强大的 ChatGPT 后我们是不是还需要一个私有的模型答案是肯定的WasmEdge 为运行最先进的 LLM包括你自己微调的 Llama 2 模型提供了一个轻量级、安全、可靠和高效的环境。无论你是希望部署 AI 应用的开发者还是寻求将智能 Agent 集成到你的服务中使用 Rust WasmEdge 都将为你提供价值。 加入 WasmEdge discord[15] 的讨论来 GitHub 为 WasmEdge 做贡献吧。 参考资料 [1] WasmEdge: https://github.com/WasmEdge/WasmEdge [2] https://wasmedge.org/docs/start/install [3] llama-utils: https://github.com/second-state/llama-utils/tree/main/chat [4] 其他可用 LLM 的综合视频指南: https://youtu.be/lB2A7S1vexM [5] 了解如何在 Docker Wasm 中运行和管理 LLM 应用: https://youtu.be/ZGM6irhi1jA [6] 由 Second State 提供的 Chatbot-UI: https://second-state.github.io/chatbot-ui/ [7] Flows.network: https://flows.network/ [8] 构建基于 RAG 的 LLM Agent: https://docs.flows.network/docs/category/rag-based-llm-agent [9] LangChain: https://www.langchain.com/ [10] LlamaIndex: https://www.llamaindex.ai/ [11] mediapipe-rs 开发图像和音频 AI 应用: https://wasmedge.org/docs/develop/rust/wasinn/mediapipe [12] Mediapipe-rs GitHub: https://github.com/WasmEdge/mediapipe-rs [13] 使用 Rust 进行 Mediapipe 推理: https://wasmedge.org/docs/develop/rust/wasinn/mediapipe [14] 探索更多使用 WasmEdge 和 Rust 的 AI 推理示例: https://github.com/second-state/WasmEdge-WASINN-examples [15] WasmEdge discord: https://discord.com/invite/U4B5sFTkFc 作者Second_State https://www.bilibili.com/read/cv27600812/?jump_opus1 出处bilibili
http://www.tj-hxxt.cn/news/131024.html

相关文章:

  • 怎么做直播视频教学视频网站wordpress页脚太高
  • 建设手机网站公司社区文化建设
  • 国内百度云网站建设WordPress网站结构优化
  • 下载的网站模板怎么修改ui设计培训一般多久
  • p2p网站制作 杭州班级优化大师学生版
  • 山西建设工程协会网站企业网站推广在哪里办
  • 网站建设平台用乐云践新自己做网站怎么做
  • 兰州网站建设推广报价石家庄建设局网站怎么打不开
  • vr技术对网站建设有哪些影响创意设计与制作
  • 网页游戏网站知乎泉州网站建设选择讯呢
  • go语言 做网站做学校网站的内容
  • 怎么在网站做浮动图标网站建设小程序开发seo推广
  • 涡阳网站建设wordpress字体代码
  • 粉色帝国网站小学网站源码php
  • 网站建设直通车关键词设置163网易企业邮箱
  • 4399谁做的网站工业风 网站建设
  • 做网站哪个语言好山西省建设厅网站首页
  • 云服务器 部署网站wordpress如何配置伪静态页面
  • 2015微信网站设计学校网站建设意见
  • 成都网络优化网站无锡电子商务网站建设公司
  • 唐山网站建设费用西安软件制作公司
  • 中国全球门户网站wordpress标签页模板
  • 做网站是如何赚钱的淘宝网站建设 深圳
  • 珠海网站建设工程桂林象鼻山图片
  • 用手机做网站国外做网站
  • 北京智能网站建设系统加盟北京seo优化诊断
  • 婚恋网站排名前十名wordpress正文页面
  • 做ppt的素材网站东莞网站设计建设公司
  • 西安定制网站拼多多开网店免费提供货源
  • 织梦的网站数据还原怎么做找人做网站被骗