Oe Llm Package Detection logo

Oe Llm Package Detection

Organization
HorizonRobotics
oe-llm-package-detection

OE-LLM 包环境检测 Skill。当任务涉及 LLM 量化、LLM 压缩、LLM 编译、板端 LLM 推理等 LLM 工具链操作,且 .horizon/.env.oe-llm-package 不存在时触发。自动完成 OE-LLM 包路径定位、版本采集、本地环境匹配检查、GPU Docker 判定,并将结果写入 .env 文件。

Overview

PublisherHorizonRobotics
RepositoryOE-Skills
Skill nameoe-llm-package-detection
Stars
28
Forks
4
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by HorizonRobotics on GitHub. Read the source before you install it.

Installation

Install the Oe Llm Package Detection AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/HorizonRobotics/OE-Skills/tree/main/horizon/skills/horizon-router/oe-llm-package-detection
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HorizonRobotics/OE-Skills.git /tmp/OE-Skills
mkdir -p .claude/skills
cp -r /tmp/OE-Skills/horizon/skills/horizon-router/oe-llm-package-detection .claude/skills/oe-llm-package-detection
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Oe Llm Package Detection in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Oe Llm Package Detection on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Oe Llm Package Detection is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

OE-LLM 包环境检测

执行方式

本 Skill 应通过 subagent 执行。 主 agent 在前置检查中发现 .env.oe-llm-package 缺失或不完整时,应将本文件的完整内容作为 subagent prompt 派发执行。subagent 完成后汇报写入结果(OE-LLM 路径、版本、执行模式),主 agent 读取 .env.oe-llm-package 继续后续流程。

目标

检测 OE-LLM 包路径、版本及本地环境匹配情况,写入 .horizon/.env.oe-llm-package,供后续所有 LLM 工具链任务直接使用。

触发条件

任何涉及 LLM 量化、LLM 压缩、LLM 编译、板端 LLM 推理、LLM 精度评估的任务进入 horizon-router 前,如果 .horizon/.env.oe-llm-package 不存在,顶层 Skill 会中断任务并提示用户:

未检测到 OE-LLM 包环境配置(.horizon/.env.oe-llm-package)。请提供 OE-LLM 包路径,或回复"跳过"暂不配置。

  • 用户提供路径 → 进入本检测流程
  • 用户回复"跳过" → 记录跳过(仅当次对话有效,下次仍会提示),继续后续任务

LLM 任务的识别关键词:LLM、大语言模型、VLM、视觉语言模型、llm_compression、AWQ、GPTQ、RTN、SmoothQuant、LLM 量化、LLM 编译、LLM 推理、oellm、InternVL、Qwen-VL、LLaMA 等。

检测流程

1. 检查 .horizon/.env.oe-llm-package 是否存在

  • 文件存在且内容完整(包含 OE_LLM_DIR、OE_LLM_VERSION、EXECUTION_MODE 等字段)→ 直接读取,跳过后续步骤
  • 文件不存在或不完整 → 进入步骤 2

2. 定位 OE-LLM 包路径

按优先级查找:

  1. 环境变量:OE_LLM_DIR、OPEN_EXPLORER_LLM_DIR、HORIZON_OE_LLM_DIR
  2. 项目配置文件:.env、.horizon/oe-llm.env、CLAUDE.md 中声明的路径
  3. 常见路径探测:/open_explorer_llm、~/open_explorer_llm、/opt/openexplorer_llm,以及 /mnt/oe-cli-test/ 下以 horizon_j6_open_explorer_llm 开头的目录
  4. 以上都没有 → 询问用户 OE-LLM 包路径

找到路径后,验证目录中存在 OE-LLM 包的标志性文件(以下至少两个):

  • run_docker.sh
  • llm_compression/ 目录
  • runtime/ 目录

注意:OE-LLM 包没有标准 OE 包的 samples/、docs/、toolchain/ 目录,也没有 package/host/ai_toolchain/ 子目录。

3. 采集 OE-LLM 版本信息

从 OE-LLM 包目录中提取以下信息:

OE-LLM 包整体版本:

  • 从目录名提取(如 horizon_j6_open_explorer_llm_v2.0.0_rc3-py310_20260615 → v2.0.0_rc3)
  • 检查 README-CN、README-EN 中的版本信息
  • 以上都无法确定时询问用户

组件版本(从 llm_compression/deps_version.conf 解析):

字段含义示例值
HBDK_VERSIONHBDK4 编译器版本4.11.2
HORIZON_PLUGIN_PYTORCH_VERSIONPyTorch 量化插件版本3.3.4
HBM_INFER_VERSIONHBM 推理引擎版本3.15.3
LLM_COMPRESSION_VERSIONLLM 压缩工具版本2.0.2
TORCH_VERSION配套 PyTorch 版本(含 CUDA)2.8.0+cu128
PYTHON_VERSION配套 Python 版本py310

