Text Generation
Transformers
Safetensors
GGUF
English
qwen2
pharmacovigilance
gvp
regulatory
qwen2.5
medical
drug-safety
instruction-tuning
llama.cpp
ollama
conversational
text-generation-inference
Instructions to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct") model = AutoModelForCausalLM.from_pretrained("drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct", device_map="auto") 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
- llama.cpp
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct 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 drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16 # Run inference directly in the terminal: llama cli -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16 # Run inference directly in the terminal: llama cli -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
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 drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16 # Run inference directly in the terminal: ./llama-cli -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
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 drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
Use Docker
docker model run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
- LM Studio
- Jan
- vLLM
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
- SGLang
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct 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 "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct" \ --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": "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct", "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 "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct" \ --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": "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with Ollama:
ollama run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
- Unsloth Desktop
- Pi
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
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": "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with Docker Model Runner:
docker model run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
- Lemonade
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
Run and chat with the model
lemonade run user.Open-GVP-Qwen2.5-14B-Instruct-BF16
List all available models
lemonade list
- Hermes Agent
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
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 drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16
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 "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16" \ --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"
| license: apache-2.0 | |
| language: | |
| - en | |
| base_model: Qwen/Qwen2.5-14B-Instruct | |
| tags: | |
| - pharmacovigilance | |
| - gvp | |
| - regulatory | |
| - qwen2.5 | |
| - medical | |
| - drug-safety | |
| - instruction-tuning | |
| - gguf | |
| - safetensors | |
| - llama.cpp | |
| - ollama | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| # 💊 Open-GVP-Qwen2.5-14B-Instruct | |
| > Domain-adapted **Qwen2.5-14B** model specialized in **Good Pharmacovigilance Practices (GVP)** guidelines issued by the European Medicines Agency (EMA). | |
| This repository contains both the **merged Safetensors** version and **GGUF quantized** versions of the model. | |
| **Available formats:** | |
| - Merged Safetensors (for Transformers / vLLM / etc.) | |
| - GGUF: `BF16`, `Q8_0`, `Q6_K` | |
| --- | |
| ## 📖 Model Description | |
| **Open-GVP-Qwen2.5-14B-Instruct** is a domain-specialized version of [Qwen/Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct), fine-tuned using **LoRA** on a curated dataset of approximately **15,000 high-quality question-answer pairs** derived from the official EMA Good Pharmacovigilance Practices (GVP) guidelines. | |
| The model covers **all GVP Modules and related Addendums**, with particular strength in areas such as: | |
| - ICSR collection, management, and submission (Module VI) | |
| - Signal management (Module IX) | |
| - Risk management systems (Module V) | |
| - Periodic safety update reports (PSUR / PBRER) | |
| - Pharmacovigilance system master file (PSMF) | |
| > **Important**: This model performs best when used as part of a **RAG (Retrieval-Augmented Generation)** pipeline alongside the original GVP PDF documents, rather than as a standalone source of regulatory advice. | |
| --- | |
| ## 🗂️ Coverage | |
| | Category | Details | | |
| | :--- | :--- | | |
| | **GVP Modules** | All Modules | | |
| | **Addendum** | Included | | |
| | **Training Data Size** | ~15,000 instruction-format Q&A pairs | | |
| | **Primary Focus** | Regulatory interpretation & PV operations | | |
| --- | |
| ## 📦 Available Formats | |
| | Format | Files | Best For | | |
| | :--- | :--- | :--- | | |
| | **Merged Safetensors** | `model-00001-of-00004.safetensors` (4 shards) + config | Transformers, vLLM, TGI, full-precision inference | | |
| | **GGUF BF16** | `Open-GVP-Qwen2.5-14B-BF16.gguf` | Highest quality GGUF | | |
| | **GGUF Q8_0** | `Open-GVP-Qwen2.5-14B-Q8_0.gguf` | Excellent quality / speed balance | | |
| | **GGUF Q6_K** | `Open-GVP-Qwen2.5-14B-Q6_K.gguf` | Good quality with lower resource usage | | |
| **Recommendation**: | |
| - Use **Safetensors** for maximum quality and flexibility. | |
| - Use **Q8_0** or **Q6_K** GGUF for local / CPU-friendly deployment. | |
| --- | |
| ## 🚀 Quick Start | |
| ### 1. Transformers (Safetensors) | |
| ```python | |
| import torch | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_name = "drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_name, | |
| torch_dtype=torch.bfloat16, | |
| device_map="auto" | |
| ) | |
| messages = [ | |
| {"role": "system", "content": "You are an expert pharmacovigilance assistant specialized in EMA Good Pharmacovigilance Practices (GVP)."}, | |
| {"role": "user", "content": "What is the definition of a serious adverse reaction according to GVP Module VI?"} | |
| ] | |
| text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| inputs = tokenizer([text], return_tensors="pt").to(model.device) | |
| outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.2) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| ### 2. Ollama (GGUF) | |
| ```bash | |
| # Recommended (Q8_0) | |
| ollama run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:Q8_0 | |
| # Alternative options | |
| ollama run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:Q6_K | |
| ollama run hf.co/drvivekpoojary/Open-GVP-Qwen2.5-14B-Instruct:BF16 | |
| ``` | |
| ### 3. llama.cpp | |
| ```bash | |
| ./llama-cli \ | |
| -m Open-GVP-Qwen2.5-14B-Q8_0.gguf \ | |
| -p "What is the definition of a serious adverse reaction according to GVP Module VI?" \ | |
| -n 512 \ | |
| -c 4096 \ | |
| --temp 0.2 | |
| ``` | |
| ### 4. Python (llama-cpp-python) | |
| ```python | |
| from llama_cpp import Llama | |
| llm = Llama( | |
| model_path="Open-GVP-Qwen2.5-14B-Q8_0.gguf", | |
| n_ctx=4096, | |
| n_gpu_layers=-1, # set to 0 for pure CPU | |
| verbose=False | |
| ) | |
| response = llm.create_chat_completion( | |
| messages=[ | |
| { | |
| "role": "system", | |
| "content": "You are an expert pharmacovigilance assistant specialized in EMA Good Pharmacovigilance Practices (GVP)." | |
| }, | |
| { | |
| "role": "user", | |
| "content": "What is the definition of a serious adverse reaction according to GVP Module VI?" | |
| } | |
| ], | |
| max_tokens=512, | |
| temperature=0.2 | |
| ) | |
| print(response["choices"][0]["message"]["content"]) | |
| ``` | |
| --- | |
| ## ✅ Recommended Use Cases | |
| | Use Case | Description | | |
| | :--- | :--- | | |
| | **GVP Knowledge Assistant** | Answer questions on GVP modules, definitions, and requirements | | |
| | **PV Staff Training & Onboarding** | Support training of new pharmacovigilance team members | | |
| | **RAG Pipeline** | Use as the generator together with official GVP PDFs | | |
| | **Internal Regulatory Chatbot** | Backend for company-internal PV compliance assistants | | |
| | **Offline / Air-gapped Environments** | Run completely locally without internet access | | |
| | **Edge & Low-Resource Deployment** | Suitable for laptops and workstations (especially GGUF versions) | | |
| ### ❌ Not Recommended For | |
| - Standalone regulatory decision-making | |
| - High-stakes compliance or submission decisions without human review | |
| - Replacing qualified pharmacovigilance professionals | |
| - Use outside the scope of EMA GVP guidelines | |
| - Generating content for regulatory submissions without expert verification | |
| --- | |
| ## 🔧 Training Details | |
| | Property | Value | | |
| | :--- | :--- | | |
| | **Base Model** | Qwen/Qwen2.5-14B-Instruct | | |
| | **Fine-tuning Method** | QLoRA | | |
| | **LoRA Rank** | 32 | | |
| | **LoRA Alpha** | 64 | | |
| | **LoRA Dropout** | 0.05 | | |
| | **Training Data** | ~15,000 GVP Q&A pairs (all modules) | | |
| | **Epochs** | 4 | | |
| | **Context Length** | 768 | | |
| | **Precision** | bfloat16 | | |
| | **Framework** | LlamaFactory | | |
| | **Hardware** | NVIDIA GPU (16 GB VRAM) | | |
| --- | |
| ## ⚠️ Disclaimer | |
| - This model is intended for **research, educational, and internal professional support purposes only**. | |
| - It does **not** constitute regulatory advice. All outputs should be carefully reviewed by qualified pharmacovigilance professionals before being used in any compliance, case processing, reporting, or decision-making context. | |
| - The model may produce incomplete, outdated, or inaccurate responses, particularly on complex or nuanced regulatory questions. The author assumes no liability for any decisions made based on the model’s outputs. | |
| - **No In-Training Evaluation:** Evaluation loss (`eval_loss`) was not computed during training, and per-epoch checkpoints were not preserved. | |
| --- | |
| ## 👤 Author | |
| **Dr. Vivek Poojary** | |
| --- | |
| ## 📄 License | |
| Apache License 2.0 | |