This section uses the Qwen3-1.7B model as an example to illustrate the on-device execution workflow.
This workflow applies to quantized models running directly on the device. Please first refer to the On-device Preparation section to complete the environment setup and understand the correspondence between the model and example.
In the oellm_runtime directory, the LLM example uses the following files and folders:
The on-device configuration file {model}_config.json contains the following parameters:
| Parameter | Description | Required / Optional |
|---|---|---|
hbm_path | Description: Path to the model on-device Type: string | Required |
bpu_core | Description: BPU cores used for inference. For multiple cores, specify as [0,1,2,3]Type: [int] | Required |
tokenizer_dir | Description: Path to the tokenizer configuration directory Type: string | Required |
model_type | Description: Model type Type: intValues: 1: deepseek, 9: qwen3 | Required |
enable_multi_turn | Description: Enable multi-turn conversation Type: boolValues: true, falseDefault: false | Optional |
enable_thinking | 参数Description描述: Enable think mode Type: boolValues: true, falseDefault: true | Optional |
Example qwen3_1.7b_config.json:
A one-click execution script run_llm.shis provided.
Example command:
Script contents:
Executable parameters:
Conversation Control Commands
| Command | Description |
|---|---|
<prompt> | Input text prompt |
regen | Regenerate the current response |
reset | Clear memory, resetting multi-turn history |
exit | Exit the program |