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
| language: | |
| - en | |
| license: apache-2.0 | |
| base_model: unsloth/llama-3-8b-Instruct-bnb-4bit | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - text-generation | |
| - llama3 | |
| - humanizer | |
| - rewriting | |
| - conversational | |
| - merged | |
| - sft | |
| - editorial | |
| widget: | |
| - text: "Rewrite this in a more human tone: The system is functioning correctly." | |
| example_title: "Smooth System" | |
| - text: "Rewrite this in a more human tone: The implementation has been completed successfully." | |
| example_title: "Successful Setup" | |
| - text: "Rewrite this in a more human tone: The user is advised to proceed with caution." | |
| example_title: "Friendly Warning" | |
| model-index: | |
| - name: HumanFlow-Llama3-8B | |
| results: | |
| - task: | |
| type: text-generation | |
| dataset: | |
| name: Internal Evaluation Suite | |
| type: custom | |
| metrics: | |
| - type: BERTScore F1 | |
| value: 0.8424 | |
| - type: ROUGE-L | |
| value: 0.0908 | |
| - type: Perplexity | |
| value: 1.5242 | |
| - type: Text Overlap | |
| value: 0.0528 | |
| <p align="center"> | |
| <img src="https://huggingface.co/randhir302/HumanFlow/resolve/main/humanflow_logofinal.png" width="240" height="240"> | |
| </p> | |
| # HumanFlow-Llama3-8B | |
| ### Humanize AI Text with Natural Structure, Flow & Tone | |
| [🤗 Hugging Face Model](https://huggingface.co/randhir302/HumanFlow) • | |
| [💻 GitHub Repository](https://github.com/iamhero2709/HumanFlow) • | |
| Apache-2.0 License | |
| --- | |
| ## Overview | |
| HumanFlow-Llama3-8B is a fine-tuned Llama 3 model designed to transform robotic AI-generated writing into content that feels natural, human, readable, and authentic. | |
| Instead of replacing words only, HumanFlow improves: | |
| - sentence rhythm | |
| - structure | |
| - tone | |
| - flow | |
| - readability | |
| - realism | |
| --- | |
| ## Why HumanFlow? | |
| Most AI-generated text feels: | |
| - repetitive | |
| - over-polished | |
| - generic | |
| - predictable | |
| - emotionally flat | |
| HumanFlow rewrites outputs to feel more organic and naturally written. | |
| --- | |
| ## Performance Snapshot | |
| | Metric | Base Model | HumanFlow | | |
| |--------|-----------|----------| | |
| | Human-Like Score | 18% | **99%** | | |
| | Natural Tone | Low | **High** | | |
| | Rewrite Quality | Basic | **Advanced** | | |
| | Readability | Generic | **Strong** | | |
| --- | |
| ## Internal Evaluation | |
| | Metric | Score | | |
| |--------|------| | |
| | BERTScore F1 | **0.8424** | | |
| | ROUGE-L | **0.0908** | | |
| | Perplexity | **1.5242** | | |
| | Text Overlap | **0.0528** | | |
| --- | |
| ## Best Use Cases | |
| - SEO rewriting | |
| - Blog enhancement | |
| - Student writing cleanup | |
| - Email personalization | |
| - AI content polishing | |
| - SaaS integrations | |
| - Human-style generation pipelines | |
| --- | |
| ## Before vs After | |
| ### Input | |
| > In today’s rapidly evolving digital landscape, it is imperative for organizations to leverage strategic methodologies in order to maximize engagement. | |
| ### HumanFlow Output | |
| > Online markets move fast. If a company wants attention, it needs smart strategy, clear messaging, and content people actually care about. | |
| --- | |
| ## Quickstart | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| import torch | |
| model_id = "randhir302/HumanFlow" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| torch_dtype=torch.float16, | |
| device_map="auto" | |
| ) | |
| prompt = """ | |
| Rewrite this in a more human tone: | |
| Artificial intelligence is transforming industries worldwide. | |
| """ | |
| inputs = tokenizer(prompt, return_tensors="pt").to("cuda") | |
| outputs = model.generate( | |
| **inputs, | |
| max_new_tokens=220, | |
| temperature=0.75, | |
| top_p=0.90, | |
| repetition_penalty=1.10 | |
| ) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| ## Recommended Settings | |
| ```python | |
| temperature = 0.75 | |
| top_p = 0.90 | |
| repetition_penalty = 1.10 | |
| max_new_tokens = 700 | |
| ## Roadmap | |
| - [x] Public Launch | |
| - [x] Hugging Face Release | |
| - [x] Fine-Tuned Base Model | |
| - [ ] GGUF Quantized Release | |
| - [ ] HumanFlow Pro API | |
| - [ ] Browser Editor | |
| - [ ] Multilingual Version | |
| --- | |
| ## Community | |
| If HumanFlow helps you: | |
| ⭐ Like the model | |
| ⭐ Share outputs | |
| ⭐ Benchmark it | |
| ⭐ Build products with it | |