# Sample genie-app tutorial

## genie-app sample pre-requisites

Aside from the target-specific libraries and config files required for any Genie SDK application, *genie-app* requires
a script file. The below section shows an example script file that enables execution of the Llama2-7b model.

## Sample script file

# Version
    version
    
    # Profile creation
    profile create profile1
    ls
    
    # Dialog creation
    dialog config create config1 llama2-7b-genaitransformer.json
    dialog config bind profile config1 profile1
    dialog create dialog1 config1
    ls
    
    # Queries
    dialog query dialog1 "Here's a summary of llamas in 10 words."
    
    # Save profiling data
    profile save profile1 vinay.json
    
    # Clean up
    dialog config free config1
    dialog free dialog1
    profile free profile1
    ls
    
    # Sleep for 5000 ms
    sleep 5000
    
    # Loop through 5 iterations
    loop 5
    
    # Profile creation
    profile create profile1
    ls
    
    # Dialog creation
    dialog config create config1 llama2-7b-genaitransformer.json
    dialog config bind profile config1 profile1
    dialog create dialog1 config1
    ls
    
    # Queries
    dialog query dialog1 "Here's a summary of llamas in 10 words."
    
    # Save profiling data
    profile save profile1 profiling_data.json
    
    # Clean up
    dialog config free config1
    dialog free dialog1
    profile free profile1
    
    # End Loop
    endloop
    
    # Exit
    exit
    Copy to clipboard

Now, we can proceed to executing our script file with genie-app.

## Executing sample genie-t2t-run

Running genie-app is very straightforward. As shown below, simply provide the script file via the -s argument and
that’s it! You should now be able to observe the sequential execution of each command in your script file as well
as any helpful comments you may have provided. Congrats!

genie-app -s script_file
    Copy to clipboard

Last Published: Oct 02, 2025

[Previous Topic
Executing genie-t2e-run](https://docs.qualcomm.com/bundle/publicresource/80-63442-100/topics/source_code_examples_genie-t2e-run.md) [Next Topic
Gen AI Transformer Model Library](https://docs.qualcomm.com/bundle/publicresource/80-63442-100/topics/genai_model.md)