轮廓
原名:outlines
Outlines: structured JSON/regex/Pydantic LLM generation.
- 分类
- 开发提效
- 版本
- v1.0.1
- 作者
- 弈韬(@ra1nzzz)
- 下载
- 1
- 收藏
- 0
- 发布
- 2026-08-25
- 更新
- 2026-09-30
- TRACE 评分
- 3.6 / 5
内容概览
Use Outlines when you need to: - Guarantee valid JSON/XML/code structure during generation - Use Pydantic models for type-safe outputs - Support local models (Transformers, llama.cpp, vLLM) - Maximize inference speed with zero-overhead structured generation - Generate against JSON schemas automatically - Control token sampling at the grammar level GitHub Stars : 12,000+ From : dottxt.ai (formerly .txt) API note (Outlines 1.x): This skill targets the current v1 API. The pre-1.0 helpers (outlines.models.transformers(...), outlines.generate.json/choice/regex/...) have been removed . In v1 you create a model with outlines.from transformers(...) (or from vllm, from llamacpp, from openai) and then call the model directly with an output type: model(prompt, output type). JSON/Pydantic outputs are returned as a JSON string — validate with YourModel.model validate json(result). Outlines constrains…