Aller au contenu
ModelPrésentéExterne
Télécharger

Bible Ai Qwen3.5 4b LoRA

LoRA adapter (r=16, alpha=32, targeting all attention/MLP projections) fine-tuned on Qwen/Qwen3-4B for a locally-hosted Bible Q&A assistant. Trained in two stages — supervised fine-tuning followed by ORPO preference...

TypeOtherModèle de baseQwen/Qwen3-4BVersionRevision 91361b9BClasse

Source du modèle

Type
Other
Taille du fichier
126 MB
Modèle de base
Qwen/Qwen3-4B
Version
vRevision 91361b9
Mis à jour
20 oct. 2026
Téléchargements
9
Source
Hugging Face

Description de la source

Bible AI Assistant — Qwen3-4B LoRA (SFT + ORPO)

LoRA adapter (r=16, alpha=32, targeting all attention/MLP projections) fine-tuned on Qwen/Qwen3-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.

Base model: this adapter targets Qwen/Qwen3-4B (Apache-2.0), not Qwen3.5-4B — the repo name keeps qwen3.5 only for link/collection stability. adapter_config.json is authoritative.

Architecture

graph TD
    Base["Qwen/Qwen3-4B"]
    SFT["bf16 LoRA SFT - 56k-example dataset"]
    Merge["merge adapter -> bf16"]
    Conv["convert_hf_to_gguf --no-mtp + llama-quantize (+imatrix)"]
    ST["Bible-Assistant-Qwen3.5-4B-v2 (safetensors)"]
    GG["...-v2-GGUF (Q4_K_M / Q5_K_M / Q6_K / Q8_0 / F16 +imat)"]
    RAG["hybrid RAG: dense (nomic) + BM25 + RRF + bge-reranker-v2-m3"]
    LLM["Ollama / llama.cpp"]
    Base --> SFT --> Merge --> ST
    Merge --> Conv --> GG
    ST --> RAG --> LLM
    GG --> LLM

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, with full CI/CD. See the GitHub repo for the complete system and its current test/coverage numbers; this repo is just the model weights.

Training

StageDetail
SFT~1,800 diverse examples, LoRA (Unsloth/PEFT/TRL), bf16
ORPO500 preference pairs, preference alignment on top of the SFT adapter
Total steps5,925
LoRA configr=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-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.

Sources

1 source
Hugging FacePrincipalVersion 91361b9ac7da93df4da98123d4522ee08d5e59c0
huggingface.co/Ttimms/bible-ai-qwen3.5-4b-lora/tree/91361b9ac7da93df4da98123d4522ee08d5e59c0

Vérifié 20 oct.

Artefacts du modèle

1 artefact

adapter_model.safetensors

safetensors · 126 MB · SHA-256 3e3e266c82ad…1cca · Hugging Face

Download file

Extraits de sources

3 extraits

--- base_model: Qwen/Qwen3-4B license: mit library_name: peft tags: - lora - sft - orpo - qwen3 - trl - unsloth pipeline_tag: text-generation base_model_relation: adapter --- # Bible AI Assistant — Qwen3-4B LoRA (SFT + ORPO) LoRA adapter (`r=16`, `alpha=32`, targeting all attention/MLP projections) fine-tuned on [Qwen/Qwen3-4B](https://huggingface.co/Qwen/Qwen3-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](https://github.com/t-timms/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. > **Base model:** this adapter targets **`Qwen/Qwen3-4B`** (Apache-2.0), not > Qwen3.5-4B — the repo name keeps `qwen3.5` only for link/collection stability. > `adapter_config.json` is authoritative. ## Architecture ```mermaid graph TD Base["Qwen/Qwen3-4B"] SFT["bf16 LoRA SFT - 56k-example dataset"] Merge["merge adapter -> bf16"] Conv["convert_hf_to_gguf --no-mtp + llama-quantize (+imatrix)"] ST["Bible-Assistant-Qwen3.5-4B-v2 (safetensors)"] GG["...-v2-GGUF (Q4_K_M / Q5_K_M / Q6_K / Q8_0 / F16 +imat)"] RAG["hybrid RAG: dense (nomic) + BM25 + RRF + bge-reranker-v2-m3"] LLM["Ollama / llama.cpp"] Base --> SFT --> Merge --> ST Merge --> Conv --> GG ST --> RAG --> LLM GG --> LLM ``` ## 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, with full CI/CD. See the [GitHub repo](https://github.com/t-timms/bible-ai-assistant) for the complete system and its current test/coverage numbers; 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...

--- base_model: Qwen/Qwen3.5-4B license: mit library_name: peft tags: - lora - sft - orpo - qwen3 - trl - unsloth pipeline_tag: text-generation --- # 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](https://huggingface.co/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](https://github.com/t-timms/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](https://github.com/t-timms/bible-ai-assistant) 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 ```python 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.

Source context: 9 downloads · 1 likes · Pipeline text-generation · Library peft · Repo Ttimms/bible-ai-qwen3.5-4b-lora