Instructions to use chadstthomas/Paraphase-4B-Adapter-Pack with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use chadstthomas/Paraphase-4B-Adapter-Pack with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use chadstthomas/Paraphase-4B-Adapter-Pack 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 chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0 # Run inference directly in the terminal: llama cli -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0 # Run inference directly in the terminal: llama cli -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
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 chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
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 chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
Use Docker
docker model run hf.co/chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
- LM Studio
- Jan
- vLLM
How to use chadstthomas/Paraphase-4B-Adapter-Pack with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chadstthomas/Paraphase-4B-Adapter-Pack" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chadstthomas/Paraphase-4B-Adapter-Pack", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
- Ollama
How to use chadstthomas/Paraphase-4B-Adapter-Pack with Ollama:
ollama run hf.co/chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
- Unsloth Desktop
- Pi
How to use chadstthomas/Paraphase-4B-Adapter-Pack with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
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": "chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use chadstthomas/Paraphase-4B-Adapter-Pack with Docker Model Runner:
docker model run hf.co/chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
- Lemonade
How to use chadstthomas/Paraphase-4B-Adapter-Pack with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
Run and chat with the model
lemonade run user.Paraphase-4B-Adapter-Pack-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use chadstthomas/Paraphase-4B-Adapter-Pack with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
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 chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use chadstthomas/Paraphase-4B-Adapter-Pack with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0
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 "chadstthomas/Paraphase-4B-Adapter-Pack:Q8_0" \ --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"
Paraphase-4B Adapter Pack — rewrite + extraction LoRAs
One raw Qwen3.5-4B base, two task LoRAs, and one measured tool guard. This is the multi-task companion to Paraphase-4B, which is the merged humanizer release.
Use the raw base here for adapters. The paraphase-4b-Q8_0.gguf in the
main repo is the merged rewrite model; it is not the adapter base. The raw
qwen3.5-4b-Q8_0.gguf in this pack is the base both LoRAs were trained on.
Quick start
# extraction
llama-server -m qwen3.5-4b-Q8_0.gguf \
--lora gguf/paraphase-4b-extract-lora.gguf -c 2048
# rewrite
llama-server -m qwen3.5-4b-Q8_0.gguf \
--lora gguf/paraphase-4b-rewrite-lora.gguf -c 2048
# tool calls: base only; apply toolguard.py to the returned calls
llama-server -m qwen3.5-4b-Q8_0.gguf -c 2048
Send "chat_template_kwargs": {"enable_thinking": false} with Qwen3.5
requests; otherwise the template starts with a thinking preamble.
What is measured
Extraction adapter (the win)
Frozen test: 50 real AESLC validation emails, disjoint from training. Labels are deterministic regex spans; this measures agreement with that labeler, not human-judged extraction.
| metric | raw Q8 base | + extract LoRA |
|---|---|---|
| JSON valid | 1.00 | 1.00 |
| exact match | 0.12 | 0.42 |
| micro F1 | 0.516 | 0.670 |
| date F1 | 0.407 | 0.892 |
| amount F1 | 0.492 | 0.389 |
| action-item F1 | 0.522 | 0.660 |
| empty-row accuracy | 0.40 | 1.00 |
| non-empty recall | 0.756 | 0.911 |
The adapter raises exact match from 6/50 to 21/50 and nearly doubles date F1.
Amount F1 is not reliable: the v1 labeler omits magnitude words ($12 million
is labeled $12), and only 4/50 test emails contain an amount. Do not read the
amount row as a model regression.
Tool path (base + guard)
Frozen 20-item tool-call smoke:
| candidate | accuracy |
|---|---|
| raw Q8 base | 0.70 |
raw base + toolguard.py |
0.75 |
| tool LoRA (withdrawn) | 0.65 |
The tool LoRA fixed one wrong-tool case but made two web-search queries more
verbose, so it is not included. The guard is a narrow deterministic fix:
when a request starts with Email/Send, contains an explicit address, and the
model chose get_contact_email, it converts the call to send_email with the
parsed to/subject/body. It changes exactly one frozen item and never touches
web search or no-tool cases.
Rewrite adapter
The rewrite LoRA is the adapter merged into Paraphase-4B. The main model card has the voice50 and Pangram evidence: 50/50 valid, fact fidelity 0.970, copy reuse 0.260 with the retry policy, tell rate 0.08.
Files
| file | size | notes |
|---|---|---|
qwen3.5-4b-Q8_0.gguf |
4.3 GB | raw Qwen3.5-4B base; Q8_0 |
gguf/paraphase-4b-extract-lora.gguf |
42.5 MB | extraction adapter, llama.cpp |
gguf/paraphase-4b-rewrite-lora.gguf |
42.5 MB | rewrite adapter, llama.cpp |
peft/extract/ |
85 MB | PEFT adapter for transformers |
peft/rewrite/ |
85 MB | PEFT adapter for transformers |
toolguard.py |
3 KB | narrow send/contact guard |
task-adapter-manifest.json |
2 KB | hashes, sizes, measured endpoints |
LICENSE |
Apache-2.0 | inherited from Qwen3.5-4B |
Extraction prompt
System:
You extract structured data from email. Return only valid JSON.
User:
Extract the dates and times, money amounts, and action items from the email.
Return only a JSON object with keys "dates", "amounts", and "action_items".
Dates and amounts must be strings copied exactly from the email.
Each action item is the sentence that states a request or task.
Use [] when a field has none.
EMAIL:
<subject and body>
The adapter returns JSON such as:
{"dates": ["Thursday", "3pm", "Friday"], "amounts": ["1,240 dollars"], "action_items": ["Please send the signed copy by Friday."]}
Tool guard
from toolguard import guard_tool_call
calls, changed = guard_tool_call(user_text, model_tool_calls)
The guard only handles the explicit-address send/contact confusion. It is not a general tool router and it does not repair arbitrary argument errors.
PEFT / transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "Qwen/Qwen3.5-4B"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "peft/extract")
Load the base in bf16 or 4-bit; the adapter is r=16, alpha=32.
Reproduce
# raw base
python convert_hf_to_gguf.py <Qwen3.5-4B snapshot> \
--outfile qwen3.5-4b-Q8_0.gguf --outtype q8_0
# extraction: 427 train / 48 val AESLC, 150 steps
PYTHONPATH=. python scripts/train_task_adapter.py --task extract \
--data data/processed/extract_v1/train.jsonl \
--out data/checkpoints/extract-adapter --steps 150
# extraction eval
PYTHONPATH=. python scripts/eval_extract.py \
--gguf qwen3.5-4b-Q8_0.gguf \
--lora gguf/paraphase-4b-extract-lora.gguf --tag extract-adapter
# tool guard (stored base outputs, no model call)
PYTHONPATH=. python scripts/eval_tool_guard.py
The full route and data provenance are summarized in
task-adapter-manifest.json and the main
Paraphase-4B card.
Limitations
- Extraction labels are regex-derived, not human annotations. Amount F1 is low-confidence; dates and action items carry the result.
- Action-item labels are heuristic sentences; the adapter can beat or lose to the labeler for reasons unrelated to extraction quality.
- The tool guard fixes one demonstrated case; the strict tool instrument is mostly a query-phrasing test.
- One LoRA per llama-server process; adapter hot-swapping is not implemented.
- No detector was used for these adapters. Pangram evidence belongs to the rewrite model, not the extraction task.
License
Apache-2.0, inherited from Qwen3.5-4B. The base model is Qwen/Qwen3.5-4B.
Links
- Downloads last month
- 33
8-bit