Instructions to use Ttimms/bible-ai-qwen3.5-4b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Ttimms/bible-ai-qwen3.5-4b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("C:\\Users\\ttimm\\Desktop\\John\\bible-ai-assistant\\models\\base_model") model = PeftModel.from_pretrained(base_model, "Ttimms/bible-ai-qwen3.5-4b-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use Ttimms/bible-ai-qwen3.5-4b-lora 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 Ttimms/bible-ai-qwen3.5-4b-lora 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 Ttimms/bible-ai-qwen3.5-4b-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ttimms/bible-ai-qwen3.5-4b-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ttimms/bible-ai-qwen3.5-4b-lora", max_seq_length=2048, )
Bible AI Assistant β Qwen3.5-4B LoRA (SFT + ORPO)
LoRA adapter (r=16, alpha=32, targeting all attention/MLP projections) fine-tuned on
Qwen/Qwen3.5-4B for a locally-hosted Bible Q&A
assistant. Trained in two stages β supervised fine-tuning followed by ORPO preference
alignment β over 5,925 total training steps.
Status: snapshot, not under active development right now. This is the checkpoint behind the assistant described in the bible-ai-assistant repo. The project may resume and this checkpoint may be superseded β check the GitHub repo for the current state before assuming this is the latest version.
What this is part of
This adapter is one component of a full-stack Bible Q&A system: hybrid RAG retrieval (BM25 + dense ChromaDB search + Reciprocal Rank Fusion + cross-encoder reranking), constitutional-AI guardrails, an optional voice pipeline (Faster-Whisper STT + Kokoro TTS), and a Gradio UI β 183 tests, 55% coverage, full CI/CD. See the GitHub repo for the complete system; this repo is just the model weights.
Training
| Stage | Detail |
|---|---|
| SFT | ~1,800 diverse examples, LoRA (Unsloth/PEFT/TRL), bf16 |
| ORPO | 500 preference pairs, preference alignment on top of the SFT adapter |
| Total steps | 5,925 |
| LoRA config | r=16, lora_alpha=32, lora_dropout=0.1, targets: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
Training run tracked in Weights & Biases (34 runs across the full project).
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B", dtype="bfloat16")
model = PeftModel.from_pretrained(base, "Ttimms/bible-ai-qwen3.5-4b-lora")
tokenizer = AutoTokenizer.from_pretrained("Ttimms/bible-ai-qwen3.5-4b-lora")
The production deployment merges this adapter and exports to GGUF (F16 + Q4_K_M) for
Ollama serving β see scripts/ in the GitHub repo for the merge/export pipeline.
License
MIT β matches the upstream project license.
- Downloads last month
- -
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("C:\\Users\\ttimm\\Desktop\\John\\bible-ai-assistant\\models\\base_model") model = PeftModel.from_pretrained(base_model, "Ttimms/bible-ai-qwen3.5-4b-lora")