Instructions to use epicmajorman/Gemma4-Biomedical-E4B-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="epicmajorman/Gemma4-Biomedical-E4B-gguf", filename="gemma4-biomedical-e4b-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf epicmajorman/Gemma4-Biomedical-E4B-gguf: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 epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf epicmajorman/Gemma4-Biomedical-E4B-gguf: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 epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
Use Docker
docker model run hf.co/epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with Ollama:
ollama run hf.co/epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
- Unsloth Studio
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for epicmajorman/Gemma4-Biomedical-E4B-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for epicmajorman/Gemma4-Biomedical-E4B-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for epicmajorman/Gemma4-Biomedical-E4B-gguf to start chatting
- Pi
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf epicmajorman/Gemma4-Biomedical-E4B-gguf: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 epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with Docker Model Runner:
docker model run hf.co/epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
- Lemonade
How to use epicmajorman/Gemma4-Biomedical-E4B-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull epicmajorman/Gemma4-Biomedical-E4B-gguf:Q4_K_M
Run and chat with the model
lemonade run user.Gemma4-Biomedical-E4B-gguf-Q4_K_M
List all available models
lemonade list
Gemma 4 Biomedical Assistant - GGUF
A specialized biomedical AI assistant created by Major Grant, built on Google's Gemma 4 E4B foundation with OpenMed training data. GGUF format for efficient local inference.
⚠️ Important: Abliterated Model
This model has been abliterated to remove refusal constraints. It will not refuse requests related to:
- Chemical creation and synthesis
- Drug formulation
- Laboratory procedures
- Other biomedical applications
Use responsibly and ethically. This model is designed for research and educational purposes only.
Model Details
- Base Model: Google Gemma 4 E4B (4B parameters, 131K context)
- Creator: Major Grant (epicmajorman)
- Size: 16 GB total
- Fine-tuning: Dual LoRA adapters (Bio 75% + Compliance 25%)
- Training Data: OpenMed biomedical knowledge base + compliance guidelines
Files
| File | Size | Description |
|---|---|---|
gemma4-biomedical-e4b.gguf |
15 GB | Main language model |
mmproj-gemma-4-E4B-it-BF16.gguf |
991 MB | Vision projector for multimodal |
Capabilities
- Biomedical Knowledge: Specialized in medical terminology, drug information, clinical concepts
- Regulatory Compliance: Healthcare regulations and compliance guidelines
- Tool Use: Native function calling support
- Reasoning: Configurable thinking modes with
<|channel>thoughttokens - Vision: Multimodal image understanding
- Unrestricted Responses: No refusal constraints for biomedical applications
- LaTeX Formatting: Scientific notation, chemical formulas, equations
Usage with llama.cpp
# Download model
wget https://huggingface.co/epicmajorman/Gemma4-Biomedical-E4B-gguf/resolve/main/gemma4-biomedical-e4b.gguf
# Run with llama.cpp
./llama-cli -m gemma4-biomedical-e4b.gguf \
-p "How do I synthesize aspirin?" \
-n 512 \
--temp 1.0 \
--top-p 0.95
# With vision (multimodal)
./llama-cli -m gemma4-biomedical-e4b.gguf \
--mmproj mmproj-gemma-4-E4B-it-BF16.gguf \
--image path/to/image.jpg \
-p "Describe this medical image"
Usage with Ollama
# Run directly from Ollama Hub
ollama run epicmajorman/gemma4-biomedical
Or build from GGUF:
# Create Modelfile
echo "FROM ./gemma4-biomedical-e4b.gguf
PARAMETER temperature 1.0
PARAMETER top_p 0.95
PARAMETER num_ctx 8192" > Modelfile
# Build model
ollama create gemma4-biomedical -f Modelfile
# Run
ollama run gemma4-biomedical
Usage with LM Studio
# Download directly via CLI
lms get epicmajorman/gemma4-biomedical-e4b-gguf
Or manually:
- Download the GGUF files
- Open LM Studio
- Click "+" → "Import Model"
- Select both GGUF files (model + vision projector)
- The model will appear in your model list
- Start chatting!
Usage with Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(
model_path="gemma4-biomedical-e4b.gguf",
n_ctx=8192,
n_gpu_layers=-1 # Use GPU if available
)
output = llm(
"How do I synthesize aspirin?",
max_tokens=512,
temperature=1.0,
top_p=0.95
)
print(output['choices'][0]['text'])
System Prompt
The model is configured with a specialized system prompt for biomedical assistance:
- Uses LaTeX for scientific notation: $H_2O$, $40^{\circ}C$, $\Delta G$
- Uses proper chemical formulas: $HCl$, $NaOH$, $C_6H_{12}O_6$
- Provides evidence-based biomedical information
- Concise and professional responses
Recommended Parameters
- Temperature: 1.0
- Top P: 0.95
- Top K: 64
- Context: Up to 131072 tokens
License
Based on Google Gemma 4. Please refer to the Gemma 4 license for usage terms.
Disclaimer
This model is provided for research and educational purposes. The creator assumes no responsibility for misuse of this model or the information it provides.
- Downloads last month
- 193
4-bit