newhouseb/clownfish
View on GitHub ↗ ★ 328 Python
Constrained Decoding for LLMs against JSON Schema
20 mentions on Hacker News by 9 people: 3 stories, 17 comments · first 2023-03-27 · latest 2023-08-14
20082026
-
https://github.com/newhouseb/clownfish Which I've been using for a while now, also restricts the sampling space to force correct generation, but does so as the result of a different process than yours.
comment by ianbutler · 2023-08-14 · in Show HN: LLMs can generate valid JSON 100% of the time -
I'm not sure how this is different than: https://github.com/1rgs/jsonformer or https://github.com/newhouseb/clownfish or https://github.com/mkuchnik/relm or https://github.com/ggerganov/llama.cpp/pull/1773 or…
comment by BoorishBears · 2023-08-14 · in Show HN: LLMs can generate valid JSON 100% of the time -
…guarantees. A few months ago I built this anyway to suss out how much more expensive it was [1] [1] https://github.com/newhouseb/clownfish#so-how-do-i-use-this-...
comment by newhouseb · 2023-06-14 · in Native JSON Output from GPT-4 -
…is just fine tuning. There's no hard biasing applied :(. You were so close, but so far OpenAI! [1] https://github.com/newhouseb/clownfish [2] https://platform.openai.com/docs/guides/gpt/function-calling
comment by newhouseb · 2023-06-13 · in Function calling and other API updates -
…to finish the blob { "name": "bob", "job": "programmer" } [1] https://github.com/1rgs/jsonformer https://github.com/newhouseb/clownfish Note: guidance is way more general of a tool than these Edit: spacing
comment by evanmays · 2023-05-16 · in A guidance language for controlling LLMs -
I agree, it looks great. A couple similar projects you might find interesting: - https://github.com/newhouseb/clownfish - https://github.com/r2d4/rellm The first one is JSON only and the second one uses regular expressions, but they both…
comment by killthebuddha · 2023-05-16 · in A guidance language for controlling LLMs -
…usage for a particular prompt but better prompting can definitely reduce this significantly. [1] https://github.com/newhouseb/clownfish#so-how-do-i-use-this-...
comment by newhouseb · 2023-05-16 · in A guidance language for controlling LLMs -
https://github.com/newhouseb/clownfish Structural Alignment: Modifying Transformers (like GPT) to Follow a JSON Schema
comment by blatant303 · 2023-05-11 · in When you lose the ability to write, you also lose some of your ability to think -
This seems extremely similar to https://github.com/newhouseb/clownfish
comment by killthebuddha · 2023-05-05 · in ReLLM: Exact Structure for Large Language Model Completions -
Oh nice! I built a similar system a few weeks ago: https://github.com/newhouseb/clownfish I think the main differentiating factor here is that this is better if you have a simpler JSON schema without enums or oneOf constraints. If you do…
comment by newhouseb · 2023-05-02 · in Jsonformer: Generate structured output from LLMs -
You're basically describing https://github.com/newhouseb/clownfish/ , except there it tries to validate the output against JSON schema on the fly.
comment by int_19h · 2023-04-28 · in Ask HN: People who were laid off or quit recently, how are you doing? -
…[2] "Structural Alignment: Modifying Transformers (like GPT) to Follow a JSON Schema" @ https://github.com/newhouseb/clownfish (full disclosure: this is my work)
comment by newhouseb · 2023-04-19 · in Ask HN: AI to study my DSL and then output it? -
And on the other end, there's https://github.com/newhouseb/clownfish to force the model to produce structured output.
comment by int_19h · 2023-04-15 · in Prompt injection: what’s the worst that can happen? -
…but when it comes to force structure on the output data, this approach looks interesting: https://github.com/newhouseb/clownfish TL;DR: it exploits the fact that the model returns probabilities for all the possible following tokens to…
comment by int_19h · 2023-04-11 · in Teaching ChatGPT to speak my son’s invented language -
…be emitted, see "Structural Alignment: Modifying Transformers (like GPT) to Follow a JSON Schema" @ https://github.com/newhouseb/clownfish . Unfortunately, given OpenAI's current API this is only possible on locally run models. That is...…
comment by newhouseb · 2023-04-04 · in Introducing Agents in Haystack: Make LLMs resolve complex tasks -
…try LLaMA. [1] "Structural Alignment: Modifying Transformers (like GPT) to Follow a JSON Schema" @ https://github.com/newhouseb/clownfish
comment by newhouseb · 2023-03-31 · in Could you train a ChatGPT-beating model for $85k and run it in a browser? -
…give us the primitives one day to appropriately steer these models to do the right things (tm). [1] https://github.com/newhouseb/clownfish
comment by newhouseb · 2023-03-27 · in BlenderGPT: Use commands in English to control Blender with OpenAI's GPT-4