OpenJ / Reckoning / LoRASpecialize one base model

LoRA / PEFT adapters

Small trained updates that change what a base model does.

What Is A LoRA Adapter?

A LoRA adapter is not a second model. It is a small set of extra weights, trained separately from the base model, that nudge the base model's behavior in a particular direction when combined with it at inference time.

Full fine-tuning produces a new copy of every weight in the model — for a multi-billion parameter model, that is another multi-gigabyte file per variant. LoRA instead trains a pair of much smaller matrices per targeted layer (a low-rank decomposition, hence the name) that approximate the change fine-tuning would have made, without touching the base weights directly. The practical result is what matters here, not the linear algebra: an adapter file is typically single-digit to a few tens of megabytes, it is swappable independently of the base model, and it does not duplicate the base model's weights.

Why This Matters

Cheap specialization: get a specialized assistant, tone, or skill on top of one base model without paying the storage and load-time cost of a full model per variant.

Fast iteration: adapters are small enough to train, share, and swap far more quickly than retraining or redistributing a full checkpoint.

One resident base model, many behaviors: the eventual goal (Phase 2 below) is to keep one base model loaded and switch which adapter is applied per request, rather than loading a different full model for each behavior.

Standard, portable format: adapters trained anywhere in the HuggingFace PEFT ecosystem should work with Reckoning's support, without a Reckoning-specific training or export step.

One prompt, a different behavior

The integration test loads a base model, generates once, activates the adapter, and generates the same prompt again:

ModelFetcher fetcher = new ModelFetcher(
    "unsloth", "Llama-3.2-1B-Instruct");

try (AbstractModel model = AutoModelForCausalLm
        .newBuilder(fetcher).buildLocalTransformerModel()) {
    String baseline = generate(model);
    System.out.println("[base model] " + baseline);

    model.registerLoraAdapter("bunnycore-chatml",
        new LoraAdapterModelFetcher(
            "bunnycore",
            "Llama-3.2-1b-chatml-lora_model"));
    model.setActiveAdapter("bunnycore-chatml");

    String adapted = generate(model);
    System.out.println("[adapter active] " + adapted);
}
>> base model baseline
>> adapter active Hello! I'm an artificial intelligence model, here to provide information and assist with a wide range of topics. I'm designed to be helpful and provide

The test asserts that the adapted response differs from the base response. It then clears the adapter and verifies that the original base behavior returns.