Instructions to use akhaliq/open-humanizer-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use akhaliq/open-humanizer-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="akhaliq/open-humanizer-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("akhaliq/open-humanizer-4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use akhaliq/open-humanizer-4b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf akhaliq/open-humanizer-4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf akhaliq/open-humanizer-4b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf akhaliq/open-humanizer-4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf akhaliq/open-humanizer-4b:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf akhaliq/open-humanizer-4b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf akhaliq/open-humanizer-4b:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf akhaliq/open-humanizer-4b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf akhaliq/open-humanizer-4b:Q4_K_M
Use Docker
docker model run hf.co/akhaliq/open-humanizer-4b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use akhaliq/open-humanizer-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "akhaliq/open-humanizer-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "akhaliq/open-humanizer-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/akhaliq/open-humanizer-4b:Q4_K_M
- SGLang
How to use akhaliq/open-humanizer-4b 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 "akhaliq/open-humanizer-4b" \ --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": "akhaliq/open-humanizer-4b", "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 "akhaliq/open-humanizer-4b" \ --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": "akhaliq/open-humanizer-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use akhaliq/open-humanizer-4b with Ollama:
ollama run hf.co/akhaliq/open-humanizer-4b:Q4_K_M
- Unsloth Desktop
- Pi
How to use akhaliq/open-humanizer-4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf akhaliq/open-humanizer-4b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "akhaliq/open-humanizer-4b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use akhaliq/open-humanizer-4b with Docker Model Runner:
docker model run hf.co/akhaliq/open-humanizer-4b:Q4_K_M
- Lemonade
How to use akhaliq/open-humanizer-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull akhaliq/open-humanizer-4b:Q4_K_M
Run and chat with the model
lemonade run user.open-humanizer-4b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use akhaliq/open-humanizer-4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf akhaliq/open-humanizer-4b:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default akhaliq/open-humanizer-4b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use akhaliq/open-humanizer-4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf akhaliq/open-humanizer-4b:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "akhaliq/open-humanizer-4b:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Open Humanizer 4B
Rewrites AI-sounding text into natural human writing while preserving every fact, name, date and number. A small, fully open alternative to jialinyyzz/humanizer (12B) — this one is 4B, Apache-2.0, trained only on redistributable data, and ships GGUF quants so it runs on a laptop.
Demo: akhaliq/open-humanizer-4b-demo · Training curves: trackio dashboard
Before / after (real outputs, greedy decoding)
Before: It is worth noting that regular exercise offers a multitude of benefits for both physical and mental well-being. Furthermore, engaging in consistent physical activity has been shown to improve cardiovascular health, enhance mood through the release of endorphins, and contribute to better sleep quality. Additionally, it is important to recognize that even moderate exercise can yield significant positive outcomes over time.
After: Regular exercise offers a multitude of benefits for both physical and mental well-being. Engaging in consistent physical activity has been shown to improve cardiovascular health, enhance mood through the release of endorphins, and contribute to better sleep quality. It is important to recognize that even moderate exercise can yield significant positive outcomes over time.
Before: The implementation of renewable energy sources plays a pivotal role in the mitigation of climate change. Furthermore, solar and wind power have emerged as viable alternatives to fossil fuels, offering sustainable solutions for future energy needs. It is imperative that governments and corporations prioritize investment in these technologies to ensure a greener tomorrow.
After: The use of renewable energy sources is crucial in combating climate change. Solar and wind power are alternatives to fossil fuels that can meet future energy demands. Governments and corporations must invest in these technologies to ensure a greener future.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("akhaliq/open-humanizer-4b", subfolder="merged")
model = AutoModelForCausalLM.from_pretrained(
"akhaliq/open-humanizer-4b", subfolder="merged", dtype=torch.bfloat16, device_map="auto"
)
SYSTEM = ("You are an expert editor. Rewrite the user's text so it reads like natural "
"human writing. Keep every fact, name, date and number exactly as given. "
"Remove AI-sounding habits: hedging, filler connectives, over-formal phrasing, "
"and uniform sentence rhythm. Do not add information. Return only the rewritten text.")
msgs = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": "YOUR AI-WRITTEN TEXT"}]
enc = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**enc, max_new_tokens=1024, do_sample=False)
print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
GGUF (llama.cpp / Ollama / LM Studio)
| File | Size | Use |
|---|---|---|
gguf/open-humanizer-4b-q4_k_m.gguf |
2.5 GB | best size/quality tradeoff |
gguf/open-humanizer-4b-q5_k_m.gguf |
2.9 GB | slightly better quality |
gguf/open-humanizer-4b-q8_0.gguf |
4.3 GB | near-lossless |
gguf/open-humanizer-4b-f16.gguf |
8.1 GB | reference / re-quantizing |
llama-cli -m open-humanizer-4b-q4_k_m.gguf --conversation
Training
- Base: Qwen/Qwen3-4B-Instruct-2507 (Apache-2.0)
- Method: LoRA SFT (r=32, α=64, all attention + MLP projections), 2 epochs, lr 1e-4 cosine, eff. batch 16, max length 2048, bf16, on one A100 via TRL (
SFTTrainer) - Data (7,806 train / 383 eval pairs, English):
- gohumanize/gohumanize-open-humanizer-dataset (CC-BY-4.0) — LLM-rewritten text → human originals (Gutenberg + US government)
- jialinyyzz/humanizer-data
rewrite_sft/redistributable— AI drafts → human originals (CRS reports, eLife peer reviews, PeerRead, peS2o; per-row open licenses) - Same recipe principle as the 12B humanizer: synthetic AI input → authentic human target, so the model learns to undo the LLM register
- Results: eval_loss 1.465 (final, 383 held-out pairs), train_loss 1.308, eval token accuracy 0.664; full curves on the trackio dashboard
Limitations
- English only.
- Drafts that are only lightly "AI-flavored" may pass through nearly unchanged — the model is conservative by design (fact preservation was favored in training).
- No AI-detector evaluation was run (detectors are unreliable and were not used in training either); judge by the rewrites.
- The AI-written sides of both training datasets were generated by commercial LLMs; those providers' terms may restrict using outputs to train competing models. The human sides are openly licensed/public domain. You are responsible for your own compliance.
- This is a rewriting tool. Using it to misrepresent AI-generated work as human-written (e.g. academic dishonesty) is on the user.
Layout
- Repo root: LoRA adapter + tokenizer
merged/: standalone merged bf16 model (use this)gguf/: f16 / Q8_0 / Q5_K_M / Q4_K_M quants
- Downloads last month
- 220
4-bit
5-bit
8-bit
16-bit
Model tree for akhaliq/open-humanizer-4b
Base model
Qwen/Qwen3-4B-Instruct-2507