HomeJavaModsllama.jar
llama.jar

llama.jar 🦙

llama.jar is a lightweight, high-performance Minecraft mod that brings the power of local Large Language Models (LLMs) directly into Minecraft using llama.cpp.

Runs completely offline on your own hardware with no API keys, no subscriptions, and zero external network requests.

[!WARNING] This is an alpha release and has not been fully tested in all environments. Use with caution and please report any bugs or issues you encounter.


Key Features


How to Setup

  1. Download the Mod: Download the correct jar matching your mod loader (Forge or Fabric) and Minecraft version.
  2. Add GGUF Models: Download any GGUF format model (e.g. llama-3-8b-instruct.Q4_K_M.gguf or smaller models like qwen-2.5-1.5b-instruct) and place the .gguf file inside your .minecraft/models/ folder.
  3. Launch Minecraft: The mod will automatically set up the workspace on startup.

In-Game Commands

Manage models and run prompts on the fly using command permissions:


Configuration

A common configuration file (llamajar-common.toml or llamajar.json) is generated in your config directory. You can tweak performance parameters:


Developer Integration (Library Mod Usage)

To use llama.jar as a foundation for your own AI-enabled mod, add it to your development environment.

Gradle Setup

repositories {
    mavenLocal() // After publishing llama.jar locally
}

dependencies {
    // For Fabric development
    modImplementation "com.popr4x.llamajar:llamajar-fabric-1.20.1:alpha-1.0"
    
    // For Forge development
    implementation "com.popr4x.llamajar:llamajar-forge-1.20.1:alpha-1.0"
}

Accessing llama.cpp context in Java

import com.llamajar.LlamaJar;
import de.kherud.llama.LlamaModel;
import de.kherud.llama.LlamaIterator;

// Check if a model is currently loaded
if (LlamaJar.isModelLoaded()) {
    LlamaModel model = LlamaJar.getModel();
    // Perform custom inferences, register custom listeners, or manage model state
}

License

This project is licensed under the AGPLv3 License. Under the hood, it utilizes llama.cpp and the Java JNI bindings from de.kherud:llama licensed under Apache-2.0.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more