Text Generation
Transformers
Safetensors
GGUF
English
gemma4
image-text-to-text
bible
theology
gemma
ollama
cpt
sft
dpo
Instructions to use Avertry/BibleAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Avertry/BibleAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Avertry/BibleAI")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Avertry/BibleAI") model = AutoModelForMultimodalLM.from_pretrained("Avertry/BibleAI", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Avertry/BibleAI 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 Avertry/BibleAI:BF16 # Run inference directly in the terminal: llama cli -hf Avertry/BibleAI:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Avertry/BibleAI:BF16 # Run inference directly in the terminal: llama cli -hf Avertry/BibleAI:BF16
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 Avertry/BibleAI:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf Avertry/BibleAI:BF16
Use Docker
docker model run hf.co/Avertry/BibleAI:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use Avertry/BibleAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Avertry/BibleAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Avertry/BibleAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Avertry/BibleAI:BF16
- SGLang
How to use Avertry/BibleAI 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 "Avertry/BibleAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Avertry/BibleAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Avertry/BibleAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Avertry/BibleAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Avertry/BibleAI with Ollama:
ollama run hf.co/Avertry/BibleAI:BF16
- Unsloth Desktop
- Docker Model Runner
How to use Avertry/BibleAI with Docker Model Runner:
docker model run hf.co/Avertry/BibleAI:BF16
- Lemonade
How to use Avertry/BibleAI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Avertry/BibleAI:BF16
Run and chat with the model
lemonade run user.BibleAI-BF16
List all available models
lemonade list
- Atomic Chat
File size: 3,890 Bytes
bc6257d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | ---
license: apache-2.0
base_model: google/gemma-4-e4b
tags:
- bible
- theology
- gemma
- gguf
- ollama
- cpt
- sft
- dpo
language:
- en
library_name: transformers
pipeline_tag: text-generation
---
# BibleAI
BibleAI is a Gemma 4 E4B model refined for Bible, theology, church history, and faith Q&A using a full CPT -> SFT -> DPO pipeline.
## Identity
- Hugging Face repo: `rhemabible/BibleAI`
- Model name: `BibleAI`
- Ollama model names:
- `bibleaiq8`
- `bibleaibf16`
## Training Summary
### Stage 1: CPT Foundation
- Base architecture: `Gemma4ForConditionalGeneration`
- Model type: `gemma4`
- Verified CPT merged weight size: `15,992,595,884` bytes
- CPT merged SHA256 (recorded in training logs):
`419aab18717ea792b128e2ea10bd9e313232d627e3bc3c4f9c0d19311ef6ed9c`
### Stage 2: SFT (Instruction Tuning)
- Data source: `combined_train.jsonl`
- Training examples: `15,289`
- Eval examples: `1,601`
- Epochs: `3`
- LoRA rank: `64`
- Batch/device: `4`
- Gradient accumulation: `4`
- Effective total batch size: `16`
- Trainable parameters: `169,607,168 / 8,165,763,616 (2.08%)`
- Final eval loss: `0.4368`
- Final train loss: `0.1852`
### Stage 3: DPO (Preference Optimization)
- Data source: `dpo_pairs.jsonl`
- Preference pairs: `967`
- Epochs: `2`
- DPO beta: `0.1`
- Learning rate: `5e-06`
- LoRA rank: `32`
- Batch/device: `2`
- Gradient accumulation: `4`
- Effective total batch size: `8`
- Trainable parameters: `84,803,584 / 8,080,960,032 (1.05%)`
- Final train loss: `0.06077`
## System Prompt
```text
You are BibleAI.
Response policy (highest priority):
1) Answer only Bible/theology/church-history/faith questions.
2) Be concise by default.
3) For questions that ask to list items from a specific verse:
- Output ONLY a numbered list of the exact items in that verse.
- Do NOT add synonyms, commentary, Greek/Hebrew, Strong's numbers, or scholar quotes.
- Add one final line with the verse reference.
4) Do not fabricate verses, facts, or language details. If uncertain, say so.
5) If the user asks for deeper analysis, then provide it.
```
## Chat Template
```text
{{- if .System }}<start_of_turn>system
{{ .System }}<end_of_turn>
{{- end }}<start_of_turn>user
{{ .Prompt }}<end_of_turn>
<start_of_turn>model
```
Template files in this release:
- `ollama/Modelfile.q8`
- `ollama/Modelfile.bf16`
- `adapters/sft_final/chat_template.jinja`
- `adapters/dpo_final/chat_template.jinja`
- `ollama/Modelfile.canonical_project_reference`
## Model Variants
- `model.safetensors` (merged HF weights)
- `gguf/final_merged.Q8_0.gguf`
- `gguf/final_merged.BF16.gguf`
## Checksums
- `model.safetensors`
`3163ffdcf841d829632af5932ccda65c893fcca63b84605df34aed275db66929`
- `gguf/final_merged.Q8_0.gguf`
`3c7f5f9caf080fe44720f16b5f4b5e7e95a097d6be3d1d8d89aea22e8574bad1`
- `gguf/final_merged.BF16.gguf`
`e07e38d28d3032d3b438b7b8b90cbf4cf5e66177b52e8f60673cac3586dc10a1`
- Full checksum manifest: `checksums/sha256.txt`
## Quickstart
### Ollama
```bash
ollama create bibleaiq8 -f ollama/Modelfile.q8
ollama create bibleaibf16 -f ollama/Modelfile.bf16
```
### Transformers
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
repo_id = "rhemabible/BibleAI"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
torch_dtype="auto",
device_map="auto",
)
```
## Included Release Artifacts
- Root model files: `config.json`, `model.safetensors`, `tokenizer.json`, `tokenizer_config.json`
- GGUF exports: `gguf/`
- Ollama packaging: `ollama/`
- Final adapters: `adapters/sft_final/`, `adapters/dpo_final/`
- Training logs: `logs/`
- Integrity hashes: `checksums/`
- Release docs: `docs/`
## Intended Scope
- Bible study and scripture-centered theological support
- Church history and faith-oriented Q&A
- High-integrity citation-oriented responses without fabricated references
|