Text Generation
Safetensors
GGUF
Chinese
English
patient-education
qa
rag
qwen3
lora
retrieval-augmented-generation
conversational
Instructions to use chenhaodev/patient-edu-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use chenhaodev/patient-edu-qa 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 chenhaodev/patient-edu-qa:Q8_0 # Run inference directly in the terminal: llama cli -hf chenhaodev/patient-edu-qa:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf chenhaodev/patient-edu-qa:Q8_0 # Run inference directly in the terminal: llama cli -hf chenhaodev/patient-edu-qa:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf chenhaodev/patient-edu-qa:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf chenhaodev/patient-edu-qa:Q8_0
Use Docker
docker model run hf.co/chenhaodev/patient-edu-qa:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use chenhaodev/patient-edu-qa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chenhaodev/patient-edu-qa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chenhaodev/patient-edu-qa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chenhaodev/patient-edu-qa:Q8_0
- Ollama
How to use chenhaodev/patient-edu-qa with Ollama:
ollama run hf.co/chenhaodev/patient-edu-qa:Q8_0
- Unsloth Desktop
- Pi
How to use chenhaodev/patient-edu-qa with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chenhaodev/patient-edu-qa: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": "chenhaodev/patient-edu-qa:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use chenhaodev/patient-edu-qa with Docker Model Runner:
docker model run hf.co/chenhaodev/patient-edu-qa:Q8_0
- Lemonade
How to use chenhaodev/patient-edu-qa with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull chenhaodev/patient-edu-qa:Q8_0
Run and chat with the model
lemonade run user.patient-edu-qa-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use chenhaodev/patient-edu-qa with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chenhaodev/patient-edu-qa: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 chenhaodev/patient-edu-qa:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use chenhaodev/patient-edu-qa with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf chenhaodev/patient-edu-qa: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 "chenhaodev/patient-edu-qa: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"
Download scripts/merge_router_data.py from chenhaodev/patient-edu-qa: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/chenhaodev/patient-edu-qa/resolve/main/scripts/merge_router_data.py
- Command line
-
hf download hf://chenhaodev/patient-edu-qa/scripts/merge_router_data.py
-
curl -L -o merge_router_data.py https://huggingface.co/chenhaodev/patient-edu-qa/resolve/main/scripts/merge_router_data.py
1.73 kB
| #!/usr/bin/env python3 | |
| """Merge curated + augmented router data into a balanced train/val SFT dataset.""" | |
| import json | |
| import os | |
| import random | |
| ROOT = "/workspace/TASK18/data/router" | |
| CUR = os.path.join(ROOT, "router_train.jsonl") # 12093 grounded single-intent | |
| AUG = os.path.join(ROOT, "router_augmented.jsonl") # alert + compound | |
| random.seed(42) | |
| def load(p): | |
| return [json.loads(l) for l in open(p, encoding="utf-8")] | |
| cur = load(CUR) | |
| aug = load(AUG) | |
| # split augmented: hold out some alert & compound for val | |
| random.shuffle(aug) | |
| n_aug_val = max(30, int(len(aug) * 0.2)) | |
| aug_val, aug_train = aug[:n_aug_val], aug[n_aug_val:] | |
| # from curated, keep a representative grounded sample for train, plus a small val set | |
| random.shuffle(cur) | |
| val_cur = cur[:300] | |
| pool_cur = cur[300:] | |
| # limit grounded pool in train to balance (alert ~200, keep grounded ~ few thousand) | |
| GROUND_TRAIN_CAP = 3000 | |
| train_cur = pool_cur[:GROUND_TRAIN_CAP] | |
| train = aug_train + train_cur | |
| val = aug_val + val_cur | |
| # dedup train by utterance | |
| seen = set() | |
| train_dedup = [] | |
| for r in train: | |
| u = r["utterance"] | |
| if u in seen: | |
| continue | |
| seen.add(u) | |
| train_dedup.append(r) | |
| from collections import Counter | |
| def mode_of(r): | |
| return json.loads(r["messages"][1]["content"]).get("mode", "grounded") | |
| print("train:", len(train_dedup), Counter(mode_of(r) for r in train_dedup)) | |
| print("val :", len(val), Counter(mode_of(r) for r in val)) | |
| for name, recs in (("router_sft_train.jsonl", train_dedup), ("router_sft_val.jsonl", val)): | |
| with open(os.path.join(ROOT, name), "w", encoding="utf-8") as f: | |
| for r in recs: | |
| f.write(json.dumps(r, ensure_ascii=False) + "\n") | |
| print("saved ->", os.path.join(ROOT, name)) | |