15 Repos
Restricting token selection during model inference based on a predefined JSON schema or function signature.
Distinct from Schema Validators: Focuses on the sampling-time restriction of tokens, whereas Schema Validators check data after it has been generated.
Explore 15 awesome GitHub repositories matching data & databases · Schema-Constrained Sampling. Refine with filters or upvote what's useful.
Outlines is a guided text generation framework and structured output engine for large language models. It enforces precise structural constraints on model output during the sampling process to ensure the generation of valid data. The framework ensures that model outputs strictly adhere to predefined data models, including JSON schemas, regular expressions, and formal grammars. This enables the conversion of natural language inputs into structured arguments for function calling and the generation of valid JSON for downstream processing. The system manages model orchestration through prompt te
Restricts token generation to a predefined set of valid options based on JSON schemas or function signatures.
Ludwig is a multimodal machine learning platform and low-code framework designed for building, training, and deploying neural networks. It enables the construction of models that process text, images, audio, and tabular data through a unified interface using declarative configuration files rather than custom code. The system features a specialized low-code framework for large language models, supporting supervised fine-tuning, preference alignment, and a constrained decoding tool to force structured data output via logit extraction. It also includes an automated model architecture search to i
Forces language model outputs into specific formats by masking invalid tokens during the sampling process at inference time.
This project is an on-device AI SDK providing a framework for running large language models, vision models, and speech models locally. It serves as an orchestration layer for local LLM execution, ensuring data privacy and offline availability by utilizing hardware acceleration on the device. The SDK is distinguished by its comprehensive voice and multimodal capabilities, including a coordinated voice pipeline for activity detection, speech-to-text, and text-to-speech synthesis. It also provides a dedicated implementation kit for local retrieval-augmented generation and tools for processing co
Enforces structured JSON or XML output formats by constraining token sampling during the model generation process.
TypeChat is a schema enforcement library and framework for building natural language interfaces. It ensures that responses from large language models strictly adhere to predefined TypeScript type definitions, translating unstructured human language into predictable, structured data. The project functions as both a prompt generator and an output validator. It automatically creates model instructions by extracting requirements from type schemas to replace manual prompt engineering and verifies that model outputs match the required format. The system handles structured output generation and res
Restricts model output to a predefined JSON schema to ensure the data is parsable into typed objects.
mistral.rs is an inference engine for large language models that runs locally and exposes models behind OpenAI and Anthropic-compatible APIs. It serves as a multi-model serving platform, capable of loading several models in a single server process with per-request routing and on-demand loading and unloading. The engine supports multimodal inference, processing text alongside images, video, audio, and speech inputs, and includes a quantized model deployment runtime that reduces memory use and speeds up inference on consumer hardware. The project distinguishes itself through an agentic tool exe
Validates tool call arguments against JSON Schema during decoding to prevent malformed parameters.
CUE is a constraint-based configuration language designed for data validation, schema definition, and code generation. At its core, it unifies types and values into a single concept, enabling compile-time validation that catches structural and value errors before runtime. The language treats data and constraints as the same thing, allowing a single definition to serve as both a schema and concrete configuration data. CUE distinguishes itself through its constraint-based unification engine, which combines multiple configuration sources into a single coherent result by merging their constraints
Uses OpenAPI data schemas directly to validate JSON or YAML data.
Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution. The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It
Parses and validates tool arguments with type coercion and returns annotated error markers.
LiteRT-LM ist ein Hochleistungs-Inferenz-Framework, das darauf ausgelegt ist, Large Language Models lokal auf Mobil-, Desktop- und IoT-Hardware auszuführen. Es dient als On-Device-Modell-Laufzeitumgebung, die CPU-, GPU- und NPU-Beschleunigung nutzt, um eine Verarbeitung mit geringer Latenz zu ermöglichen. Das Framework zeichnet sich durch die Fähigkeit aus, Text-, Bild- und Audioeingaben über eine einzige multimodale Inferenz-Engine zu verarbeiten. Es verfügt über einen lokalen HTTP-Server, der OpenAI-kompatible API-Endpunkte emuliert, sowie eine WebGPU-basierte Laufzeitumgebung zur Ausführung von Modellen direkt im Webbrowser. Um die Zuverlässigkeit der Ausgabe zu gewährleisten, enthält es einen eingeschränkten Textgenerator, der JSON-Schemas oder Grammatikregeln für Modellantworten erzwingt. Das Projekt bietet umfassende Funktionen für zustandsbehaftetes Konversationsmanagement, spekulative Dekodierung für höhere Token-Generierungsgeschwindigkeiten und eine Tool-Calling-Schnittstelle, die Modellanfragen auf externe Funktionen abbildet. Es beinhaltet zudem eine spezialisierte Integration für das Apple-Ökosystem und ein dediziertes Plugin für die Modellausführung in Flutter. Benutzer können Modelle über eine Befehlszeilenschnittstelle ausführen oder sie über native APIs in Anwendungen integrieren.
Implements token selection restrictions based on JSON schemas or grammar rules during model inference.
Lorax is a GPU-accelerated inference server and multi-adapter engine designed for serving large language models. It functions as a high-throughput system capable of deploying models via Kubernetes and managing the dynamic swapping of Low-Rank Adaptation adapters per request. The server distinguishes itself through multi-adapter dynamic batching, which allows requests using different adapter weights to be processed in a single GPU forward pass. It employs just-in-time adapter loading and weighted adapter merging to maximize throughput and enable multi-tasking without sacrificing performance.
Restricts token selection during inference based on a JSON schema to force structured output.
PromptX is an LLM agent orchestration framework designed to execute multi-step workflows using autonomous agents. It features a sandboxed tool execution environment for secure filesystem operations and external API integrations, alongside a persona management system that defines professional roles and domain expertise to control agent behavior. The system implements a semantic memory network for persistent knowledge storage, utilizing graph-based memory and engrams to retain information across sessions. This cognitive memory includes specialized tools for knowledge graph visualization, allowi
Enforces strict parameter types and schema validation for external API and function calls before execution.
The BeeAI Framework is an LLM agent framework and multi-agent orchestration engine used to build autonomous agents that coordinate reasoning, tool execution, and complex workflows. It functions as a structured AI output controller and RAG integration library, providing a unified interface to manage multiple language model providers. The framework is distinguished by its implementation of the Model Context Protocol, allowing agents, tools, and models to be shared between different AI platforms and hosted as agentic tooling servers. It enables the design of collaborative agent teams through dec
Forces model responses into structured formats using JSON schemas and Pydantic models during the generation process.
mcp-context-forge is a Model Context Protocol federation gateway that unifies diverse AI tool servers and APIs into a single consistent interface for discovery and execution. It acts as a centralized proxy that aggregates multiple servers and APIs, allowing AI agents to access and invoke a unified set of tools, prompts, and resources. The project distinguishes itself through a multi-protocol translation bridge that converts communication between standard I/O, SSE, gRPC, and REST to enable interoperability between disparate tool servers. It includes a comprehensive LLM evaluation framework for
Enforces strict JSON Schema validation for tool arguments during registration.
This is a software development kit for integrating the Model Context Protocol into Java applications. It serves as a framework for building AI servers and communication layers that exchange prompts, resources, and tool definitions between AI clients and servers. The SDK provides a transport-agnostic communication layer, allowing bidirectional data exchange over standard I/O, HTTP, or Server-Sent Events. It includes a generative AI resource manager for exposing structured data and prompt templates, and a standardized interface for implementing protocol clients and servers. The project covers
Validates tool arguments against JSON schemas before routing them to server handlers.
This is an asynchronous Swift client library for calling OpenAI’s API across Apple platforms. It provides native access to chat completions, image generation and editing, speech synthesis and transcription, text embeddings, and content moderation through a single interface built on Swift’s async-await concurrency model. The client supports structured output generation by constraining model responses to a provided JSON schema, and enables real-time consumption of generated text through streaming responses delivered as an AsyncSequence. It includes a thread-based conversation model for managing
Forces the model to return structured data that conforms to a provided JSON schema.
Ollama-mcp-bridge is a middleware service that connects local language models to external tools and data sources. It functions as a bridge, enabling models to execute real-world tasks and access live information by translating natural language prompts into standardized protocol-compliant tool calls. The project distinguishes itself by implementing the Model Context Protocol to facilitate communication between local inference environments and remote service providers. It manages these connections through a centralized registry, allowing for the consistent orchestration of multiple external too
Enforces strict data structure requirements on model-generated tool arguments to ensure compatibility with external interfaces.