80,000 Words of Me
You are reading the version a chat model wrote, with no tuning.You are reading the version written by the model trained on my own writing: ten guarded rounds, then a check of every paragraph against the plain version. In a last read, 27 small slips in 24 of the 109 paragraphs were fixed by hand, mostly dropped words and typos. For 37 paragraphs an earlier round was chosen by hand, because the last round read badly. In 11 paragraphs a word or two changed when two posts became three. The opening sentence of the second and third posts was shortened by hand. A fact check then corrected 12 paragraphs in all three versions, and in this version a further 31 sentences in 26 paragraphs where the meaning had drifted from the plain text.You are reading the version a chat model wrote with 22 of my old posts in its system prompt, and no training at all. It is the second technique, described in the first post. It was not checked against the plain version, so its asides and small additions are the model's own. Twelve paragraphs rewritten this way scored 100% AI.
This is the second of three posts. The first post tried the simplest way to borrow a voice, which is to put the author's old posts in the prompt of a chat model. The result sounded like the author, and a detector scored it 100% AI.
This is the second of three posts. The first post tried the simplest way to borrow a voice which is to put the author's old posts in the prompt of a chat model. The result sounded like the author, a detector scored it 100% AI.
This is the second of three posts. In the first post we tried the simplest way to borrow a voice, which is to put the author's old posts in the prompt of a chat model. The result sounded like the author, and a detector scored it 100% AI.
This post takes the harder road. It trains a small model on the author's own writing, and then measures, in two different ways, whether what the model writes sounds like the author. The third post puts that model in front of the detector.
This post takes the hard road. We train a small model on the authors own writing, and then measure in two ways whether what the model writes sounds like the author. In the third post we present that model to the detector.
In this post we take the harder road. We will train a small model on the author's own writing, and then measure, in two different ways, whether what the model writes sounds like the author. In the third post we will put that model in front of the detector.
This is part 2 of three.
- I Didn’t Write This Post: the idea, and the easy way
- 80,000 Words of Me: training a model on my own writing (this post)
- The Detector Was Not Impressed: the detector and the pipeline
The code for all three posts is on GitHub: cloudmark/in-my-voice.
Base models are different
A paper from 2026, Base Models Look Human To AI Detectors by Xu and colleagues, reports a useful observation. A base model is a language model that has only been trained to continue text, before it is taught to follow instructions. When a base model continues a human-written opening, GPTZero rates the result as 96.7% human. The instruction-tuned version of the same model gets 30.3%.
Xu and co in 2026 presented a paper Base Models Look Human To AI Detectors. In their paper the authors discuss the following interesting insight. Base model refers to a language model which is only trained to continue text - it is not trained to follow instructions yet. When a base model continues a human written opening GPTZero will rate this result as 96.7% human. The instruction-tuned version of the same model will be rated as 30.3% human.
A paper from 2026, Base Models Look Human To AI Detectors by Xu and colleagues, reports a rather useful observation. A base model is a language model that has only been trained to continue text, before it is taught to follow instructions. When a base model continues a human-written opening, GPTZero rates the result as 96.7% human. The instruction-tuned version of the same model gets 30.3%.
The authors turn this into a method called Humanization by Iterative Paraphrasing. They take a base model and train a small add-on, a LoRA adapter, on pairs of text. Each pair has an AI-style paraphrase as the input and the original human paragraph as the output. They published the code and the adapters. The experiment in this post starts from their adapter and continues the training on a single author.
So how did the authors "convert" this idea and what have they proposed. They proposed a technique name Humanisation by Iterative Paraphrasing. Given a model they train a small add on (LoRA adapter) on a pairs of text. One text being an AI style paraphrase and the other being the human paragraph. They have published the code and adapters. In this experiment we will start from this adapter and train further on a single author.
The authors turn this into a method called Humanization by Iterative Paraphrasing. They take a base model and train a small add-on, a LoRA adapter, on pairs of text. Each pair has an AI-style paraphrase as the input and the original human paragraph as the output. They published the code and the adapters (thank you!). The experiment in this post starts from their adapter and continues the training on a single author.
The training set
The source material is documents the author wrote before chat models existed, so every word in them is known to be human-written. They were cut into paragraphs.
- Paragraphs between 25 and 160 words were kept, and longer ones were split at sentence boundaries.
- Paragraphs made mostly of formulas, references, captions or links were removed.
- Near-copies, such as a draft and the final version of the same text, were counted once.
The source material is documents the author wrote before chat models existed, so every word in them is known to be human written. They were cut into paragraphs.
- Paragraphs between 25 and 160 words were kept, and longer paragraphs were split at sentence boundaries.
- Paragraphs made mostly of formulas, references, captions or links were removed.
- Near-copies, such as a draft and the final version of the same text, were counted once.
The source material is documents the author wrote before chat models existed, so every word in them is known to be human-written. We cut them into paragraphs.
- Paragraphs between 25 and 160 words were kept, and longer ones were split at sentence boundaries.
- Paragraphs made mostly of formulas, references, captions or links were removed.
- Near-copies, such as a draft and the final version of the same text, were counted once.
For each remaining paragraph, a chat model wrote a bland paraphrase. The model was Qwen 3.5 with 122 billion parameters, running on a Mac Studio through exo, so none of the text left the machine. The instruction was to paraphrase the paragraph in neutral, polished, textbook-style English while keeping every fact, name and term. Pairs where the paraphrase was much shorter or much longer than the original were dropped.
For each remaining paragraph a chat model wrote a bland paraphrase. The chat model used was Qwen 3.5 with 122 billion parameters on a Mac Studio machine via exo, thus no text left the machine. The instruction was to paraphrase the paragraph in neutral, polished, textbook-style English but keeping every fact, name and term. We dropped pairs where the paraphrase was much shorter than the original or vice-versa.
For each remaining paragraph, a chat model wrote a bland paraphrase. The model was Qwen 3.5 with 122 billion parameters, running on a Mac Studio through exo, so none of the text left the machine. The instruction was to paraphrase the paragraph in neutral, polished, textbook-style English while keeping every fact, name and term. Pairs where the paraphrase was much shorter or much longer than the original were dropped.
This left 1,418 pairs. Before any training they were split into two groups, and the two groups have different jobs.
This leaves 1,418 pairs. Before we train let us divide the pairs in two groups and let the two groups do different jobs.
This left us with 1,418 pairs. Before any training they were split into two groups, and the two groups have different jobs.
The larger group is the training set, with 1,259 pairs. These are the examples the model learns from. It is shown each one, it is told what the author really wrote, and it is adjusted a little. Together they hold 79,367 words of the author's writing.
So the big guy here is our training set - we have 1,259 pairs. These are the examples which the model will learn from. In each of these examples the model is given the example, is told what the author wrote and the model is slightly tweaked. Combined these give us 79,367 words of the authors writing.
The larger group is the training set, with 1,259 pairs. These are the examples the model learns from. It is shown each one, it is told what the author really wrote, and it is adjusted a little. Together they hold 79,367 words of the author's writing.
The smaller group is the test set, with 159 pairs. It is also called the held-back set, because the model never sees these pairs during training. They work like exam questions that were not in the textbook. If the model does well on them, it has learned how the author writes, and has not just memorised the examples it was shown. Roughly one pair in nine was held back, chosen at random, with every kind of document represented.
The smaller set is the test set (159 pairs). The test set is also referred to as the held back set. The test set should never be used in training. It is similar to the questions we encountered on the exam which were not in the textbook. If the model does well on the test set this indicates that it must have learnt how the author writes rather than memorised the examples. We held back roughly one pair of each nine. This was done randomly and all document types were represented.
The smaller group is the test set, with 159 pairs. It is also called the held-back set, because the model never sees these pairs during training. Think of them as exam questions which were not in the textbook. If the model does well on them, it has learned how the author writes and has not just memorised the examples it was shown. Roughly one pair in nine was held back, chosen at random, with every kind of document represented.
| Set | Pairs | What it is used for |
|---|---|---|
| All pairs | 1,418 | |
| Training set | 1,259 | The model learns from these |
| Held-back set (test set) | 159 | Scoring the loss on paragraphs the model has never seen |
| Part of the held-back set | 50 | Counting habits in what the model writes, later in this post |
One pair from the training set, with the chat model’s version first:
Bland input. Following the viral success of our game lobby, we are prepared to enter a new market: Sweden. To ensure local relevance, we intend to adapt our application to support both Swedish and English. Our initial step involves creating a parent state designed to capture the relevant segment of the URL.
What I wrote in 2017. Our game lobby has gone viral and we are ready to take on a new market. Next stop Sweden! In order to be local we would like to convert our application to support both Swedish and English. We will first create a parent state which will capture the part of the URL.
The training recipe
The base model is Qwen3-14B-Base. On top of it sits the published adapter, which has rank 128 and adds 514 million trainable values to a model of 14 billion. Each example is written as plain text with the paraphrase between source tags and the original paragraph between target tags. The loss is computed only on the target, so the model is never rewarded for copying the bland input.
Base model is Qwen3-14B-Base. There is a published adapter on top of the base model. Rank of the adapter is 128. The adapter adds 514M trainable values on top of the 14B model. Each example is written in plain text. Paraphrases are written between the source tags and the original paragraph is written between the target tags. The loss is computed only on the target (model never rewarded for copying the bland input).
The base model is Qwen3-14B-Base. On top of it sits the published adapter, which has rank 128 and adds 514 million trainable values to a model of 14 billion. Each example is written as plain text with the paraphrase between source tags and the original paragraph between target tags. Note that the loss is computed only on the target, so the model is never rewarded for copying the bland input.
The settings follow the paper and its published code, with one change: a learning rate of 0.00005 with a cosine schedule, and a warm-up over the first 3% of steps. The change is the batch, which is 4 examples here and 16 in the paper. The training ran on the Mac Studio's GPU in 32-bit floating point. One example took about 1 second and one pass over the 1,259 pairs took 22 minutes.
We will make use of the following setting (as in the paper and its published code) lr = 0.00005 cosine schedule with warm-up for the first 3% of steps. One thing is different - our effective batch = 4 examples while the paper uses 16. We have trained on the Mac Studio's GPU in 32-bit floating point. One example takes 1 second and one pass over the 1,259 pairs takes 22 minutes.
The settings follow the paper and its published code, with one change: a learning rate of 0.00005 with a cosine schedule, and a warm-up over the first 3% of steps. The change is the batch, which is 4 examples here and 16 in the paper. The training ran on the Mac Studio's GPU in 32-bit floating point. One example took about 1 second and one pass over the 1,259 pairs took 22 minutes.
Training goes through the 1,259 pairs one at a time. For each pair the model predicts the author's paragraph, a number called the loss says how far off it was, and the 514 million values are nudged so that the loss would be a little smaller next time. Going through every training pair once is called a pass. The next section explains the loss, and the one after it shows what happens when there is more than one pass.
Training works by iterating over the 1,259 pairs one by one. For each pair the model predicts the authors paragraph, a number (the loss) tells us how off we are and the 514 million values are nudged slightly so that the loss is smaller next time. Iterating through each pair once is called one pass. In the next section we will explain the loss and in the one after what happens when we have more than one pass.
Training goes through the 1,259 pairs one at a time. For each pair the model predicts the author's paragraph, a number called the loss says how far off it was, and the 514 million values are nudged so that the loss would be a little smaller next time. Going through every training pair once is called a pass. The next section explains the loss, and the one after it shows what happens when we do more than one pass.
def encode(pair):
# the loss counts only the author's paragraph and the closing tag
prompt = '<source_text>\n' + pair['source'] + '\n</source_text>\n\n<target_text>\n'
a = tok(prompt)['input_ids']
b = tok(pair['target'] + '\n</target_text>')['input_ids'] + [tok.eos_token_id]
return torch.tensor([a + b]), torch.tensor([[-100] * len(a) + b])
model = AutoModelForCausalLM.from_pretrained('Qwen/Qwen3-14B-Base', dtype=torch.float32)
model = PeftModel.from_pretrained(model, 'YixuanEvenXu/Qwen3-14B-Base-HIP-adapter', is_trainable=True).to('mps')
opt = torch.optim.AdamW([p for p in model.parameters() if p.requires_grad], lr=5e-5)
for k, i in enumerate(order, 1): # one pass over the 1,259 pairs
ids, labels = train[i]
loss = model(input_ids=ids, labels=labels).loss
(loss / 4).backward() # four examples per update
if k % 4 == 0:
torch.nn.utils.clip_grad_norm_(params, 1.0)
opt.step(); sched.step(); opt.zero_grad()
How the model is scored: the loss
A language model does not write a word. It gives every possible next word a probability, and one is drawn. The loss measures how much probability the model gave to the words the author really wrote. Nothing is generated during this test.
Language models do not write a word. They give the next possible words with probabilities and one is drawn. The loss is how much probability the model has given to the words which the author has really written. No generation is performed in this test.
A language model does not write a word. What it does is give every possible next word a probability, and then one is drawn. The loss measures how much probability the model gave to the words the author really wrote. Nothing is generated during this test.
Take one held-back pair. It has two halves: the bland paraphrase, and the paragraph the author really wrote. Suppose the author's paragraph begins with the words The settings follow the paper. The test walks through that paragraph one word at a time and asks the model the same question at every step: given everything so far, how likely is the word that really comes next?
Pick a held back pair. A pair has two parts - a bland paraphrase and the paragraph which the author actually wrote. Say that the authors paragraph starts with The settings follow the paper. The test will go through the paragraph one word at a time and will ask the model: Given all that we have seen thus far, what is the probability that the word which really comes next comes? And so on for each word.
Let's take one held-back pair. It has two halves: the bland paraphrase, and the paragraph the author really wrote. Suppose the author's paragraph begins with the words The settings follow the paper. The test walks through that paragraph one word at a time and asks the model the same question at every step: given everything so far, how likely is the word that really comes next?
- At the first step the model is shown the bland paraphrase and the word The, and it is asked for the probability of settings.
- At the second step it is shown the bland paraphrase and The settings, and it is asked for the probability of follow.
- At the third step it is shown The settings follow, and it is asked for the probability of the.
Each step adds one more real word to what the model can see.
- In step one we present the model with the bland paraphrase and The and ask for the probability of settings.
- In step two we show the model the bland paraphrase and The settings and ask for the probability of follow.
- In step three we show the model the settings follow and ask for the probability of the.
In each step an additional word is revealed.
- At the first step the model is shown the bland paraphrase and the word The, and we ask it for the probability of settings.
- At the second step it is shown the bland paraphrase and The settings, and we ask it for the probability of follow.
- At the third step it is shown The settings follow, and we ask for the probability of the.
Observe that each step adds one more real word to what the model can see.
The words the model is shown are always the words the author wrote, never the words it would have guessed. If it thought the second word should be parameters, it is still shown settings before the third question is asked. This matters for two reasons. One wrong guess cannot spoil every answer that comes after it. And every answer measures the same thing: how well the model knows this author at this point in this paragraph.
Always display the words of the author rather than the model words. If the model guesses that the second word would have been parameters but the author actually wrote setting - then always show the authors words when the model is being asked the third question. This is important for two reasons. One wrong guess should not spoil all the subsequent answers. Every answer is a measurement of the same thing - how well does the model know this author at this point in this paragraph.
Note that the words the model is shown are always the words the author wrote, never the words it would have guessed. If it thought the second word should be parameters, it is still shown settings before we ask the third question. This matters for two reasons. One wrong guess cannot spoil every answer that comes after it. And every answer measures the same thing - how well the model knows this author at this point in this paragraph.
Each answer is turned into a penalty. The penalty is the negative logarithm of the probability that the model gave to the real word. The logarithm is used because of how it behaves at the two ends.
- A probability of 0.9 gives a penalty of 0.11.
- A probability of 0.5 gives 0.69.
- A probability of 0.01 gives 4.6.
A model that is confident and right pays almost nothing. A model that is confident and wrong pays a great deal, far more than it saved by being right somewhere else.
So let’s convert each answer to a penalty. We could define the penalty as the negative log of the probability of the model assigned to the real word. We take the log because log is very nice at both ends. 0.9 becomes 0.11. 0.5 becomes 0.69. 0.01 becomes 4.6. The model which is confident and right pays almost nothing. The model which is confident and wrong pays a great deal. Far more than it saved by being right somewhere else.
Each answer is then turned into a penalty. The penalty is the negative logarithm of the probability that the model gave to the real word. Why a logarithm? Because of how it behaves at the two ends. A probability of 0.9 gives a penalty of 0.11. A probability of 0.5 gives 0.69. A probability of 0.01 gives 4.6. A model that is confident and right pays almost nothing, but a model that is confident and wrong pays a great deal - far more than it saved by being right somewhere else. Ouch!
The table below shows the four steps for the opening of that paragraph. The model found the word settings hard to predict, so the first penalty is large. It found the word the easy, so the third penalty is small.
The table below shows the four steps when we open the paragraph. Note in this case the model has a hard time guessing the word settings thus the high first penalty. The model was able to easily guess the word the hence the low penalty.
The table below shows the four steps for the opening of that paragraph. The model found the word settings hard to predict so the first penalty is large. It found the word the easy, so the third penalty is small.
| What the model has been shown | The real next word | Probability it gave that word | Penalty |
|---|---|---|---|
| The bland paragraph, then “The” | settings | 0.20 | 1.61 |
| … “The settings” | follow | 0.45 | 0.80 |
| … “The settings follow” | the | 0.90 | 0.11 |
| … “The settings follow the” | paper | 0.60 | 0.51 |
| Average over these four | 0.76 |
The probabilities in this table are made up to show the arithmetic. The penalties are the real negative logarithms of them.
The loss of a paragraph is the average penalty over all its pieces. The loss of the model is the average over all the held-back paragraphs. The pieces are tokens, not words: a token is a short word or a part of a longer one, and this kind of text has about 1.2 tokens per word. The bland paraphrase is never scored, only the author's paragraph.
Loss of a paragraph is the average of the pieces penalties. Loss of our model is the average of the losses of the held back paragraphs. Pieces are tokens not words. A token is a short word or a part of a longer word. Our text has about 1.2 tokens per word. The bland paraphrase is never scored: only the authors paragraph.
The loss of a paragraph is the average penalty over all its pieces, and the loss of the model is the average over all the held-back paragraphs. Note that the pieces are tokens and not words; a token is a short word or a part of a longer one, and this kind of text has about 1.2 tokens per word. The bland paraphrase is never scored, only the author's paragraph.
The number has a plain reading. Raise e to the loss and you get the number of equally likely choices the model was hesitating between, on average, at each token.
- A loss of 1.014 is about 2.8 choices.
- A loss of 0.807 is about 2.2.
Training narrows down what the author's next word is.
The number has a plain reading. Raise e to the loss and you get the number of equally likely choices that the model was hesitating between on average at each token.
- A loss of 1.014 is about 2.8 choices.
- A loss of 0.807 is about 2.2.
Training narrows down what the authors next word is.
The number has a plain reading. Raise e to the loss and you get the number of equally likely choices the model was hesitating between, on average, at each token.
- A loss of 1.014 is about 2.8 choices.
- A loss of 0.807 is about 2.2.
In other words, training narrows down what the author's next word is.
The loss must be measured on held-back pairs. On the training pairs it keeps falling for as long as the training runs, because the model starts to memorise them. On pairs it has never seen it falls and then rises again. The turning point is where learning the voice ends and memorising begins.
So let us try and track the loss of the held back pairs. The loss on the training pairs will continue to fall for as long as the training is running due to the fact that the model will start memorising the pairs. The loss on the never seen pairs will fall and rise again. The turning point will illustrate when the learning of the voice ends and memorising begins.
The loss must be measured on held-back pairs. On the training pairs it keeps falling for as long as the training runs, because the model starts to memorise them. On pairs it has never seen it falls and then rises again. The turning point is where learning the voice ends and memorising begins - think of it as the point where the model stops reading and starts cramming!
One pass is enough
Before training, the loss on the 159 held-back pairs was 1.014. After the first pass it fell to 0.807. After the second pass it rose to 0.823, and after the third to 0.968, while the loss on the training pairs kept falling to 0.279. Even with 1,259 examples, extra passes make the model memorise the paragraphs instead of learning from them. The adapter saved after the first pass was used for everything that follows.
Initially before we run the loss for the 159 held back pairs was 1.014. After the first pass the loss has decreased to 0.807. After the second pass the loss has increased to 0.823 and after the third pass the loss has increased further to 0.968 while the loss on the training pairs continues decreasing to 0.279. With 1,259 examples the model starts memorising the paragraph rather than learning from the examples with additional passes. I have used the adapter saved after the first pass for all subsequent tasks.
Before training, the loss on the 159 held-back pairs was 1.014. After the first pass it fell to 0.807. After the second pass it rose to 0.823, and after the third to 0.968, while the loss on the training pairs kept falling to 0.279. Even with 1,259 examples, extra passes make the model memorise the paragraphs instead of learning from them. The adapter saved after the first pass is the one we will use for everything that follows.
| Loss on the 1,259 training pairs | Loss on the 159 held-back pairs | Choices per token (e to the loss) | |
|---|---|---|---|
| Before training | 1.014 | 2.8 | |
| After pass 1 | 0.822 | 0.807 | 2.2 |
| After pass 2 | 0.561 | 0.823 | 2.3 |
| After pass 3 | 0.279 | 0.968 | 2.6 |
From here on there are two adapters to tell apart. The published adapter is the one that Xu and colleagues released, which learned from the writing of many people. The tuned adapter is the same adapter after one more pass of training on the pairs of the author. It is the model this post set out to make, and the next section tests whether the extra pass made a difference.
From here on there are two adapters to tell apart. Published Adapter is the adapter which Xu et al published which learnt from writings of many people. Tuned adapter is the same adapter after one more pass of training on the pairs of the author. This is the model which this post will attempt to create. In the next section we will see whether this extra pass made any difference.
From here on we have two adapters to tell apart. The published adapter is the one that Xu and colleagues released - it learned from the writing of many people. The tuned adapter is the very same adapter after one more pass of training on the pairs of the author. This is the model this post set out to make, and in the next section we will test whether the extra pass made a difference. Let's see!
Does it sound like the author
The loss says how well the model predicts the author. It does not say what the model writes when it is left to write. So the second test lets it write. Writing takes much longer than scoring, so this test used 50 of the 159 held-back paragraphs. For each of the 50 there are four texts with the same content: the bland paraphrase, the rewrite by the published adapter, the rewrite by the tuned adapter, and the paragraph the author really wrote. Habits can be counted in each.
The loss represents how close can the model predict the author. The loss does not represent what the model writes when we let it write. This is why the second test let the model write. Writing is significantly slower than scoring. To make the test faster we will use 50 paragraphs from the 159 paragraphs we kept for testing. For each of the 50 paragraphs we have four texts which contain the same content; the bland paraphrase, the rewrite by the published adapter, the rewrite by the tuned adapter and the paragraph the author really wrote. Habits can be counted in each.
The loss tells us how well the model predicts the author, but it does not tell us what the model writes when it is left to write on its own. So for the second test we let it write. Writing takes much longer than scoring so this test used 50 of the 159 held-back paragraphs. For each of the 50 we have four texts with the same content: the bland paraphrase, the rewrite by the published adapter, the rewrite by the tuned adapter, and the paragraph the author really wrote. Now we can count habits in each.
The simplest habit is one word. The real paragraphs use we 29.5 times per 1,000 words. The bland paraphrases use it 5.1 times. The published adapter raises this to 14.1 and the tuned adapter to 21.8. The tuning has not copied the author, but it has moved the text most of the way.
We is the simplest habit. The real paragraphs use we 29.5 times per 1,000 words. The bland paraphrases use it 5.1 times. The published adapter raises this to 14.1 and the tuned adapter to 21.8. The tuning has not copied the author but it has moved the text most of the way.
The simplest habit is one word. The real paragraphs use we 29.5 times per 1,000 words. The bland paraphrases use it 5.1 times. The published adapter raises this to 14.1 and the tuned adapter to 21.8. The tuning has not copied the author but it has moved the text most of the way. Not bad!
One word is a narrow test, so more habits were counted in the same way. Each row of the table below is a count per 1,000 words, or a share of sentences. They are small things nobody chooses on purpose: how often a writer says I or you, how often two words are joined into one with an apostrophe, how often a sentence runs past 30 words.
So one word is a narrow test; I counted more habits in the same way. Rows in the table below are counts per 1,000 words or shares of sentences. They are little things nobody chooses on purpose; how often a writer says I or you, how often two words are joined into one with an apostrophe, how often a sentence runs past 30 words.
One word is a narrow test, so let us count more habits in the same way. Each row of the table below is a count per 1,000 words, or a share of sentences. These are small things nobody chooses on purpose: how often a writer says I or you, how often two words are joined into one with an apostrophe, how often a sentence runs past 30 words.
- Bland paraphrase
- Published adapter
- Tuned adapter
| On 50 held-back paragraphs | Bland paraphrase | Published adapter | Tuned adapter | What I really wrote |
|---|---|---|---|---|
| “we” per 1,000 words | 5.1 | 14.1 | 21.8 | 29.5 |
| “you” per 1,000 words | 0.0 | 3.3 | 3.8 | 2.6 |
| “I” per 1,000 words | 0.4 | 1.1 | 0.8 | 2.6 |
| “so”, “hence”, “thus” per 1,000 words | 0.8 | 2.2 | 3.8 | 3.7 |
| Contractions per 1,000 words | 0.4 | 5.8 | 1.5 | 3.4 |
| Exclamation marks per 1,000 words | 0.0 | 0.4 | 0.4 | 0.7 |
| Semicolons per 1,000 words | 4.3 | 1.1 | 2.3 | 1.1 |
| Brackets per 1,000 words | 5.1 | 2.9 | 3.8 | 6.3 |
| Average sentence, in words | 18.8 | 19.4 | 18.7 | 20.2 |
| Sentences of 30 words or more | 9% | 10% | 10% | 15% |
| Sentences of 6 words or fewer | 5% | 5% | 11% | 6% |
| Words shared with the real paragraph | 0.600 | 0.576 | 0.634 | 1.000 |
| Common-word profile, distance from my other writing | 27.8 | 17.0 | 10.8 | 11.0 |
The last two rows need explaining. Words shared with the real paragraph compares the rewrite with what the author wrote, word by word, and gives 1 if every word matches and 0 if none does. The bland paraphrase scores 0.600, because it has the same facts and so many of the same words. The tuned rewrite scores 0.634.
Ok, let’s try to understand the last two rows. Words shared with real paragraph compares the rewrite with the paragraph the author wrote word by word and gives 1 if all the words match and 0 if none match. The bland paraphrase scores 0.600 due to the same facts and thus most words match. The tuned rewrite scores 0.634.
The last two rows need some explaining. Words shared with the real paragraph compares the rewrite with what the author wrote, word by word, and gives 1 if every word matches and 0 if none does. The bland paraphrase scores 0.600, since it has the same facts and hence so many of the same words. The tuned rewrite scores 0.634.
The last row is the common-word profile, an old method for deciding who wrote an anonymous text. Every writer uses the small common words, such as the, of, which and so, at rates of their own. Nobody chooses these rates, and they do not depend on the subject, so they work like a fingerprint.
Last row is the common word profile. It is an old technique - to find out who wrote an anonymous text. Every writer uses small common words - the, of, which and so - at rates of their own. Nobody chooses these rates and these rates do not depend on the subject - so they work like a fingerprint.
The last row is the common-word profile, an old method for deciding who wrote an anonymous text. Every writer uses the small common words, such as the, of, which and so, at rates of their own. Nobody chooses these rates and they do not depend on the subject, so you can think of them as a fingerprint.
To build the fingerprint, take a large sample of the author's writing and find the 150 words used most often. For each word, work out what share of all the words it takes up. The result is a list of 150 numbers. A list like this is called a vector, and it can be made for any text: count the same 150 words in it and write down their shares.
So now let us try and make the fingerprint. Making the fingerprint is as follows: We take a big sample of the authors writing and try to work out the 150 most used words. Then we compute the share of each word with respect to the total number of words used. In the end we are left with a list of 150 numbers. We will call this list a vector. We can create a vector from any text. For our vector we will also count the same 150 words and write down the shares.
To build the fingerprint, we take a large sample of the author's writing and find the 150 words used most often. For each word we work out what share of all the words it takes up. The result is a list of 150 numbers. A list like this is called a vector, and it can be made for any text - just count the same 150 words in it and write down their shares.
Two texts by the same writer give two lists that are nearly the same. Two texts by different writers give lists that disagree on many words. The chart below shows this for twelve of the 150 words. For each word, the author's usual rate is set to 1. A dot at 2 means that the text uses the word twice as often as the author usually does, and a dot at 0.5 means half as often.
When we compare two texts written by the same author we have two lists which are almost identical. When we compare two texts written by different writers we have two lists which disagree on many words. In the following diagram the words are illustrated for the twelve out of the 150 words. The authors usual rate is set to 1. A dot at 2 represents that the text uses the word twice as often as the author usually does and half as often at 0.5.
Two texts by the same writer give two lists which are nearly the same. Two texts by different writers give lists which disagree on many words. The chart below shows this for twelve of the 150 words. For each word, the author's usual rate is set to 1. A dot at 2 means that the text uses the word twice as often as the author usually does, and a dot at 0.5 means half as often.
- My own held-back paragraphs
- Bland paraphrase
- Tuned adapter
The orange dots are the bland paraphrase, and they are scattered. It uses we about a fifth as often as the author, which about a sixth as often, and have almost never. The blue dots are the tuned rewrite. On those three words it sits at 0.94, 1.21 and 1.05, next to the grey dots of the author's own paragraphs. It is not perfect: it uses be nearly twice as often as the author, and from about half as often.
We have some orange dots which are the bland paraphrase. It is scattered. It uses we about a fifth as often as the author, which about a sixth as often and have almost never. The blue dots are the tuned rewrite. On those three words it sits at 0.94, 1.21 and 1.05, next to the grey dots of the author’s own paragraphs. It is not perfect: it uses be nearly twice as often as the author, and from about half as often.
The orange dots are the bland paraphrase, and as you can see they are scattered. It uses we about a fifth as often as the author, which about a sixth as often, and have almost never. The blue dots are the tuned rewrite. On those three words it sits at 0.94, 1.21 and 1.05, right next to the grey dots of the author's own paragraphs. It is not perfect though: it uses be nearly twice as often as the author, and from about half as often.
| Word | Share of my words | My own held-back paragraphs | Bland paraphrase | Published adapter | Tuned adapter |
|---|---|---|---|---|---|
| “the” | 7.20% | 0.83× | 0.92× | 0.88× | 0.95× |
| “to” | 3.19% | 0.96× | 0.98× | 1.15× | 0.99× |
| “is” | 2.06% | 0.98× | 0.95× | 1.32× | 1.00× |
| “we” | 2.32% | 1.27× | 0.22× | 0.56× | 0.94× |
| “in” | 1.96% | 0.87× | 0.52× | 0.70× | 0.71× |
| “will” | 1.26% | 1.07× | 0.53× | 0.66× | 1.31× |
| “which” | 0.74% | 1.00× | 0.16× | 0.29× | 1.21× |
| “be” | 0.64% | 1.16× | 1.59× | 1.92× | 1.81× |
| “have” | 0.61% | 0.86× | 0.06× | 0.71× | 1.05× |
| “our” | 0.55% | 1.15× | 0.43× | 0.46× | 0.96× |
| “from” | 0.47% | 1.10× | 0.50× | 0.54× | 0.55× |
| “it” | 0.46% | 1.80× | 2.32× | 2.46× | 1.48× |
Each figure is the word’s rate in that text divided by its rate in the rest of my writing. The texts are the 50 held-back paragraphs, about 2,600 words each, so single words wobble.
The chart shows twelve words. To compare all 150 at once, the gaps are added up into a single distance. The sum used here is called the Jensen-Shannon divergence, which is a way of adding the gaps so that very rare words do not count for too much. Zero means that the two texts use all 150 words at exactly the same rates, and a bigger number means they are further apart.
So let us count these words that we find in the chart. There are twelve words. To compare all 150 at once we will add up the gaps into one distance. The sum that we use here is called the Jensen-Shannon divergence and is one of the ways of adding up the gaps so that very rare words don't count for too much. Zero means that the two texts use all 150 words at exactly the same rate and a bigger number means they are further apart.
The chart only shows twelve words, but we want to compare all 150 at once, so the gaps are added up into a single distance. The sum we will use is called the Jensen-Shannon divergence - think of it as a way of adding up the gaps so that very rare words do not count for too much. Zero means that the two texts use all 150 words at exactly the same rates and a bigger number means they are further apart.
No two samples of one person match exactly. The 50 real paragraphs, compared with the rest of the author's writing, are at a distance of 11.0. That is the natural difference between the author and the author, and no model can be expected to do better.
- The bland paraphrases are at 27.8.
- The published adapter brings that down to 17.0, and the tuned adapter to 10.8.
On this measure the tuned model is as close to the author as the author is.
There is no two samples from one person which matches perfectly. The distance between the 50 real paragraphs and the rest of the authors work is 11.0. This is what we should expect from two samples from the same author and it is unreasonable to expect a model to do better.
- The bland paraphrases are at 27.8.
- The published adapter reduces this to 17.0 while the tuned adapter reduces it to 10.8.
On this measure the tuned model is as close to the author as the author himself.
Here is the thing, no two samples of one person ever match exactly. The 50 real paragraphs, compared with the rest of the author's writing, sit at a distance of 11.0. That is the natural difference between the author and the author (my head hurts!) so no model can be expected to do better than that. The bland paraphrases sit at 27.8. The published adapter brings that down to 17.0 and the tuned adapter to 10.8. On this measure the tuned model is as close to the author as the author is. Pretty neat huh?!
It is not a perfect copy. The tuned model is more formal than the author: it uses fewer contractions, says I less often, and writes too few long sentences. It also writes more very short sentences than the author does. These counts come from one rewrite of each paragraph, so small differences mean little, but those four are large enough to be real.
Not a perfect copy. The tuned model is more formal than the author - uses less contractions, says I less often and writes too few long sentences. Writes more very short sentences than the author. These counts come from one rewrite of each paragraph - small differences mean little - but those four are large enough to be real.
It is not a perfect copy though. The tuned model is more formal than the author: it uses fewer contractions, says I less often and writes too few long sentences. It also writes more very short sentences than the author does. Note that these counts come from one rewrite of each paragraph, so small differences mean very little, but those four are large enough to be real.
Publishing the model
The result of all this is one file of about 2 GB: a LoRA adapter that sits on top of Qwen3-14B-Base. In a narrow sense it is a model of how the author writes. It is published on Hugging Face as cloudmark/cloudmark-voice-qwen3-14b, so that the experiment can be repeated and so that anyone can try it on their own text.
So what we end up with after all of this is one file - a 2 GB - LoRA adapter on top of Qwen3-14B-Base. In a narrow sense this is a model of how I write. It is published on Hugging Face - cloudmark/cloudmark-voice-qwen3-14b - so that others can reproduce this experiment and anyone can have a play around with their own text.
The end result of all this is one file of about 2 GB - a LoRA adapter which sits on top of Qwen3-14B-Base. In a narrow sense it is a model of how the author writes. It is published on Hugging Face as cloudmark/cloudmark-voice-qwen3-14b so that you can repeat the experiment and try it out on your own text.
hf auth login
hf repo create cloudmark/cloudmark-voice-qwen3-14b --repo-type model
hf upload cloudmark/cloudmark-voice-qwen3-14b ./voice-adapter/epoch-1 . --repo-type model
Using it takes a few lines. The text to rewrite goes between the source tags, the prompt ends with an open target tag, and the model continues from there. Sampling several candidates matters, for reasons the third post makes painfully clear.
So making a call with it is really quite easy. It takes couple of lines of code. The text which we will re-write goes between the source tags, prompt ends with an open target tag and model continues from there. Sampling several candidates does matter and the third post makes it really clear why.
Using it is easy - just a few lines. The text to rewrite goes between the source tags, the prompt ends with an open target tag and the model simply continues from there. Note that we sample several candidates, and the third post makes painfully clear why.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained('Qwen/Qwen3-14B-Base', dtype='float16')
model = PeftModel.from_pretrained(base, 'cloudmark/cloudmark-voice-qwen3-14b').to('mps') # or 'cuda'
tok = AutoTokenizer.from_pretrained('cloudmark/cloudmark-voice-qwen3-14b')
text = 'Kubernetes restarts a pod when its process fails. It cannot see inside the application.'
prompt = '<source_text>\n' + text + '\n</source_text>\n\n<target_text>\n'
ids = tok(prompt, return_tensors='pt').to(model.device)
out = model.generate(**ids, max_new_tokens=120, do_sample=True, temperature=1.0, top_p=0.95, num_return_sequences=5)
for o in out:
print(tok.decode(o[ids['input_ids'].shape[1]:], skip_special_tokens=True).split('</target_text>')[0].strip())
What this does not tell us
Both tests in this post are about voice. Neither says whether a detector would take the rewrite for human writing, and neither says whether the facts survived the rewrite. A model can predict the author's words well and still change a number when it writes freely. Those two questions are the subject of the third post, and the answers were not the ones expected.
So both test presented in this post answers neither question. Voice is the theme of the tests however both tests will not indicate whether the detector would consider the rewrite as a human writing and neither would indicate whether facts survived the rewrite. It could be that a model predicts the authors words well but still changes a number when it writes freely. In the third post we will address those two questions and the answers were not the ones we anticipated.
Both tests in this post are about voice. Neither of them tells us whether a detector would take the rewrite for human writing, and neither tells us whether the facts survived the rewrite. A model can predict the author's words really well and still change a number when it writes freely. Those two questions are the subject of the third post and, spoiler alert, the answers were not the ones I expected.
In short
- The training set is 1,418 pairs: a bland version of a paragraph, and the paragraph I really wrote. 1,259 train the model and 159 test it.
- The loss measures how much probability the model gave to the words I really wrote. Lower is better, and it must be measured on pairs the model never saw.
- One pass over the data was the best. After that the model memorises.
- On habits and on the common-word profile, what the model writes is close to what I write.
- None of this says what a detector thinks, or whether the facts survive. That is the third post.
References
As always, stay safe, keep hacking!
Next: The Detector Was Not Impressed, on the detector and the pipeline.