ML Agent Load ONNX for NPC Chatting

Hi I’m searching for potential solutions to make local chatting NPC by loading an qwen onnx model in UE5. This ML Agent came across to be something interesting as in the documentation it states to be able to make chat NPC and can load onnx file. But I searched online couldn’t find a single example anyone used it to make chatting feature or work with onnx. So is it something actually supported or it’s more of a speculation in the future? If the former, could you kindly point out samples of making chatting NPC or working with onnx? Much appreciated!

[Image Removed]

Hi,

I think the MLAdapter has been replaced by LearningAgents. With this plugin you can train NPC behaviour through reinforcement learning.

There is a nice course on LearningAgents also telling you what it can do, you can find it here.

If you are looking how you can run a pretrained language model inside the engine, you can do so using the NeuralNetworkEngine (NNE).

There is also a course on the Epic Developer Community you can find here.

Just a warning upfront: Getting an LLM running is challenging, as you have to port the tokenizer of your model and implement the strategy how to pick the next tokenz (beam search, greedy, etc.).

I recommend that you start using the NNERuntimeORTCpu backend as it has the highest chance to be able to run your model.

I hope that helps as a starting point, good luck!