Text Generation
Transformers
Safetensors
English
llama
llama3
humanizer
rewriting
conversational
merged
sft
editorial
Eval Results (legacy)
text-generation-inference
Instructions to use randhir302/HumanFlow with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use randhir302/HumanFlow with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="randhir302/HumanFlow") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("randhir302/HumanFlow") model = AutoModelForCausalLM.from_pretrained("randhir302/HumanFlow") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use randhir302/HumanFlow with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "randhir302/HumanFlow" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "randhir302/HumanFlow", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/randhir302/HumanFlow
- SGLang
How to use randhir302/HumanFlow with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "randhir302/HumanFlow" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "randhir302/HumanFlow", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "randhir302/HumanFlow" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "randhir302/HumanFlow", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use randhir302/HumanFlow with Docker Model Runner:
docker model run hf.co/randhir302/HumanFlow
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,88 +23,172 @@ widget:
|
|
| 23 |
example_title: Friendly Warning
|
| 24 |
---
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
>
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
-
|
| 35 |
-
- Conversational tone
|
| 36 |
-
- Readability
|
| 37 |
-
- Emotional naturalness
|
| 38 |
-
- Real-world communication style
|
| 39 |
|
| 40 |
---
|
| 41 |
|
| 42 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 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 |
-
##
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
| 64 |
-
|
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
---
|
| 68 |
|
| 69 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
- **Email rewriting:** Soften professional communications.
|
| 74 |
-
- **Content polishing & Social Media:** Tailor text for engagement and readability.
|
| 75 |
|
| 76 |
---
|
| 77 |
|
|
|
|
| 78 |
|
| 79 |
-
|
|
|
|
| 80 |
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
| Metric | Value | Interpretation |
|
| 84 |
-
|
|
| 85 |
-
|
|
| 86 |
-
|
|
| 87 |
-
|
|
| 88 |
-
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
-
*Results generated and uploaded via Colab automated pipeline.*
|
| 91 |
---
|
| 92 |
|
| 93 |
-
##
|
| 94 |
|
| 95 |
```python
|
| 96 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 97 |
|
| 98 |
-
model_id = "
|
| 99 |
|
| 100 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 101 |
-
model = AutoModelForCausalLM.from_pretrained(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
prompt = "
|
|
|
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
|
|
|
| 107 |
|
| 108 |
-
|
| 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 |
+

|
| 55 |
+

|
| 56 |
+

|
| 57 |
+

|
| 58 |
+

|
| 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))
|