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
|
@@ -42,42 +42,50 @@ 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 |
-

|
| 59 |
|
| 60 |
</p>
|
| 61 |
|
| 62 |
---
|
| 63 |
|
| 64 |
-
##
|
| 65 |
|
| 66 |
-
Most AI-generated writing is easy to
|
| 67 |
|
| 68 |
-
It often sounds
|
| 69 |
|
| 70 |
-
**HumanFlow-Llama3-8B** was built to solve
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
---
|
| 75 |
|
| 76 |
## Quick Stats
|
| 77 |
|
| 78 |
-
|
|
| 79 |
-
|---|---|
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
---
|
| 83 |
|
|
@@ -86,68 +94,64 @@ HumanFlow transforms robotic AI text into language that feels natural, fluid, re
|
|
| 86 |
| Category | Value |
|
| 87 |
|---|---|
|
| 88 |
| Model Name | HumanFlow-Llama3-8B |
|
| 89 |
-
|
|
| 90 |
-
|
|
| 91 |
-
|
|
| 92 |
-
|
|
| 93 |
-
|
|
| 94 |
-
|
|
| 95 |
-
|
|
| 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
|
| 106 |
-
Our platform provides
|
| 107 |
|
| 108 |
-
**Output
|
| 109 |
-
Our platform helps people
|
| 110 |
|
| 111 |
---
|
| 112 |
|
| 113 |
-
## Example 2 — Student Writing
|
| 114 |
|
| 115 |
-
**Input
|
| 116 |
-
Climate change is a significant issue
|
| 117 |
|
| 118 |
-
**Output
|
| 119 |
-
Climate change is
|
| 120 |
|
| 121 |
---
|
| 122 |
|
| 123 |
-
## Example 3 — Email Rewrite
|
| 124 |
|
| 125 |
-
**Input
|
| 126 |
-
I am writing this email to inform you that the requested
|
| 127 |
|
| 128 |
-
**Output
|
| 129 |
-
Just
|
| 130 |
|
| 131 |
---
|
| 132 |
|
| 133 |
-
## Built For
|
| 134 |
-
|
| 135 |
-
HumanFlow is designed for teams and builders who need natural writing at scale.
|
| 136 |
|
| 137 |
-
-
|
| 138 |
-
-
|
| 139 |
-
-
|
| 140 |
-
-
|
| 141 |
-
-
|
| 142 |
-
-
|
| 143 |
-
-
|
| 144 |
-
-
|
| 145 |
|
| 146 |
---
|
| 147 |
|
| 148 |
## Evaluation
|
| 149 |
|
| 150 |
-
Automated
|
| 151 |
|
| 152 |
| Metric | Value | Interpretation |
|
| 153 |
|--------|-------|----------------|
|
|
@@ -156,7 +160,7 @@ Automated evaluation results measured at **temperature = 0.7**
|
|
| 156 |
| Perplexity | 1.5242 | High fluency and coherence |
|
| 157 |
| Text Overlap | 0.0528 | Minimal lexical copying |
|
| 158 |
|
| 159 |
-
These
|
| 160 |
|
| 161 |
---
|
| 162 |
|
|
@@ -166,7 +170,7 @@ These scores indicate that HumanFlow preserves meaning while actively regenerati
|
|
| 166 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 167 |
import torch
|
| 168 |
|
| 169 |
-
model_id = "
|
| 170 |
|
| 171 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 172 |
model = AutoModelForCausalLM.from_pretrained(
|
|
@@ -176,9 +180,8 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 176 |
)
|
| 177 |
|
| 178 |
prompt = """
|
| 179 |
-
Rewrite
|
| 180 |
|
| 181 |
-
Text:
|
| 182 |
The company offers innovative solutions that optimize workflow efficiency.
|
| 183 |
"""
|
| 184 |
|
|
@@ -191,4 +194,4 @@ outputs = model.generate(
|
|
| 191 |
top_p=0.9
|
| 192 |
)
|
| 193 |
|
| 194 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
|
|
| 42 |
---
|
| 43 |
|
| 44 |
<p align="center">
|
| 45 |
+
<img src="assets/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 |
+
Rewrite synthetic AI writing into language that feels natural, fluent, and genuinely human.
|
| 54 |
+
</p>
|
| 55 |
+
|
| 56 |
<p align="center">
|
| 57 |
|
| 58 |
+

|
| 59 |
+

|
| 60 |
+

|
| 61 |
+

|
|
|
|
| 62 |
|
| 63 |
</p>
|
| 64 |
|
| 65 |
---
|
| 66 |
|
| 67 |
+
## Why HumanFlow Exists
|
| 68 |
|
| 69 |
+
Most AI-generated writing is easy to spot.
|
| 70 |
|
| 71 |
+
It often sounds stiff, repetitive, emotionally flat, and structurally predictable. That hurts trust, lowers engagement, and makes content feel artificial.
|
| 72 |
|
| 73 |
+
**HumanFlow-Llama3-8B** was built to solve this problem.
|
| 74 |
|
| 75 |
+
It transforms robotic AI text into writing that reads naturally, flows smoothly, and sounds human—while preserving the original meaning.
|
| 76 |
|
| 77 |
---
|
| 78 |
|
| 79 |
## Quick Stats
|
| 80 |
|
| 81 |
+
| Metric | Value |
|
| 82 |
+
|---|---|
|
| 83 |
+
| Human-like Score | 99% |
|
| 84 |
+
| Base Model | Llama-3 8B |
|
| 85 |
+
| Fine-Tuning | Unsloth + LoRA |
|
| 86 |
+
| Release Type | Fully Merged Weights |
|
| 87 |
+
| Quantization | GGUF Ready |
|
| 88 |
+
| License | Apache-2.0 |
|
| 89 |
|
| 90 |
---
|
| 91 |
|
|
|
|
| 94 |
| Category | Value |
|
| 95 |
|---|---|
|
| 96 |
| Model Name | HumanFlow-Llama3-8B |
|
| 97 |
+
| Architecture | Transformer Decoder |
|
| 98 |
+
| Base Checkpoint | Meta-Llama-3-8B-Instruct |
|
| 99 |
+
| Training Method | Supervised Fine-Tuning |
|
| 100 |
+
| Adapter Method | LoRA |
|
| 101 |
+
| Merge Status | Fully Merged |
|
| 102 |
+
| Primary Use | AI Text Humanization |
|
| 103 |
+
| Inference | Transformers / vLLM / GGUF |
|
|
|
|
|
|
|
| 104 |
|
| 105 |
---
|
| 106 |
|
| 107 |
## Before vs After
|
| 108 |
|
| 109 |
+
### Example 1 — Marketing Copy
|
| 110 |
|
| 111 |
+
**Input**
|
| 112 |
+
Our platform provides innovative solutions that maximize productivity and efficiency.
|
| 113 |
|
| 114 |
+
**Output**
|
| 115 |
+
Our platform helps people work faster and smarter with tools that make everyday tasks easier.
|
| 116 |
|
| 117 |
---
|
| 118 |
|
| 119 |
+
### Example 2 — Student Writing
|
| 120 |
|
| 121 |
+
**Input**
|
| 122 |
+
Climate change is a significant issue requiring immediate international cooperation.
|
| 123 |
|
| 124 |
+
**Output**
|
| 125 |
+
Climate change is a serious global challenge, and solving it will require countries to act together now.
|
| 126 |
|
| 127 |
---
|
| 128 |
|
| 129 |
+
### Example 3 — Email Rewrite
|
| 130 |
|
| 131 |
+
**Input**
|
| 132 |
+
I am writing this email to inform you that the requested document has been attached.
|
| 133 |
|
| 134 |
+
**Output**
|
| 135 |
+
Just letting you know I’ve attached the document you requested.
|
| 136 |
|
| 137 |
---
|
| 138 |
|
| 139 |
+
## Built For
|
|
|
|
|
|
|
| 140 |
|
| 141 |
+
- SEO agencies improving readability
|
| 142 |
+
- Content teams polishing drafts
|
| 143 |
+
- Students improving natural tone
|
| 144 |
+
- Developers integrating rewrite pipelines
|
| 145 |
+
- Startup founders refining copy
|
| 146 |
+
- Chatbots with better responses
|
| 147 |
+
- Email automation workflows
|
| 148 |
+
- Social media content teams
|
| 149 |
|
| 150 |
---
|
| 151 |
|
| 152 |
## Evaluation
|
| 153 |
|
| 154 |
+
Automated benchmark results measured at **temperature = 0.7**
|
| 155 |
|
| 156 |
| Metric | Value | Interpretation |
|
| 157 |
|--------|-------|----------------|
|
|
|
|
| 160 |
| Perplexity | 1.5242 | High fluency and coherence |
|
| 161 |
| Text Overlap | 0.0528 | Minimal lexical copying |
|
| 162 |
|
| 163 |
+
These results indicate HumanFlow preserves meaning while actively regenerating more natural phrasing.
|
| 164 |
|
| 165 |
---
|
| 166 |
|
|
|
|
| 170 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 171 |
import torch
|
| 172 |
|
| 173 |
+
model_id = "randhir302/HumanFlow-Llama3-8B"
|
| 174 |
|
| 175 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 176 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
|
| 180 |
)
|
| 181 |
|
| 182 |
prompt = """
|
| 183 |
+
Rewrite this text naturally:
|
| 184 |
|
|
|
|
| 185 |
The company offers innovative solutions that optimize workflow efficiency.
|
| 186 |
"""
|
| 187 |
|
|
|
|
| 194 |
top_p=0.9
|
| 195 |
)
|
| 196 |
|
| 197 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|