Fine-tuning to change the 'stylistic output' while keeping the LLM brain knowledge?

I have a set prompt that generates the content I’m looking for exceptionally well. I’m now interested in changing the stylistic output to one super unique (my own writing style).

How could I accomplish this while retaining the power of the LLM brain?

Hi,

It is hoped that a tuneable version of GPT-4 will be available by the end of the year, that should be ideal for your needs, fine tuning would be an ideal use case for this when trained on examples of your prior works.

At this moment in time the only models that are tuneable are the base models, the most powerful of which is GPT-003, it’s a very useful model but does not have the abilities of GPT-4.

Have you tried fine-tuning one of the base models to fit your style?

You create the training data by transforming your text into neutral text, using something like GPT-4.

So you have pairs like:

{My text 1} → {Neutral text 1}
{My text 2} → {Neutral text 2}

Then for the training file, you invert this mapping {Prompt}–>{Completion}:
{Neutral text 1} → {My text 1}
{Neutral text 2} → {My text 2}

With enough training data like this, you can create an AI that writes in your style, or has whatever quirky personality that your style contains.

Here, you can use this Playground as a starting point for your neutralizer:

After training, you send neutral text into the model and it spits out text with your tone and unique style. I haven’t done much of this personally, but theoretically it closes. So I’m interested to see if it works for anyone!

2 Likes

Super interesting idea, I would also be interested in the results.

1 Like

Definitely an interesting idea that i’ll be testing out. Will keep you updated.

Could you explain the thought process for going {My Text} → {Neutral Text} first?
I was thinking going {Ai Generated Text} → {Rewritten Ai Text In My Style} format.

Bypassing Ai Detection Classifiers would be the ultimate test for me with this process. I know the issues with them long-term but my ultimate goal is the ability to connect my unique writing style with LLM knowledge on those classifiers.

Suppose you have a large corpus of “your style” text. Either AI generated, or your own writing. So you take, say, each sentence, paragraph, “chunk” of this text, and send it to the GPT-X neutralizer (Playground link above). Then creates the corresponding neutral text. So you now have “Styled”/“Neutral” pairs.

So the training is on all the Neutral chunks, and the target output is the corresponding Styled chunk.

So for your particular case, you could skip the neutralizer. But in general, for non-AI generated text, you do need some sort of neutralizer or “control”.

So … having said this … all you need to do is create a training file with JSONL lines:

{“prompt”:“Ai Generated Text\n\n###\n\n”, “completion”:“Rewritten Ai Text In My Style”}

So now anything coming into your final fine-tuned model will have an output similar to your styled version. You have to “impedance match” or have the input as similar (in style, tone, etc) as your training input “Ai Generated Text” for best results. But you can also try without too.

The completion is always in your target style.

For current base model fine-tuning and ops, don’t forget the ‘\n\n###\n\n’ markers and such.

3 Likes

Could you expand on the differences between the base and instruct model fine tuning? What do people think the biggest differences will be?

The base models are what the fine tuned chat model 3.5-Turbo are based on, GPT-4 is a completely new model.

Up to now, it has not been possible to fine tune these already tuned models further, they are so capable that they can be instructed to perform many of the same tasks as the original base models simply by simply telling them to do so.

What the fine tuneable models later this year (3.5-Turbo tuneable and GPT-4 tuneable) will allow you to do is get the best of both worlds, you will have a AI that you can tune to your style and also retain all of the huge processing and inference power of the chat models.

Hi Curt,

I’m in search of a solution similar to what you mentioned.

It seems the URL is not working. Could you please share the original prompt for the neutralizer?

Also, have you conducted any new research on this topic?

Thanks!

I also need this but couldn’t find it. But searching on the Web I found this: https://promptbase.com/prompt/content-and-text-neutralizer-gpt-prompt

You need to pay to get it but if you read the documentation on the right, you can probably get an idea of how to engineer it yourself:

Summary of Changes:

Removed emotionally charged language (“urgent crisis,” “endanger the future,” etc.).
Replaced subjective assertions with more neutral statements, presenting different perspectives.
Emphasized the presence of scientific consensus while acknowledging differing viewpoints on urgency and necessary actions.
Maintained clarity and readability while avoiding bias in language and tone.
This revision aims to present climate change in a more neutral manner by addressing the different perspectives without taking a stance or using emotionally charged language.