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

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
ai

Research direction

Start by reading examples/multi-agent.cpp and the ModelConfig, Model, and Agent APIs to understand how agents share model weights. Compare the requested per-agent GBNF grammar and optional LoRA configuration with the existing interfaces. Done means a documented design and implementation path that supports independent agent configuration without duplicating the base weights.

Written by the indexing model from the issue text.

Description

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 🤗

Dominant language
C++
Stars
207
Forks
30
Avg merge
1d 12h
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.