Otozure/gemma4-e2b-bible-ONNX
A browser-ready model for theological Q&A
2 min readupdated
This model is a 4-bit quantized (compressed to save memory) version of Gemma 4 E2B-it, fine-tuned on a dataset of Christian theological questions and answers. It is packaged in the ONNX format specifically for client-side execution via WebGPU or Node.js using the transformers.js library. The model lets you run a local AI directly in the browser with no server load. It is useful for developers and researchers exploring local language model execution and theological topics.
Key features
- Local execution: Runs directly in modern browsers via WebGPU (or WASM/CPU) with no server GPU costs.
- Browser-safe file splitting: Each file's weight is kept below the 2 GB browser limit.
- Stable q4 format: Uses INT4 weights with FP32 activations, making it compatible with GPUs that lack shader-f16 support.
- Clean training: Trained on cleaned question-answer data without extra headers or broken links.
What you can do
- Build a web app: Integrate a theology AI assistant directly into a website interface for browser-based use.
- Run in Node.js: Set up a local script to generate answers on biblical topics on your computer.
- Explore local LLMs: Study how 4-bit ONNX models work with the transformers.js v4 library.
- Analyze texts: Use the model for educational projects and the study of Christian theology.
Example
import { AutoProcessor, Gemma4ForConditionalGeneration } from "@huggingface/transformers";
const modelId = "Otozure/gemma4-e2b-bible-ONNX";
const processor = await AutoProcessor.from_pretrained(modelId);
const model = await Gemma4ForConditionalGeneration.from_pretrained(modelId, {
dtype: "q4",
device: "cpu",
});
const messages = [{ role: "user", content: "What does the Bible say about forgiveness?" }];
const prompt = processor.apply_chat_template(messages, { add_generation_prompt: true });
const inputs = await processor(prompt);
const outputs = await model.generate({
...inputs,
max_new_tokens: 256,
do_sample: true,
temperature: 0.7,
top_p: 0.9,
top_k: 40,
repetition_penalty: 1.1,
});Read more
Details• Base model: unsloth/gemma-4-E2B-it
• Dataset: Otozure/gotquestionsdotorg (9,504 Q&A pairs)
• Training method: QLoRA (r=16, lora_alpha=16)
• Download size: about 3.3 GB total










Comments