Skip to content

Feature Request: Support for GBNF grammar and LoRA adapters in multi‑agent setups #18

@geoyee

Description

@geoyee

Hi.

First of all, thank you for this great library! The multi‑agent example (examples/multi-agent.cpp) is exactly the pattern I need: a single base model with multiple specialized agents sharing the same weights.

My use case wishes each agent to have its own GBNF grammar and optionally its own LoRA adapter while still sharing the base model weights to save memory.

ModelConfig only exposes n_ctx and temp. I could not find any load_lora() or set_grammar() methods on Model or Agent like 👇

// Example concept
ModelConfig math_config;
math_config.n_ctx = 10240;
math_config.grammar_file = "math.gbnf";
math_config.lora_file = "math_lora.bin";

auto math_model = Model::create_with_weights(shared_weights, math_config);
// Then pass math_model to the MathAgent

What do you think 🤗

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions