The onnxruntime-genai package contains a model builder that generates the phi-2 ONNX model using the weights and config on Huggingface. The tools also allows you to download the weights from Hugging Face, load locally stored weights, or convert from GGUF format. For more details, see [how to build models](../howto/build-model.md)
If using the `-m` option shown here, you will need to login into Hugging Face.
After you run the script, you will see a series of files generated in this folder. They include the HuggingFace configs for your reference, as well as the following generated files used by ONNX Runtime generate() API.
You can view and change the values in the `genai_config.json` file. The model section should not be updated unless you have brought your own model and it has different parameters.
The search parameters can be changed. For example, you might want to generate with a different temperature value. These values can also be set via the `set_search_options` method shown below.
## Run the model with a sample prompt
Run the model with the following Python script. You can change the prompt and other parameters as needed.