Meet Wooly

…the mammoth.

Over the past 5 months we’ve been trying to “steer” a mammoth with a mouse (or something even smaller). Is it possible?

Read more about what we learned here:

(Still can’t believe we did all those.)


Why the mammoth:
Large generative language models like GPT-2 are enormous (over a billion parameters), difficult and expensive and require lots of data to train. Even if someone dealt with the training for you, after training, they behave like giant wooly mammoths—wise but unguided, lumbering wherever they please. It can generate coherent sentences but one can hardly control where the sentence goes, in terms of topic, sentiment, and other kinds of attributes.

Why the mouse:
Now imagine if we want to control such a generation, through a no training mechanism, that is, during the generation, with no modification of model weights. How big of a controller do you think is needed?

The proposed PPLM allows steering giant generative models with tiny attribute models (~100,000 times smaller, roughly the ratio of mouse to mammoth). The attribute models in our canonical setting are either 1) a user-specified bag of words—0 parameter, or 2) a single linear layer—1K parameters per class. Sampling entails a forward and backward pass in which gradients from the attribute model push GPT-2’s hidden activations and thus guide the generation.

Why gradients:
Well. Because.


Enjoy! (Or not. Then just enjoy life.)