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
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,41 +1,26 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
-
|
| 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 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
widget:
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 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 |
# 🚀HumanFlow — LLaMA3 Humanizer Model
|
|
@@ -119,4 +104,17 @@ prompt = "Rewrite this in a more human tone: The system is functioning properly.
|
|
| 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))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 20 |
+
successfully.'
|
| 21 |
+
example_title: Successful Setup
|
| 22 |
+
- text: 'Rewrite this in a more human tone: The user is advised to proceed with caution.'
|
| 23 |
+
example_title: Friendly Warning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
---
|
| 25 |
|
| 26 |
# 🚀HumanFlow — LLaMA3 Humanizer Model
|
|
|
|
| 104 |
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 105 |
outputs = model.generate(**inputs, max_new_tokens=120)
|
| 106 |
|
| 107 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 108 |
+
|
| 109 |
+
## Evaluation Results (Automated)
|
| 110 |
+
|
| 111 |
+
The model was evaluated using a professional suite at temperature 0.7.
|
| 112 |
+
|
| 113 |
+
| Metric | Value | Interpretation |
|
| 114 |
+
| :--- | :--- | :--- |
|
| 115 |
+
| **BERTScore F1** | 0.8424 | Semantic Similarity to Prompts |
|
| 116 |
+
| **ROUGE-L** | 0.0908 | Low overlap indicates original generation |
|
| 117 |
+
| **Perplexity** | 1.5242 | Confidence/Coherence (Lower is better) |
|
| 118 |
+
| **Text Overlap** | 0.0528 | Lexical similarity to input |
|
| 119 |
+
|
| 120 |
+
*Results generated and uploaded via Colab automated pipeline.*
|