Library/lm-format-enforcer
Library/lm-format-enforcerForked

noamgat/lm-format-enforcer

lm-format-enforcer

Enforce the output format (JSON Schema, Regex etc) of a language model

Builder

noamgat

noamgat

noamgat • individual

Stars

2,000

Using upstream star count

Forks

89

Using upstream fork count

Open Issues

0

Activity Score

0/100

0 commits in 30d

Created

Sep 21, 2023

Project creation date

README Summary

LM Format Enforcer is a Python library that constrains the output of language models to conform to specific formats like JSON Schema, regex patterns, or custom grammars. It works by filtering the token generation process during inference to ensure the model's output always matches the desired structure. The library supports integration with popular frameworks like Transformers, vLLM, and Guidance.

AI Dev Skills

Unmapped

Language Model Output FormattingConstrained Text GenerationJSON Schema ValidationRegular Expression Pattern MatchingTokenization and Token FilteringLanguage Model IntegrationStructured Data Generation

Tags

Language Model Output FormattingConstrained Text GenerationJSON Schema ValidationRegular Expression Pattern MatchingTokenization and Token FilteringLanguage Model IntegrationStructured Data GenerationCloud APIStructured Output GenerationCode Generation with Syntax ValidationEnterprise SoftwareDatabase Query GenerationTextData ProcessingCodeAPI DevelopmentProduction AI IntegrationConstraint-Based AISelf-hostedAPI Response GenerationStructured Data ExtractionOn-premiseForm Auto-completionReliable AI SystemsConfiguration File GenerationDeveloper ToolsPython

Taxonomy

Recent Activity

Updated 7 months ago

7 Days

0

30 Days

0

90 Days

0

Quality

beta
Quality
medium
Maturity
beta

Categories

Dev Tools & AutomationPrimaryNLP & TextCoding & Dev ToolsOther AI / MLAI Agents

PM Skills

Developer Platform

Languages

Python100.0%

Timeline

Project created
Sep 21, 2023
Forked
Mar 22, 2026
Your last push
7 months ago
Upstream last push
9 days ago
Tracked since
Aug 24, 2025

Similar Repos

pgvector cosine similarity · $0

Loading…