Hacker GitHub

← All repos

Hellisotherpeople/Constrained-Text-Generation-Studio

View on GitHub ↗ ★ 217 Python

Code repo for "Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio" at the (CAI2) workshop, jointly held at (COLING 2022)

26 mentions on Hacker News by 3 people: 6 stories, 20 comments · first 2022-10-07 · latest 2025-04-14

Mentions per year 26 mentions · busiest year 2023 (18)
20082026
  1. I wrote the relevant paper about this: https://arxiv.org/abs/2306.15926 https://github.com/Hellisotherpeople/Constrained-Text-Genera...
  2. I have proof from my commit history on the readme to CTGS[1] that my usage of the term "Photoshop for Creative Writing" (What I tried to market it as) predates all of this by... years now. https://github.com/Hellisotherpeople/Constrained-Te…
  3. Oh my god. I wrote a whole library called "Constrained Text Generation Studio" where I mused that I wanted a "Photoshop for Text". I'm not even sure which work predates the other: https://github.com/Hellisotherpeople/Constrained-Text-Genera…
    comment by Der_Einzige · 2024-04-06 · in Photoshop for Text (2022)
  4. I was working on this stuff before it was cool, so in the sense of the precursor to LLMs (and sometimes supporting LLMs still) I've built many things: 1. Games you can play with word2vec or related models (could be drop in replaced with…
    comment by Der_Einzige · 2024-02-05 · in Ask HN: What have you built with LLMs?
  5. I'll shamelessly plug my somewhat related but even less polished take on a text generation studio. I was fascinated by the idea of constraining an LLMs vocabulary and it ended up as a publication and this:…
  6. My mental model for LLMs was built by carefully studying the distribution of its output vocabulary at every time step. There are tools that allow you to right click and see all possible continuations for an LLM like you would in a code…
  7. Yeah, the LLM outputs a distribution of likely next tokens. It is up to the decoder to select one, and it can use a grammar to enforce certain rules on the output. https://github.com/Hellisotherpeople/Constrained-Text-Genera... or…
  8. Sad to see that my related work on token-level constrained text generation is not cited in the paper: https://github.com/Hellisotherpeople/Constrained-Text-Genera... https://aclanthology.org/2022.cai-1.2/
  9. I am in love with this, I tried my hand at building a Constrained Text Generation Studio ( https://github.com/Hellisotherpeople/Constrained-Text-Genera... ), and got published at COLING 2022 for my paper on it (…
    comment by Der_Einzige · 2023-07-21 · in Llama: Add grammar-based sampling
  10. It's far too easy to destroy any type of RLHF done to try to prevent bad behavior from an LLM, and just "fixing the dataset" doesn't really help. For example, if you want a LLM to generate things that look like social security numbers, you…
    comment by Der_Einzige · 2023-07-03 · in FakeToxicityPrompts: Automatic Red Teaming
  11. I agree with you, and I'm SHOCKED at how little work there actually is in phonetics within the NLP community. Consider that most of the phonetic tools that I am using to enforce rhyming or similar syntactic constrained in constrained text…
    comment by Der_Einzige · 2023-06-09 · in Understanding GPT tokenizers
  12. Yup! I wrote a whole paper and constrained text generation studio about this which has gotten some positive attention: https://github.com/Hellisotherpeople/Constrained-Text-Genera... https://replicate.com/blog/turn-your-llm-into-a-poet
    comment by Der_Einzige · 2023-06-09 · in Understanding GPT tokenizers
  13. Re: constraints, it turns out that banning tokens in a vocabulary is a great way to force models to be creative and follow syntactic or semantic constraints without errors: https://github.com/hellisotherpeople/constrained-text-genera...
    comment by Der_Einzige · 2023-05-27 · in Hard stuff when building products with LLMs
  14. Lol all of this is stuff that is trivially fixed with constrained text generation studio: https://github.com/hellisotherpeople/constrained-text-genera... Just ban the damn tokens and try again. I wish that folks had more intuition around…
    comment by Der_Einzige · 2023-05-20 · in Don Knuth plays with ChatGPT
  15. There has been a huge explosion of awesome tooling which utilizes constrained text generation. Awhile ago, I tried my own hand at constraining the output of LLMs. I'm actively working on this to make it better, especially with the lessons…
    comment by Der_Einzige · 2023-05-16 · in A guidance language for controlling LLMs
  16. Is similar to this work on constrained text generation: https://github.com/hellisotherpeople/constrained-text-genera...
  17. Love to see further work on constrained decoding like this and other systems introduced in the comments! See my work and the paper about it. I've got a lot of y'all beat on this (constrained decoding, not the templating and structuring) by…
  18. Yes, you will need to write the tokenizer to behave in the dialect you are trying to write poetry in. An alternate approach is to filter on the output side by writing a sampler that only allows acceptable outputs. I think it would be…
  19. My work on constrained text generation / filter assisted decoding for LLMs is cited in this article! One of my proudest moments was being noticed by my senpai Gwern! https://paperswithcode.com/paper/most-language-models-can-be... I want to…
    comment by Der_Einzige · 2023-04-20 · in GPT-3 Creative Fiction (2020)
  20. The paper at COLING 2022 that I wrote, titled "Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio" included a GUI constrained text generation studio that I market as being "Like Photoshop…
    comment by Der_Einzige · 2022-10-18 · in Photoshop for Text