Create default model general parameters
Return Value
xlm_common_params_t structure data with default parameter.Initialize the instance.
Parameters
[in]: param, general parameters of the model generated during initialization.
[in]: callback, the callback function pointer for registering a task, i.e., the execution entity of the task.
[out]: llm_handle, the inference handle, which is used for the management of subsequent tasks.
Return Value
0 (Initialization successful), -1 (Initialization failed).Synchronous inference, starting the inference includes a complete prefill and decode process.
Parameters
[in]: handle, the inference handle obtained through the xlm_init interface.
[in]: input, the model inference input, including data such as prompt, image, and task priority.
[in]: userdata, user-defined data, which is returned through the callback function along with the inference result.
Return Value
0 (Inference task executed successfully), -1 (Failed to obtain the inference handle, task returned).This is used only for PPL calculation and will not be executed for regular tasks.
Parameters
handle, the inference handle obtained through the xlm_init interface.input, input for model inference, typically text or wikitest data.userdata,user-defined data, which is returned through the callback function along with the inference result.Return Value
0 (PPL calculation task executed successfully), -1 (failed to obtain the inference handle, task returned).Asynchronous inference, starting the inference includes a complete prefill and decode process.
Parameters
[in]: handle, the inference handle obtained through the xlm_init interface.
[in]: input, the model inference input, including data such as prompt, image, and task priority.
[in]: userdata, user-defined data, which is returned through the callback function along with the inference result.
Return Value
0 (Inference task executed successfully), -1 (Failed to obtain the inference handle, task returned).Release the inference instance resources.
Parameters
handle, the inference handle obtained through the xlm_init interface.Return Value
0 (Task destroyed successfully), -1 (Failed to obtain the inference handle, interface returned).Provide audio input when Omni is running online.
Parameters:
handle, the inference handle obtained through the xlm_init interface.audio_input, audio input, including the memory start address and length information.Return Value:
0 (Correctly transmit audio data), -1 (Failed to obtain audio data, task returned).Provide video input when Omni is running online.
Parameters:
handle, the inference handle obtained through the xlm_init interface.video_input, video input, including the start addresses of the Y and UV components and their width and height.Return Value:
0 (Correctly transmit video data), -1 (Failed to obtain video data, task returned).Provide text input when Omni is running online.
Parameters:
handle, the inference handle obtained through the xlm_init interface.text_input, text input, including system text and user text.Return Value:
0 (Correctly transmit text data), -1 (Failed to obtain text data, task returned).Start Omni's full processing pipeline in a synchronous manner.
Parameters:
handle, the inference handle obtained through the xlm_init interface.input, the model inference input.userdata, user-defined data, which is returned through the callback function along with the inference result.Return Value:
0 (Inference task executed successfully), -1 (Failed to obtain the inference handle, task returned).