File size: 3,637 Bytes
decc268
 
9b29ec0
 
 
 
 
 
 
 
 
 
decc268
9b29ec0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5c1360e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
license: openmdw-1.1
base_model:
- unsloth/Llama-3.2-3B-bnb-4bit
tags:
- aksern
- humanizer
- text-rewriting
- llama
- 3b
- text-generation
pipeline_tag: text-generation
---

# aksern humanizer

**a lightweight text humanization model built on llama 3.2 3b.**

aksern humanizer is a fine-tuned language model designed to rewrite AI-generated text into more natural, human-like prose while preserving the original meaning.

built on top of `meta-llama/Llama-3.2-3B`, the model focuses on text transformation rather than general-purpose conversation. its goal is to make generated text sound less formulaic, repetitive, and machine-written without unnecessarily changing the underlying information.

## overview

| property | value |
|---|---|
| developer | aksern |
| model type | causal language model |
| base model | meta-llama/Llama-3.2-3B |
| parameter count | 3B |
| primary task | text humanization |
| architecture | Llama 3.2 |
| intended use | rewriting AI-generated text |
| inference | local or hosted, depending on deployment |

## features

- **natural rewriting** - transforms formulaic AI-generated prose into more natural language.
- **meaning preservation** - aims to retain the original information and intent.
- **lightweight inference** - a 3B-parameter model suitable for local deployment on compatible hardware.
- **focused behavior** - optimized for text transformation instead of unrestricted general-purpose generation.

## usage

provide a piece of text and let the model rewrite it while preserving its meaning. example code:

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

path = "aksern/humanizer"
text = "In today's rapidly evolving technological landscape, it is important to note that artificial intelligence plays a significant role in various aspects of our daily lives."
model = AutoModelForCausalLM.from_pretrained(path, dtype=torch.bfloat16, device_map="auto")
tok = AutoTokenizer.from_pretrained(path)
inputs = tok.apply_chat_template(
    [{"role": "user", "content": text}],
    add_generation_prompt=False, tokenize=True, return_dict=True, return_tensors="pt",
).to(model.device)
with torch.no_grad():
    outputs = model.generate(
        **inputs, max_new_tokens=120, do_sample=True,
        temperature=0.6, top_p=0.9, pad_token_id=tok.eos_token_id,
    )
out_ids = outputs[0][inputs["input_ids"].shape[-1]:]
if tok.eos_token_id not in out_ids.tolist():
    print("WARNING: generation hit max_new_tokens, not EOS")
print("--- GENERATED ---")
print(repr(tok.decode(out_ids, skip_special_tokens=True)))
```

### example

**input**
> In today's rapidly evolving technological landscape, it is important to note that artificial intelligence plays a significant role in various aspects of our daily lives.

**humanized output**
> In this fast paced technological world, we need to realize that artificial intelligence is a major factor in many aspects of our lives.

## intended use

- rewriting AI-generated drafts into more natural prose
- reducing repetitive or overly formulaic phrasing
- improving the readability and flow of generated text
- experimenting with lightweight text-humanization models

## limitations

- Humanization quality depends on the input text, language, and generation settings.
- The model may not perform equally well across languages, domains, and writing styles.
- More natural-sounding text does not necessarily mean more accurate text.
- Humanization and AI-text detection are different tasks. The model is not guaranteed to bypass AI detectors.

## acknowledgements

Built by **aksern**.

*models that run where you are.*