llama-cpp-agent  by Maximilian-Winter

Framework for LLM interaction, function calls, and structured output

created 1 year ago
579 stars

Top 56.7% on sourcepulse

GitHubView on GitHub
Project Summary

This framework simplifies interaction with Large Language Models (LLMs) for developers and researchers. It enables structured output generation, function calling, and retrieval-augmented generation (RAG) even with models not specifically fine-tuned for these tasks, leveraging guided sampling via grammars and JSON schema.

How It Works

The core innovation is guided sampling, which uses grammars and JSON schema to constrain LLM output to desired structures. This allows models to perform tasks like function calling and structured data generation without explicit fine-tuning. The framework supports multiple LLM backends, including llama.cpp server, llama-cpp-python, TGI, and vllm, offering flexibility in deployment.

Quick Start & Requirements

Highlighted Details

  • Supports single and parallel function calling.
  • Integrates RAG with optional colbert reranking.
  • Enables agentic chains (Conversational, Sequential, Mapping).
  • Offers multiple message formatting presets (Mistral, ChatML, Llama 3, etc.) and custom formatter support.

Maintenance & Community

  • Active development with a Discord community available for support and discussion.
  • Contributions are welcomed via pull requests on GitHub.
  • Discord: https://discord.gg/N7f4w7f9

Licensing & Compatibility

  • Released under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The framework's effectiveness with models not fine-tuned for structured output relies on the quality of guided sampling, which may vary. Compatibility with the absolute latest versions of backend LLM libraries should be verified, though the project aims for current compatibility.

Health Check
Last commit

5 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
24 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Daniel Han Daniel Han(Cofounder of Unsloth), and
1 more.

synthetic-data-kit by meta-llama

1.6%
1k
Synthetic data CLI tool for LLM fine-tuning
created 4 months ago
updated 1 week ago
Feedback? Help us improve.