尧图网站设计 尧图网站设计YAOTU DESIGN
ARTICLE DETAIL

资讯详情

深耕网站设计与一线实操的经验洞察。

AgenticSeek 加载路由模型失败 Failed to load the routing model 怎么解决?

AgenticSeek 加载路由模型失败 Failed to load the routing model 怎么解决? AgenticSeek 加载路由模型失败 Failed to load the routing model 怎么解决【免费下载链接】agenticSeekFully Local Manus AI. No APIs, No $200 monthly bills. Enjoy an autonomous agent that thinks, browses the web, and code for the sole cost of electricity.项目地址: https://gitcode.com/GitHub_Trending/ag/agenticSeek在本地运行 AgenticSeek 的 CLIuv run cli.py时如果初始化阶段抛出包含Failed to load the routing model的异常说明路由模型加载失败程序无法继续启动。这个错误来自 sources/router.py 中的load_llm_router()方法路由模块通过AdaptiveClassifier.from_pretrained从llm_router/目录加载模型一旦加载失败就会抛出该异常。错误信息本身已经给出了解决方式——运行llm_router/目录下的dl_safetensors.sh脚本下载模型文件。路由模型在 AgenticSeek 中负责判断任务类型与复杂度把查询分发给对应的 Agent复杂任务会先进入 Planner Agent 生成计划为什么需要单独下载路由模型llm_router/目录中随仓库提供的文件有 config.json包含model_name等模型配置和 examples.json但模型权重文件model.safetensors不在仓库内需要自行下载。llm_router/dl_safetensors.sh 开头的注释解释了原因直接调用AdaptiveClassifier.from_pretrained(adaptive-classifier/llm-router)会报config.json not found因此作者把配置文件放进了llm_router/目录只留model.safetensors由脚本从脚本内定义的 Hugging Face 地址下载。解决步骤1. 确认 llm_router 目录状态检查llm_router/中是否缺少model.safetensorsls llm_router如果model.safetensors已经存在却仍然报错先看运行位置router.py按运行方式确定模型目录作为模块导入时使用./llm_router直接运行python sources/router.py时使用../llm_router见 sources/router.py请确保从项目根目录启动应用。2. 在 llm_router 目录内运行下载脚本脚本用相对路径判断并写入model.safetensors必须先进入llm_router/目录再执行这也是错误信息的原文要求cd llm_router ./dl_safetensors.sh运行前提机器上已安装 curl 或 wget 之一。脚本按 curl、wget 顺序检测两者都没有时会输出Error: Neither curl nor wget is available. Please install one of them.并以非零状态退出。3. 根据脚本输出判断结果脚本的输出直接说明下载是否完成文件缺失时先输出Router safetensors file not found, downloading...下载成功后输出Download completed successfully文件已存在时输出File already exists, skipping download下载失败时输出Download failed并退出此时检查网络后重新运行即可。也可以直接确认llm_router/model.safetensors是否已生成。脚本的副作用仅限于在当前目录即llm_router/下载这一个文件。替代路径交给安装脚本Linux/macOS在 Linux 或 macOS 上执行 install.sh 时它会在对应平台的安装脚本scripts/linux_install.sh或scripts/macos_install.sh完成后自动执行cd llm_router ./dl_safetensors.sh不需要手动下载。因此在这两个系统上看到此报错通常意味着没有走./install.sh流程或其中的模型下载步骤失败——重新执行./install.sh即可补上下载。注意 install.batWindows只调用scripts/windows_install.bat不包含下载路由模型的步骤Windows 上需要按上面的方法自行运行脚本。验证从项目根目录重新运行 CLIuv run cli.py初始化过程经过Loading LLM router model...后不再抛出Failed to load the routing model程序进入交互循环即说明路由模型已正常加载。若下载失败导致model.safetensors缺失或损坏该报错会再次出现回到第 2 步重新执行下载脚本。【免费下载链接】agenticSeekFully Local Manus AI. No APIs, No $200 monthly bills. Enjoy an autonomous agent that thinks, browses the web, and code for the sole cost of electricity.项目地址: https://gitcode.com/GitHub_Trending/ag/agenticSeek创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表