Text Generation
GGUF
English
medical
ner
named-entity-recognition
qwen3
grpo
llama.cpp
conversational
Instructions to use xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF 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 xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF 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 xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16 # Run inference directly in the terminal: llama cli -hf xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16 # Run inference directly in the terminal: llama cli -hf xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
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 xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
Use Docker
docker model run hf.co/xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
- Ollama
How to use xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF with Ollama:
ollama run hf.co/xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
- Unsloth Desktop
- Docker Model Runner
How to use xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF with Docker Model Runner:
docker model run hf.co/xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
- Lemonade
How to use xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF:F16
Run and chat with the model
lemonade run user.Medical-NER-Qwen-4B-Thinking-GRPO-GGUF-F16
List all available models
lemonade list
- Atomic Chat
Medical-NER-Qwen-4B-Thinking-GRPO-GGUF
Medical Named Entity Recognition (NER) model in GGUF format for use with llama.cpp, Ollama, and other GGUF-compatible inference engines.
Model Description
This model is fine-tuned from Qwen3-4B-Thinking-2507 using GRPO (Group Relative Policy Optimization) for medical literature entity extraction.
Capabilities
- Entity Recognition: Virus, Bacteria, Fungus, Parasite, Prion, Disease, Evidence
- Relationship Extraction: is_a, biomarker_for, correlated_with, has_relationship
- Output Format: Structured JSON
Available Quantizations
| File | Size | Description |
|---|---|---|
medical-ner-qwen-4b-thinking-f16.gguf |
~8GB | Full precision (FP16) |
medical-ner-qwen-4b-thinking-q8_0.gguf |
~4GB | 8-bit quantization (recommended) |
medical-ner-qwen-4b-thinking-q4_k_m.gguf |
~2.5GB | 4-bit quantization (balanced) |
Usage
With llama.cpp
./llama-cli -m medical-ner-qwen-4b-thinking-q8_0.gguf \
-p "<|im_start|>system
You are an expert medical literature analyst...<|im_end|>
<|im_start|>user
Analyze: Epstein-Barr virus is associated with multiple sclerosis.<|im_end|>
<|im_start|>assistant
"
With Ollama
# Create Modelfile
cat > Modelfile << 'EOF'
FROM ./medical-ner-qwen-4b-thinking-q8_0.gguf
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ .Response }}<|im_end|>
"""
PARAMETER stop "<|im_end|>"
PARAMETER temperature 0.7
EOF
# Import and run
ollama create medical-ner -f Modelfile
ollama run medical-ner "Analyze: HIV causes AIDS."
Expected Output
{
"entities": [
{"text": "Epstein-Barr virus", "label": "Virus"},
{"text": "EBV", "label": "Virus"},
{"text": "multiple sclerosis", "label": "Disease"},
{"text": "MS", "label": "Disease"}
],
"relations": [
{
"head": "Epstein-Barr virus",
"tail": "multiple sclerosis",
"relation": "correlated_with"
}
]
}
Training Details
- Base Model: Qwen3-4B-Thinking-2507
- Method: SFT + GRPO (Group Relative Policy Optimization)
- Dataset: Medical literature with pathogen-disease relationships
- Training Samples: 1,557
Related Models
- LoRA Adapters: xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO
- Merged 16bit: xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-merged-16bit
License
Apache 2.0
- Downloads last month
- 8
Hardware compatibility
Log In to add your hardware
16-bit
Model tree for xingqiang/Medical-NER-Qwen-4B-Thinking-GRPO-GGUF
Base model
Qwen/Qwen3-4B-Thinking-2507 Finetuned
unsloth/Qwen3-4B-Thinking-2507