# Building the QNN Gen AI Transformer Model Library Building an example model library is optional. In the case of the GenAITransformer backend, the model is composed of a single custom op implemented by the pre-built `libQnnGenAiTransformerCpuOpPkg.so` and `QnnGenAiTransformerCpuOpPkg.dll` op packages. Genie provides pre-built `libQnnGenAiTransformerModel.so` and `QnnGenAiTransformerModel.dll` libraries. The source for these libraries is provided by `${QNN_SDK_ROOT}/examples/Genie/Model/model.cpp`. This section shows the user how to compile this source into a model library consumable by the Genie. **Model build on Linux host** Open a command shell on Linux host and run: ${QNN_SDK_ROOT}/bin/x86_64-linux-clang/qnn-model-lib-generator \ -c ${QNN_SDK_ROOT}/examples/Genie/Model/model.cpp \ -o ${QNN_SDK_ROOT}/examples/Genie/Model/model_libs # This can be any path Copy to clipboard This will produce the following artifacts: - `${QNN_SDK_ROOT}/examples/Genie/Model/model_libs/aarch64-android/libqnn_model.so` - `${QNN_SDK_ROOT}/examples/Genie/Model/model_libs/x86_64-linux-clang/libqnn_model.so` - By default libraries are built for all targets. To compile for a specific target, use the `-t ` option with - `qnn-model-lib-generator`. Choices of <target> are aarch64-android and x86\_64-linux-clang. Last Published: Oct 02, 2025 [Previous Topic Executing sample genie-t2t-run](https://docs.qualcomm.com/bundle/publicresource/80-63442-100/topics/source_code_examples_genie-app.md) [Next Topic Genie Dialog](https://docs.qualcomm.com/bundle/publicresource/80-63442-100/topics/dialog_dialog.md)