Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
transformers-CFG
🤗 A specialized library for integrating context-free grammars (CFG) in EBNF with the Hugging Face Transformers
-
sglang
SGLang is a structured generation language designed for large language models (LLMs). It makes your interaction with models faster and more controllable.
-
autogen
A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
It's only the controller that runs in Wasm, not the inference.
The pyctrl is a just a sample controller, you can write a controller that takes any kind of grammar (eg., a yacc grammar [0] - the python code in that example is only used for glueing).
Llama.cpp grammars were quite slow in my testing (20ms per token or so, compared to 2ms for the yacc grammar referenced above).
[0] https://github.com/microsoft/aici/blob/main/controllers/pyct...
This is great generic idea.
It's also possible to wrap it in something user friendly a'la [0].
[0] https://github.com/ollama/ollama/issues/3019
Does it support constrained generation during training?
This is what we need for the large language models I am training for health care use cases.
For example, constraining LLM output is currently done by masking, and having this rust based library would enable novel ways to train LLMs.
Relevant papers:
https://github.com/epfl-dlab/transformers-CFG
https://neurips.cc/virtual/2023/poster/70782
> The most obvious usage of this is forcing a model to output valid JSON
Isn't this something that Outlines [0], Guidance [1] and others [2] already solve much more elegantly?
0. https://github.com/outlines-dev/outlines
1. https://github.com/guidance-ai/guidance
2. https://github.com/sgl-project/sglang
> The most obvious usage of this is forcing a model to output valid JSON
Isn't this something that Outlines [0], Guidance [1] and others [2] already solve much more elegantly?
0. https://github.com/outlines-dev/outlines
1. https://github.com/guidance-ai/guidance
2. https://github.com/sgl-project/sglang
> The most obvious usage of this is forcing a model to output valid JSON
Isn't this something that Outlines [0], Guidance [1] and others [2] already solve much more elegantly?
0. https://github.com/outlines-dev/outlines
1. https://github.com/guidance-ai/guidance
2. https://github.com/sgl-project/sglang
Related posts
- Show HN: Geniusrise, a framework and ecosystem for AI agents
- Show HN: Dealing with Claude 3 XML function calling so you don't have to
- New: LangChain templates – fastest way to build a production-ready LLM app
- Show HN: Prompt-Engineering Tool: AI-to-AI Testing for LLM
- Deploy and Fine-tune large language models on k8s - Trying this out this weekend