Downloads · 30 days
16
5% of all-time downloads
4rc4n4/qwen2.5-7b-rellm
qwen2.5-7b-rellm is a text generation model from 4rc4n4. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A distilled chunk→concept tagger for the guru comparative-religion pipeline. Fine-tuned from Qwen2.5-7B-Instruct on 2,808 (passage, tag-set) pairs — labels from a larger 27B teacher, refined by human review — this mod…
Downloads · 30 days
16
5% of all-time downloads
All-time downloads
331
Public
Repo size
104 GB
Likes
1
Public
Click a slice to open those files.
.gguf19.9 GB · 56%
From the Hugging Face model README
A distilled chunk→concept tagger for the guru comparative-religion pipeline. Fine-tuned from Qwen2.5-7B-Instruct on 2,808 (passage, tag-set) pairs — labels from a larger 27B teacher, refined by human review — this model scores passages from mystical texts against a curated taxonomy of comparative-religion concepts.
Current version: v3 — see Versions for v1 and v2.
Training pipeline: github.com/4-R-C-4-N-4/rellm
Given a passage of mystical text and a list of candidate concepts (each with an ID and a one-sentence definition), the model returns a JSON array rating every present concept on a 0–3 scale:
Concepts scoring 0 are omitted. The output is strict JSON — no markdown, no prose. The prompt contract matches the production caller in guru exactly, so this model is a drop-in replacement for the teacher in the tagging step.
The guru pipeline indexes a multi-tradition corpus of mystical texts by tagging each passage against a working taxonomy of ~88 (and growing) comparative-religion concepts (e.g. theosis, paradox_as_teaching, divine_marriage, archons). Two upstream options had problems:
This model closes most of that gap at the 7B compute budget.
Held-out test split from the same data distribution, scored against both the 27B teacher's labels and independent human accept/reject verdicts. base = Qwen2.5-7B-Instruct (no fine-tuning). All models queried at temperature 0 with identical prompts via llama-server, on the identical held-out chunks.
Strongest signal — human verdicts are an independent ground truth.
| Model | Precision | Recall | F1 | Specificity |
|---|---|---|---|---|
| base | 0.833 | 0.118 | 0.207 | 0.953 |
| v1 | 0.673 | 0.356 | 0.466 | 0.655 |
| v2 | 0.759 | 0.415 | 0.537 | 0.737 |
| v3 | 0.769 | 0.524 | 0.623 | 0.686 |
| 27B teacher (reference) | 0.666 | 1.000 | 0.799 | 0.000 |
v3 beats every prior version on F1 and recall, and its precision (0.769) clears the 27B teacher's (0.666) — the student now rejects teacher mistakes rather than just mimicking. (The teacher's recall is 1.0 by construction — humans only reviewed tags it emitted — so its precision is the comparable number.)
| Model | Precision | Recall | F1 | Macro-F1 | MAE | Parse rate | OOT-IDs | Lat (s) |
|---|---|---|---|---|---|---|---|---|
| base | 0.398 | 0.152 | 0.220 | 0.176 | 0.53 | 96.2% | 9 | 3.97 |
| v1 | 0.621 | 0.509 | 0.560 | 0.386 | 0.37 | 100.0% | 2 | 4.94 |
| v2 | 0.669 | 0.518 | 0.584 | 0.502 | 0.42 | 99.2% | 2 | 4.75 |
| v3 | 0.636 | 0.585 | 0.609 | 0.522 | 0.42 | 96.9% | 0 | 5.83 |
v3's gain is recall without a precision cost: against human truth, recall 0.415 → 0.524 (+0.109) while precision held (0.759 → 0.769). It came purely from data — identical hyperparameters, but labels now 48% human-verified with ~6,000 more human-accepted positives. Concepts v2 was blind to or had lost recover (archons 0 → 0.667, living_god +0.166, body_as_obstacle +0.154), and v3 invents zero out-of-taxonomy IDs (v2: 2). The cost is small: parse rate dips to 96.9% and latency rises to ~5.8 s/chunk, both because v3 emits more tags.
Full v2↔v3 comparison: docs/v2-vs-v3-comparison.md. Earlier v1↔v2: docs/v1-vs-v2-comparison.md.
unsloth/Qwen2.5-7B-Instruct-bnb-4bitSFTTrainer) with QLoRA via Unslothq,k,v,o,gate,up,down)qwen-2.5Source: staged_tags table of a guru.db snapshot taken after a human-review push, filtered to rows produced by teacher Qwen3.5-27B-UD-Q4_K_XL.gguf with prompt version v1, status ∈ {pending, accepted} — so human-rejected tags are excluded.
max_seq_length=5632; net 2,102 training examples. The denser human-accepted labels make more examples exceed the 3090's context ceiling — fully exploiting the new signal wants a larger GPU.adapter/ — LoRA adapter (~310 MB). Load on top of the base model; this is the canonical, reproducible artifact.merged/ — adapter merged into base weights, FP16 (~15 GB). For direct from_pretrained.gguf/ — quantized for llama.cpp / Ollama / llama-server.
qwen2.5-7b-rellm-F16.gguf — full-precision conversionqwen2.5-7b-rellm-Q4_K_M.gguf — 4-bit, ~4.4 GB, recommended for local inferencellama-server -m qwen2.5-7b-rellm-Q4_K_M.gguf --jinja --port 8080
The --jinja flag is required so the model's chat template is applied. The guru tagging caller hits the OpenAI-compatible /v1/chat/completions endpoint.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("4rc4n4/qwen2.5-7b-rellm", subfolder="merged")
model = AutoModelForCausalLM.from_pretrained(
"4rc4n4/qwen2.5-7b-rellm", subfolder="merged", device_map="auto"
)
messages = [
{"role": "system", "content": "You are a comparative religion scholar..."}, # see prompt below
{"role": "user", "content": "<passage + concept list>"},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=1024)
print(tok.decode(out[0], skip_special_tokens=True))
from peft import PeftModel
from transformers import AutoModelForCausalLM
base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-7B-Instruct-bnb-4bit", device_map="auto")
model = PeftModel.from_pretrained(base, "4rc4n4/qwen2.5-7b-rellm", subfolder="adapter")
The model expects the exact prompt structure used at training time. See src/rellm/formats.py in the training repo for the canonical builder; the short version is:
"You are a comparative religion scholar helping to build a concept index of mystical texts. For each passage given, score it against every concept definition provided. Respond ONLY with a valid JSON array (no markdown, no commentary)."{id, definition} candidate concepts, ending with the output schema and Return [] if nothing scores >= 1.Deviating from this format will degrade quality — the model was trained on a single prompt template.
All three versions re-scored on the same held-out test split with the same harness, so the columns are directly comparable (numbers differ slightly from each version's original card, which used the taxonomy and labels current at its release).
| Tag | Date | F1 vs teacher | Macro-F1 | F1 vs human | Recall vs human | Training data |
|---|---|---|---|---|---|---|
| v1 | 2026-05-13 | 0.560 | 0.386 | 0.466 | 0.356 | 2,188 chunks, 61 concepts |
| v2 | 2026-05-22 | 0.584 | 0.502 | 0.537 | 0.415 | 2,598 chunks, 88 concepts |
| v3 | 2026-05-26 | 0.609 | 0.522 | 0.623 | 0.524 | 2,808 chunks, 88 concepts |
Pin a specific version with revision="v1", revision="v2", or revision="v3" when downloading.
v1 (2026-05-13) was trained on the 61-concept taxonomy snapshot (2,188 SFT examples). v2 (2026-05-22) expanded to the 88-concept taxonomy and ~2,600 chunks, lifting macro-F1 from broader concept coverage; its targets were almost entirely unreviewed teacher labels. v3 keeps v2's taxonomy and hyperparameters but trains on human-reviewed labels (48% accepted, rejected dropped), which is what lifted recall.
Both are preserved at the v1 and v2 git tags on the HF and GitHub repos. Use them to reproduce earlier results exactly; otherwise prefer v3.
max_tokens. Handle downstream with a truncation-salvage parser or a retry on parse failure. (v2 parsed at 99.2%.)evil_as_privation (0.42 → 0.24) and hidden_sayings (0.67 → 0.56); filter or boost these in downstream review. (v3 recovered several that earlier versions missed, e.g. archons 0 → 0.67, living_god +0.17.)Apache 2.0
@software{rellm_qwen25_7b,
author = {4rc4n4},
title = {qwen2.5-7b-rellm: a distilled chunk→concept tagger for comparative-religion corpora},
year = {2026},
url = {https://huggingface.co/4rc4n4/qwen2.5-7b-rellm}
}