同时通过 pip show 检查已安装版本,并记录 OE-LLM 包内 whl 文件名中的版本:

组件pip 包名说明
hbdk4_compilerhbdk4-compilerBPU 编译器
hbdk4_marchhbdk4-marchBPU 架构定义
hbm_inferhbm-inferHBM 推理引擎
horizon_plugin_profilerhorizon-plugin-profiler性能分析插件
horizon_plugin_pytorchhorizon-plugin-pytorchPyTorch 量化插件(QAT)

Docker 信息:

  • 从 run_docker.sh 内容提取 Docker 镜像名称和版本号:
    • GPU(仅 GPU 镜像):openexplorer/ai_toolchain_ubuntu_22_llm_j6_gpu:{version}
  • 从 run_docker.sh 提取容器内挂载路径:/open_explorer_llm

4. 本地环境匹配检查

在当前环境中逐项检测:

  1. Python 版本:python3 --version,要求 3.10 或 3.11
  2. pip 组件:对每个组件执行 pip show <包名>,记录:
    • 是否安装
    • 版本号是否与 OE-LLM 包声明一致
  3. Python 模块导入检查:
    • import hbdk4
    • import hbm_infer

根据检查结果判定执行模式:

  • 全部匹配 → EXECUTION_MODE=local
  • 部分缺失或版本不匹配 → EXECUTION_MODE=docker,记录缺失项

5. Docker 模式下的 GPU 判定

OE-LLM 包仅提供 GPU Docker 镜像(openexplorer/ai_toolchain_ubuntu_22_llm_j6_gpu),无 CPU 镜像。

当 EXECUTION_MODE=docker 时:

  1. 启动 GPU Docker 容器并测试 GPU 可用性(注意 GPU 镜像 Entrypoint 为 /bin/bash,必须用 --entrypoint + -c 传命令):

    bash
    docker run --rm --gpus all --entrypoint /bin/bash \
      openexplorer/ai_toolchain_ubuntu_22_llm_j6_gpu:{version} -c "nvidia-smi"
  2. 检查 nvidia-smi 输出:

    • 能正常输出 GPU 信息 → DOCKER_TYPE=gpu
    • 报错或无 GPU 设备 → 提示用户 OE-LLM 包需要 GPU 环境,无法使用 CPU Docker
  3. 采集 GPU 详细信息(仅当 GPU 可用时):

    bash
    docker run --rm --gpus all --entrypoint /bin/bash \
      openexplorer/ai_toolchain_ubuntu_22_llm_j6_gpu:{version} -c "python3 -c \"
    import torch, json
    info = {'cuda_version': torch.version.cuda, 'gpu_count': torch.cuda.device_count(), 'gpus': []}
    for i in range(torch.cuda.device_count()):
        p = torch.cuda.get_device_properties(i)
        info['gpus'].append({'index': i, 'name': p.name, 'memory_gb': round(p.total_memory/1024**3,1), 'compute_capability': f'{p.major}.{p.minor}'}  )
    print(json.dumps(info))
    \""

    将返回的 JSON 写入 GPU_INFO 字段。

  4. 向用户提示判定结果:

    • GPU 可用时:检测到 N 张 <GPU型号>,使用 GPU Docker 镜像
    • GPU 不可用时:未检测到可用 GPU,OE-LLM 包需要 GPU 环境才能运行

6. 写入 .horizon/.env.oe-llm-package

bash
# OE-LLM 包环境信息(自动生成)
# 检测时间:<timestamp>

# === OE-LLM 包基本信息 ===
OE_LLM_DIR=<OE-LLM 包路径>
OE_LLM_VERSION=<OE-LLM 版本号,如 v2.0.0_rc3>

# === 组件版本 ===
HBDK_COMPILER_VERSION=<版本>
HBDK_MARCH_VERSION=<版本>
HBM_INFER_VERSION=<版本>
HORIZON_PLUGIN_PROFILER_VERSION=<版本>
HORIZON_PLUGIN_PYTORCH_VERSION=<版本>
LLM_COMPRESSION_VERSION=<版本>

# === 配套环境 ===
TORCH_VERSION=<版本,如 2.8.0+cu128>
PYTHON_VERSION=<版本,如 py310>

# === 执行模式 ===
EXECUTION_MODE=<local | docker>

# --- 以下仅在 EXECUTION_MODE=docker 时填写 ---
DOCKER_TYPE=gpu
DOCKER_IMAGE=openexplorer/ai_toolchain_ubuntu_22_llm_j6_gpu:<version>
DOCKER_RUN_CMD=bash <OE_LLM_DIR>/run_docker.sh <dataset_path>
DOCKER_EXEC_PREFIX=docker run --rm --gpus all --entrypoint /bin/bash <DOCKER_IMAGE> -c
MISSING_COMPONENTS=<缺失或不匹配的组件列表,逗号分隔>

