In this chapter, we will introduce the basic usage workflow of D-Robotics-LLM to help you get started quickly.
We provide both Base and Instruct versions of the Qwen2.5 model to meet your diverse development and application needs. The differences between them are as follows:
The Base version is a foundational text generation model suitable for subsequent model training tasks. Its model name does not contain the word Instruct.
The Instruct version is derived from the Base version through instruction fine-tuning and is better suited for conversational scenarios. Its model name does contain the word Instruct.
Here, we use the Qwen2.5-1.5B-Instruct model as an example to demonstrate its usage.
Download and extract the provided deployment package: D-Robotics_LLM_{version}.tar.gz.
Download the provided model file: Qwen2.5_1.5B_Instruct_1024.hbm.
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 a 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 the LD_LIBRARY_PATH. Reference commands:
Reference command to run the model on the device:
Program input parameters are as follows:
| Parameter | Description | Optional/Required |
|---|---|---|
-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 |
--template_path | Specifies the conversation template path for Instruct models; optional when loading Base models. | Optional |
--model_type | Specifies the model type to run; currently, the Qwen2.5 model type is 7. | Required |
After successful execution, you can perform simple conversation tests, as shown below: