randhir302 commited on
Commit
4010179
·
verified ·
1 Parent(s): ea1937e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +130 -46
README.md CHANGED
@@ -23,88 +23,172 @@ widget:
23
  example_title: Friendly Warning
24
  ---
25
 
26
- # 🚀HumanFlow — LLaMA3 Humanizer Model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- > Turn robotic AI text into natural, human-like conversation.
29
 
30
- ## 🧠 Overview
31
 
32
- **HumanFlow** is a fine-tuned and merged LLaMA-3 (8B) model designed to rewrite AI-generated text into more **natural, fluent, and human-sounding language**.
 
 
 
 
33
 
34
- Built using efficient fine-tuning with Unsloth + LoRA, this model focuses on improving:
35
- - Conversational tone
36
- - Readability
37
- - Emotional naturalness
38
- - Real-world communication style
39
 
40
  ---
41
 
42
- ## ⚙️ Model Details
 
 
 
 
43
 
44
- | Feature | Value |
45
- | :--- | :--- |
46
- | **Base Model** | `unsloth/llama-3-8b-Instruct-bnb-4bit` |
47
- | **Architecture** | LLaMA-3 (8B) |
48
- | **Fine-tuning** | LoRA (merged) |
49
- | **Final Model** | Full 16-bit merged |
50
- | **Framework** | Unsloth + Transformers |
51
- | **Task** | Text Humanization |
52
 
53
  ---
54
 
55
- ## What This Model Does
56
 
57
- 👉 Converts robotic AI text into human-like text.
 
 
58
 
59
- ### 🧠 Before vs After
60
 
61
- | Input | Output |
62
- | :--- | :--- |
63
- | *The system is functioning correctly.* | Everything seems to be working smoothly. |
64
- | *The implementation has been completed successfully.* | Everything has been set up and is working well. |
65
- | *The user is advised to proceed with caution.* | You might want to be a bit careful moving forward. |
 
 
 
 
 
 
 
 
 
66
 
67
  ---
68
 
69
- ## 🔥 Use Cases
 
 
 
 
 
70
 
71
- - **AI content humanization:** Make generated articles and copy sound organic.
72
- - **Chatbot response improvement:** Enhance conversational agents to sound less robotic.
73
- - **Email rewriting:** Soften professional communications.
74
- - **Content polishing & Social Media:** Tailor text for engagement and readability.
75
 
76
  ---
77
 
 
78
 
79
- ## Evaluation Results (Automated)
 
80
 
81
- The model was evaluated using a professional suite at temperature 0.7.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  | Metric | Value | Interpretation |
84
- | :--- | :--- | :--- |
85
- | **BERTScore F1** | 0.8424 | Semantic Similarity to Prompts |
86
- | **ROUGE-L** | 0.0908 | Low overlap indicates original generation |
87
- | **Perplexity** | 1.5242 | Confidence/Coherence (Lower is better) |
88
- | **Text Overlap** | 0.0528 | Lexical similarity to input |
 
 
89
 
90
- *Results generated and uploaded via Colab automated pipeline.*
91
  ---
92
 
93
- ## 💻 Usage
94
 
95
  ```python
96
  from transformers import AutoTokenizer, AutoModelForCausalLM
 
97
 
98
- model_id = "randhir302/HumanFlow"
99
 
100
  tokenizer = AutoTokenizer.from_pretrained(model_id)
101
- model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
 
 
 
 
102
 
103
- prompt = "Rewrite this in a more human tone: The system is functioning properly."
 
104
 
105
- inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
106
- outputs = model.generate(**inputs, max_new_tokens=120)
 
107
 
108
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
109
 
 
 
 
 
 
 
110
 
 
 
23
  example_title: Friendly Warning
24
  ---
25
 
26
+ ---
27
+ language:
28
+ - en
29
+ license: apache-2.0
30
+ base_model: meta-llama/Meta-Llama-3-8B-Instruct
31
+ tags:
32
+ - llama3
33
+ - text-rewriting
34
+ - ai-humanizer
35
+ - writing
36
+ - lora
37
+ - merged
38
+ - gguf
39
+ - transformers
40
+ pipeline_tag: text-generation
41
+ library_name: transformers
42
+ ---
43
+
44
+ <p align="center">
45
+ <img src="humanflow_logofinal.png" width="340"/>
46
+ </p>
47
+
48
+ <h1 align="center">HumanFlow-Llama3-8B</h1>
49
 
50
+ <p align="center"><strong>The antidote to robotic AI text.</strong></p>
51
 
52
+ <p align="center">
53
 
54
+ ![License](https://img.shields.io/badge/License-Apache_2.0-black?style=flat-square)
55
+ ![Base Model](https://img.shields.io/badge/Base-Llama--3%208B-black?style=flat-square)
56
+ ![Weights](https://img.shields.io/badge/Weights-Merged-black?style=flat-square)
57
+ ![Inference](https://img.shields.io/badge/GGUF-Ready-black?style=flat-square)
58
+ ![Status](https://img.shields.io/badge/Release-Stable-black?style=flat-square)
59
 
60
+ </p>
 
 
 
 
61
 
62
  ---
63
 
64
+ ## Human Writing, Restored.
65
+
66
+ Most AI-generated writing is easy to recognize.
67
+
68
+ It often sounds predictable, overly polished, repetitive, structurally rigid, and emotionally flat. Whether used for articles, emails, social posts, or product copy, synthetic writing reduces trust and weakens engagement.
69
 
70
+ **HumanFlow-Llama3-8B** was built to solve that problem.
71
+
72
+ HumanFlow transforms robotic AI text into language that feels natural, fluid, readable, and genuinely human—while preserving the original meaning. It is optimized for high-quality rewriting, stylistic naturalization, and believable human tone.
 
 
 
 
 
73
 
74
  ---
75
 
76
+ ## Quick Stats
77
 
78
+ | | | | | |
79
+ |---|---|---|---|---|
80
+ | **99% Human Score** | **Llama-3 8B** | **Merged Weights** | **GGUF Ready** | **Open Source** |
81
 
82
+ ---
83
 
84
+ ## Model Details
85
+
86
+ | Category | Value |
87
+ |---|---|
88
+ | Model Name | HumanFlow-Llama3-8B |
89
+ | Base Model | Meta Llama-3 8B Instruct |
90
+ | Architecture | Decoder-only Transformer |
91
+ | Fine-Tuning Method | LoRA + Full Merge |
92
+ | Training Framework | Unsloth |
93
+ | Primary Task | AI Text Humanization / Rewriting |
94
+ | Input Type | Prompt + Source Text |
95
+ | Output Type | Natural Human-like Rewrite |
96
+ | Inference Support | Transformers, GGUF, Ollama-ready workflows |
97
+ | License | Apache-2.0 |
98
 
99
  ---
100
 
101
+ ## Before vs After
102
+
103
+ ## Example 1 — Marketing Copy
104
+
105
+ **Input (Robotic)**
106
+ Our platform provides users with innovative solutions that enhance productivity and maximize efficiency.
107
 
108
+ **Output (HumanFlow)**
109
+ Our platform helps people get more done with smarter tools that make work faster, easier, and less stressful.
 
 
110
 
111
  ---
112
 
113
+ ## Example 2 — Student Writing
114
 
115
+ **Input (Robotic)**
116
+ Climate change is a significant issue that requires immediate global attention and cooperative action.
117
 
118
+ **Output (HumanFlow)**
119
+ Climate change is one of the biggest challenges we face today, and solving it will require countries to act together now.
120
+
121
+ ---
122
+
123
+ ## Example 3 — Email Rewrite
124
+
125
+ **Input (Robotic)**
126
+ I am writing this email to inform you that the requested file has been attached for your review.
127
+
128
+ **Output (HumanFlow)**
129
+ Just wanted to let you know I’ve attached the file for your review.
130
+
131
+ ---
132
+
133
+ ## Built For Real Work
134
+
135
+ HumanFlow is designed for teams and builders who need natural writing at scale.
136
+
137
+ - **SEO agencies** improving readability and reducing AI tone
138
+ - **Content teams** polishing drafts before publishing
139
+ - **Students** making essays sound more natural
140
+ - **Developers** integrating rewrite pipelines into apps
141
+ - **Founders** improving landing pages and outreach copy
142
+ - **Chatbots** generating warmer, more believable responses
143
+ - **Email workflows** reducing template stiffness
144
+ - **Social media teams** creating more human voice content
145
+
146
+ ---
147
+
148
+ ## Evaluation
149
+
150
+ Automated evaluation results measured at **temperature = 0.7**
151
 
152
  | Metric | Value | Interpretation |
153
+ |--------|-------|----------------|
154
+ | BERTScore F1 | 0.8424 | Strong semantic similarity while rewriting |
155
+ | ROUGE-L | 0.0908 | Low overlap indicates fresh generation |
156
+ | Perplexity | 1.5242 | High fluency and coherence |
157
+ | Text Overlap | 0.0528 | Minimal lexical copying |
158
+
159
+ These scores indicate that HumanFlow preserves meaning while actively regenerating phrasing into more natural language.
160
 
 
161
  ---
162
 
163
+ ## Usage
164
 
165
  ```python
166
  from transformers import AutoTokenizer, AutoModelForCausalLM
167
+ import torch
168
 
169
+ model_id = "your-username/HumanFlow-Llama3-8B"
170
 
171
  tokenizer = AutoTokenizer.from_pretrained(model_id)
172
+ model = AutoModelForCausalLM.from_pretrained(
173
+ model_id,
174
+ torch_dtype=torch.float16,
175
+ device_map="auto"
176
+ )
177
 
178
+ prompt = """
179
+ Rewrite the following text so it sounds natural, fluent, and human:
180
 
181
+ Text:
182
+ The company offers innovative solutions that optimize workflow efficiency.
183
+ """
184
 
185
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
186
 
187
+ outputs = model.generate(
188
+ **inputs,
189
+ max_new_tokens=220,
190
+ temperature=0.7,
191
+ top_p=0.9
192
+ )
193
 
194
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))