Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
LLM in Godot
| Date | Stars |
|---|---|
| 2026-07-31 | 250 |
| 2026-08-06 | 250 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Godot LLM
Isn't it cool to utilize large language model (LLM) to generate contents for your game? LLM has great potential in NPC models, game mechanics and design assisting. Thanks for technology like [llama.cpp](https://github.com/ggerganov/llama.cpp), "small" LLM, such as [llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B), run reasonably well locally on lower-end machine without a good GPU. I want to experiment LLM in Godot but I couldn't find any good library, so I decided to create one here.
⚠ While LLM is less controversial than image generation models, there can still be legal issues when LLM contents are integrated in games, I have created another [page](./LLM_LEGAL.md) to document some relevant information
# Table of Contents
1. [Quick start](#quick-start)
- [Install](#install)
- [Text Generation: GDLlama node](#text-generation-gdllama-node)
- [Text Embedding: GDEmbedding node](#text-embedding-gdembedding-node)
- [Multimodal Text Generation: GDLlava node](#multimodal-text-generation-gdllava-node)
- [Vector Database: LlmDB node](#vector-database-llmdb-node)
- [Template/Demo](#templatedemo)
2. [Retrieval Augmented Generation (RAG)](#retrieval-augmented-generation-rag)
3. [Roadmap](#roadmap)
4. [Documentation](#documentation)
- [Inspector Properties: GDLlama, GDEmbedding, and GDLlava](#inspector-properties-gdllama-gdembedding-and-gdllava)
- [GDLlama Functions and Signals](#gdllama-functions-and-signals)
- [GDEmbedding Functions and Signals](#gdembedding-functions-and-signals)
- [GDLlava Functions and Signals](#gdllava-functions-and-signals)
- [Text generation with Json schema](#text-generation-with-json-schema)
- [LlmDB Functions and Signals](#llmdb-functions-and-signals)
- [LlmDBMetaData](#llmdbmetadata)
5. [FAQ](#faq)
6. [Compile from Source](#compile-from-source)
# Quick Start
## Install
1. Get `Godot LLM` directly from the asset library, or download the vulkan or cpu zip file from the [release page](https://github.com/Adriankhl/godot-llm/releases), and unzip it to place it in the `addons` folder in your godot project
2. Now you should be able to see `GdLlama`, `GdEmbedding`, `GDLlava`, and `LlmDB` nodes in your godot editor. You can add them to a scene in Godot editor, or initialize themm directly by `.new()`.
## Text Generation: GDLlama node
1. Download a [supported](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#description) LLM model in GGUF format (recommendation: [Meta-Llama-3-8B-Instruct-Q5_K_M.gguf](https://huggingface.co/lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF/tree/main)), move the file to somewhere in your godot project
2. Set up your model with GDScript, point `model_path` to your GGUF file. The default `n_predict = -1` generates an infinite sequence, we want it to be shorter here
```
func _ready():
var gdllama = GDLlama.new()
gdllama.model_path = "./models/Meta-Llama-3-8B-Instruct.Q5_K_M.gguf" ##Your model path
gdllama.n_predict = 20
```
3. Generate text starting from "Hello"
```
var generated_text = gdllama.generate_text_simple("Hello")
print(generated_text)
```
4. Text generation is slow, you may want to call `gdllama.run_generate_text("Hello", "", "")` to run the generation in background, then handle the `generate_text_updated` or `generate_text_finished` signals
```
gdllama.generate_text_updated.connect(_on_gdllama_updated)
gdllama.run_generate_text("Hello", "", "")
func _on_gdllama_updated(new_text: String):
print(new_text)
```
## Text Embedding: GDEmbedding node
1. Download a [supported](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#description) embedding model in GGUF format (recommendation: [mxbai-embed-large-v1.Q5_K_M.gguf](https://huggingface.co/ChristianAzinn/mxbai-embed-large-v1-gguf/tree/main)), move the file to somewhere in your godot project
2. Set up your model with GDScript, point `model_path` to your GGUF file
```
func _ready():
var gdembeddinExcerpt of 32,409 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:a3b9aae32879f57a, topic:llm-inference, topic:llamacpp