3 ms·
Show HN: LLM-powered NPCs running on your hardware
Hey HN,
My team is open-sourcing the inference stack and fined-tuned models we use to create LLM-powered NPCs:
https://github.com/GigaxGames/gigax https://github.com/GigaxGames/gigax
The generative agents paper [1] pioneered the idea of prompting LLMs to create autonomous NPCs. But existing implementations require multiple calls to an LLM to make the agent plan its day, chat with people, and interact with its environment [2].
Our approach allows NPCs to be stepped at runtime with a single pass on consumer-grade hardware, with reasonable latency.
To achieve this, we've fine-tuned open-source LLMs [3] to parse a text description of a 3d scene, and respond with custom actions like `greet <someone>`, `grab <item>`, or `say <utterance>`.
This simple whitespace-separated « function calling » format is less verbose than json and thus helps with inference speed. We're also using the Outlines library [4] to force the model to adhere to this format.
We're launching an API and we're looking for partnerships with studios to integrate our tech into upcoming games. Would love to connect if this is of any interest to you!
Thanks in advance for your feedback :)
[1] https://arxiv.org/abs/2304.03442 https://arxiv.org/abs/2304.03442
[2] https://github.com/joonspk-research/generative_agents/tree/main/reverie/backend_server/persona/prompt_template/v3_ChatGPT https://github.com/joonspk-research/generative_agents/tree/m...
[3] https://huggingface.co/Gigax https://huggingface.co/Gigax (phi-3 fine-tune)
[4] https://github.com/outlines-dev/outlines/tree/main https://github.com/outlines-dev/outlines/tree/main
- simonini_thomas 2y agoThat's a very exiciting project, do you plan to write more tutorial and demos?
- Tantris 2y agoThanks for the comment! For now, the README.md and the tests files [1] should give you a first idea on how to use our library. But we're also working with the https://cu.bzh https://cu.bzh platform to create demos using their engines - those should give you inspiration as well! [1] https://github.com/GigaxGames/gigax/blob/main/tests/test_step.py https://github.com/GigaxGames/gigax/blob/main/tests/test_ste...
- arthurdotonce 2y agoDescribing a 3d scene with text is one way using ML to update an NPC, but I feel like the real killer app would be a multi-modal agent. Deepmind recently showed some impressive progress in this sense: https://deepmind.google/discover/blog/sima-generalist-ai-agent-for-3d-virtual-environments/ https://deepmind.google/discover/blog/sima-generalist-ai-age...
- Tantris 2y agoThanks for sharing this link! This would definitely be a silver-bullet, but I'm not aware of such agent having the ability to take and spit out text input! Another example of this idea would be Midjourney's CEO vocal plans to create models able to natively take in 3d input - but no demo yet :)