# --- 以下仅在 DOCKER_TYPE=gpu 时填写 ---
GPU_INFO=<JSON: {"cuda_version":"...","gpu_count":N,"gpus":[{"index":0,"name":"...","memory_gb":...,"compute_capability":"..."},...]}>

DOCKER_EXEC_PREFIX 说明:GPU 镜像的 Entrypoint 为 ['/bin/bash'],非交互式执行命令时如果直接 docker run image cmd,实际会执行 /bin/bash cmd(把 cmd 当脚本文件名),报 cannot execute binary file。必须用 --entrypoint /bin/bash image -c "cmd" 的方式。DOCKER_EXEC_PREFIX 已包含正确的 entrypoint 处理,子 Skill 直接拼接即可:$DOCKER_EXEC_PREFIX "python3 ..."。

  • 后续任务直接读取此文件,无需重复检测
  • 如果 EXECUTION_MODE=local,不填写 Docker 相关字段

后续任务的使用方式

顶层 Skill 路由到子 Skill 后,子 Skill 在执行 CLI 命令前读取 EXECUTION_MODE:

  • local → 先激活 venv,再直接执行:
    bash
    source .horizon/venv-llm/bin/activate
    cd $OE_LLM_DIR/llm_compression && bash scripts/calib.sh ...
  • docker → 读取 DOCKER_EXEC_PREFIX,拼接 CLI 命令:
    bash
    # 非交互式单命令(推荐,直接拼 DOCKER_EXEC_PREFIX)
    eval "$DOCKER_EXEC_PREFIX 'cd /open_explorer_llm/llm_compression && bash scripts/calib.sh ...'"
    
    # 交互式(通过 run_docker.sh 启动 shell)
    bash <OE_LLM_DIR>/run_docker.sh <dataset_path>
    
    # 手动 docker run
    docker run -it --rm \
      --gpus all \
      --shm-size="15g" \
      -v <OE_LLM_DIR>:/open_explorer_llm \
      -v <dataset_path>:/jfs-public \
      <DOCKER_IMAGE>

OE-LLM 包与标准 OE 包的区别

方面标准 OE 包OE-LLM 包
whl 目录package/host/ai_toolchain/package/host/(无子目录)
标志性目录samples/、docs/、toolchain/llm_compression/、runtime/
版本来源version.txt、VERSION、release_notes.mdllm_compression/deps_version.conf
核心组件horizon_tc_ui, hmct, horizon_plugin_pytorch, hbdk4_compilerhbdk4_compiler, hbm_infer, horizon_plugin_profiler, horizon_plugin_pytorch
CLI 工具hb_compile, hb_model_info, hmct-debuggerllm_compression/scripts/ 下的脚本
Docker 镜像ai_toolchain_ubuntu_22_j6_gpu/cpuai_toolchain_ubuntu_22_llm_j6_gpu(仅 GPU)
Docker 挂载/open_explorer/open_explorer_llm
交叉编译器无aarch64-linux-hb-gcc .deb 包

注意事项

  • OE-LLM 包版本决定了各组件的兼容版本,混用不同版本可能导致量化或编译失败
  • OE-LLM 包与标准 OE 包的组件版本可能不同,不可混用
  • 如果用户更换了 OE-LLM 包或升级了组件,需要删除 .horizon/.env.oe-llm-package 重新检测
  • Docker 模式下,OE-LLM 包路径会自动挂载到容器内的 /open_explorer_llm,命令中应使用容器内路径
  • Docker 模式下需要 --shm-size="15g" 参数(共享内存),否则 LLM 推理可能 OOM

Frequently asked questions

What does the Oe Llm Package Detection AI skill do?

OE-LLM 包环境检测 Skill。当任务涉及 LLM 量化、LLM 压缩、LLM 编译、板端 LLM 推理等 LLM 工具链操作,且 .horizon/.env.oe-llm-package 不存在时触发。自动完成 OE-LLM 包路径定位、版本采集、本地环境匹配检查、GPU Docker 判定,并将结果写入 .env 文件。

Why use Oe Llm Package Detection on TypingMind?

Because you install it once and use it with any model. Oe Llm Package Detection is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Oe Llm Package Detection in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HorizonRobotics/OE-Skills/tree/main/horizon/skills/horizon-router/oe-llm-package-detection. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Oe Llm Package Detection?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Oe Llm Package Detection?

As many as you like. As long as a model supports skills, you can use Oe Llm Package Detection with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Oe Llm Package Detection AI skill free?

Yes. It is published on GitHub by HorizonRobotics under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