In this chapter, we will introduce the basic usage workflow of D-Robotics-LLM to help you get started quickly. Here, we use the InternLM2-1.8B model as an example for demonstration.
Download the provided D-Robotics_LLM_{version}.tar.gz deployment package and extract it.
Download the provided InternLM2_1.8B_1024.hbm model.
For the download link of the hbm model, please refer to the resolve_model.txt file located in the model folder of oellm_runtime.
After preparing both the deployment package and the model, integrate the model (*.hbm) with the oellm_runtime SDK from the deployment package. The reference directory structure is as follows:
Create a working directory on the device using the following commands as reference:
Copy the integrated folder from your development machine to this on-device directory. Reference command:
Finally, under the path /home/root/llm/D-Robotics_LLM_{version}/oellm_runtime, configure LD_LIBRARY_PATH. Reference commands:
Reference command to run the model on the device:
The runtime parameters are as follows:
| Parameter | Description | Optional |
|---|---|---|
-h, --help | Display help information. | / |
--hbm_path | Specifies the path to the quantized model file (*.hbm). | Required |
--tokenizer_dir | Specifies the tokenizer configuration directory. | Required |
--model_type | Specifies the model type to run; currently, the InternLM model type is 4. | Required |
After successful execution, you can perform a simple conversation test as shown below: