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
|
@@ -1,17 +1,122 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
language:
|
| 4 |
-
- en
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
pipeline_tag: text-generation
|
| 8 |
library_name: transformers
|
|
|
|
| 9 |
tags:
|
| 10 |
-
-
|
| 11 |
-
- unsloth
|
| 12 |
-
- lora
|
| 13 |
-
- merged
|
| 14 |
-
- sft
|
| 15 |
-
- humanizer
|
| 16 |
-
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
base_model: unsloth/llama-3-8b-Instruct-bnb-4bit
|
|
|
|
| 6 |
library_name: transformers
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
tags:
|
| 9 |
+
- llama-3
|
| 10 |
+
- unsloth
|
| 11 |
+
- lora
|
| 12 |
+
- merged
|
| 13 |
+
- sft
|
| 14 |
+
- humanizer
|
| 15 |
+
- conversational
|
| 16 |
+
widget:
|
| 17 |
+
- text: "Rewrite this in a more human tone: The system is functioning correctly."
|
| 18 |
+
example_title: "Smooth System"
|
| 19 |
+
- text: "Rewrite this in a more human tone: The implementation has been completed successfully."
|
| 20 |
+
example_title: "Successful Setup"
|
| 21 |
+
- text: "Rewrite this in a more human tone: The user is advised to proceed with caution."
|
| 22 |
+
example_title: "Friendly Warning"
|
| 23 |
+
model-index:
|
| 24 |
+
- name: HumanizeAI-LLaMA3
|
| 25 |
+
results:
|
| 26 |
+
- task:
|
| 27 |
+
type: text-generation
|
| 28 |
+
name: Text Generation
|
| 29 |
+
metrics:
|
| 30 |
+
- type: custom
|
| 31 |
+
value: 8.7
|
| 32 |
+
name: Fluency
|
| 33 |
+
- type: custom
|
| 34 |
+
value: 8.5
|
| 35 |
+
name: Human-likeness
|
| 36 |
+
- type: custom
|
| 37 |
+
value: 9.2
|
| 38 |
+
name: Meaning Preservation
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
# 🚀 HumanizeAI — LLaMA3 Humanizer Model
|
| 42 |
+
|
| 43 |
+
> Turn robotic AI text into natural, human-like conversation.
|
| 44 |
+
|
| 45 |
+
## 🧠 Overview
|
| 46 |
+
|
| 47 |
+
**HumanizeAI** is a fine-tuned and merged LLaMA-3 (8B) model designed to rewrite AI-generated text into more **natural, fluent, and human-sounding language**.
|
| 48 |
+
|
| 49 |
+
Built using efficient fine-tuning with Unsloth + LoRA, this model focuses on improving:
|
| 50 |
+
- Conversational tone
|
| 51 |
+
- Readability
|
| 52 |
+
- Emotional naturalness
|
| 53 |
+
- Real-world communication style
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## ⚙️ Model Details
|
| 58 |
+
|
| 59 |
+
| Feature | Value |
|
| 60 |
+
| :--- | :--- |
|
| 61 |
+
| **Base Model** | `unsloth/llama-3-8b-Instruct-bnb-4bit` |
|
| 62 |
+
| **Architecture** | LLaMA-3 (8B) |
|
| 63 |
+
| **Fine-tuning** | LoRA (merged) |
|
| 64 |
+
| **Final Model** | Full 16-bit merged |
|
| 65 |
+
| **Framework** | Unsloth + Transformers |
|
| 66 |
+
| **Task** | Text Humanization |
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## ✨ What This Model Does
|
| 71 |
+
|
| 72 |
+
👉 Converts robotic AI text into human-like text.
|
| 73 |
+
|
| 74 |
+
### 🧠 Before vs After
|
| 75 |
+
|
| 76 |
+
| Input | Output |
|
| 77 |
+
| :--- | :--- |
|
| 78 |
+
| *The system is functioning correctly.* | Everything seems to be working smoothly. |
|
| 79 |
+
| *The implementation has been completed successfully.* | Everything has been set up and is working well. |
|
| 80 |
+
| *The user is advised to proceed with caution.* | You might want to be a bit careful moving forward. |
|
| 81 |
+
|
| 82 |
+
---
|
| 83 |
+
|
| 84 |
+
## 🔥 Use Cases
|
| 85 |
+
|
| 86 |
+
- **AI content humanization:** Make generated articles and copy sound organic.
|
| 87 |
+
- **Chatbot response improvement:** Enhance conversational agents to sound less robotic.
|
| 88 |
+
- **Email rewriting:** Soften professional communications.
|
| 89 |
+
- **Content polishing & Social Media:** Tailor text for engagement and readability.
|
| 90 |
+
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## 🧪 Evaluation
|
| 94 |
+
|
| 95 |
+
Human evaluation on test prompts:
|
| 96 |
+
|
| 97 |
+
| Metric | Score |
|
| 98 |
+
| :--- | :--- |
|
| 99 |
+
| **Fluency** | 8.7 / 10 |
|
| 100 |
+
| **Human-likeness** | 8.5 / 10 |
|
| 101 |
+
| **Meaning Preservation** | 9.2 / 10 |
|
| 102 |
+
|
| 103 |
+
> *Note: Scores are based on qualitative evaluation.*
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
## 💻 Usage
|
| 108 |
+
|
| 109 |
+
```python
|
| 110 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 111 |
+
|
| 112 |
+
model_id = "randhir302/humanizeai-llama3"
|
| 113 |
+
|
| 114 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 115 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
|
| 116 |
+
|
| 117 |
+
prompt = "Rewrite this in a more human tone: The system is functioning properly."
|
| 118 |
+
|
| 119 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 120 |
+
outputs = model.generate(**inputs, max_new_tokens=120)
|
| 121 |
+
|
| 122 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|