X86 Environment Configuration

You may skip this chapter if you intend to use the pre-compiled models provided by D-Robotics for a quick evaluation and do not require custom model quantization or compilation.

If you need to perform custom quantization and compilation for Large Language Models, please contact D-Robotics Technical Support for relevant materials.

HardwareRequirement
CPUIntel(R) Core(TM) i9-14900K (32 cores)
GPUNVIDIA RTX 3090
DDR128G
Note

Lower hardware specifications may result in slower quantization speeds or process failure.

Development Package Preparation

Download the provided D-Robotics_LLM_S600_{version}.tar.gz installation package and extract it to your x86 development machine.

Install Conda Environment

Note

If you already have a Conda environment installed, skip this step.

For efficient Python environment management, we recommend using Miniforge3.

  1. Download the Miniforge3 installer:

    wget -c https://mirrors.bfsu.edu.cn/github-release/conda-forge/miniforge/LatestRelease/Miniforge3-Linux-x86_64.sh
  2. Install Miniforge3:

    chmod 777 Miniforge3-Linux-x86_64.sh sh Miniforge3-Linux-x86_64.sh

Setup Conda Environment

  1. Enter the Conda base environment:

    # Use the default install path or your custom path source ~/miniforge3/bin/activate (base) xxx@xxx:~$
  2. Create and activate a Python 3.10 environment:

    conda create -n oellm python=3.10 conda activate oellm # (oellm) xxx@xxx:~$

    Install required Python dependencies:

    # D-Robotics_LLM_S600_{version}路径下 pip install -r ./oellm_build/requirements.txt

Install Toolchain Packages

After setting up the Conda environment, install the model quantization and compilation toolkits included in the package:

pip install ./oellm_build/hbdk4_compiler-{version}-cp310-cp310-manylinux_2_17_x86_64.whl pip install ./oellm_build/hbdk4_runtime_aarch64_unknown_linux_gnu_nash-{version}-py3-none-any.whl pip install ./oellm_build/leap_llm-{version}-py310-none-any.whl

The model quantization and compilation environment on your x86 machine is now deployed.

Cross-Compilation Toolchain Configuration

The LLM development package includes a cross-compilation toolchain for building ARM programs on x86 platforms. Create a directory and extract the package using the following commands:

sudo mkdir -p /opt/aarch64/ sudo tar -xvf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-linux-gnu.tar.xz -C /opt/aarch64/

Root privileges are required for /opt. You may choose an alternative directory.

Once extracted, configure the environment variable for the toolchain:

export LINARO_GCC_ROOT=/opt/aarch64/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-linux-gnu

You can now cross-compile ARM executables, such as the oellm_runtime demos, on your x86 platform.