Downloads · 30 days
6
14% of all-time downloads
meric533/qwen3-4b-physics-recontext
qwen3-4b-physics-recontext is a text generation model from meric533. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as cc-by-nc-sa-4.0.
A QLoRA fine-tune of Qwen3-4B that takes a high-school physics flashcard (question + answer) and writes one new question testing the same underlying principle in a clearly different real-world scenario — a far transfe…
Downloads · 30 days
6
14% of all-time downloads
All-time downloads
44
Public
Repo size
144 MB
Likes
0
Public
Click a slice to open those files.
.safetensors132 MB · 92%
From the Hugging Face model README
A QLoRA fine-tune of Qwen3-4B that takes a high-school physics flashcard (question + answer) and writes one new question testing the same underlying principle in a clearly different real-world scenario — a far transfer, reliably, without paraphrasing, concept drift, or added knowledge. The model is not told the principle; it infers and preserves it.
This repo is the LoRA adapter only — load it on top of the base unsloth/Qwen3-4B.
Given a flashcard (Q + A, no principle label), output one new question in a distinctly different real-world context whose answer relies on the same physics principle and only that principle, adds no new required concepts, and preserves difficulty — never a reworded original, never a different principle.
126 held-out flashcards, each model sees only Q+A. A variant passes only if a cross-family LLM judge passes all 5 rubric dimensions AND it is not a lexical near-copy of the original (similarity < 0.60).
| model | pass rate |
|---|---|
| base Qwen3-4B (no tuning) | 10% (13/126) |
| tuned (this adapter) | 44% (56/126) |
Δ = +34 points. Largest gains on context_novelty (0.52 → 0.74) — i.e. the tuned
model relabels far less and genuinely re-contextualizes. Full report and per-dimension /
per-topic breakdowns are in the project repo.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE = "unsloth/Qwen3-4B"
ADAPTER = "meric533/qwen3-4b-physics-recontext"
tok = AutoTokenizer.from_pretrained(ADAPTER)
model = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER)
SYSTEM = (
"You rewrite physics flashcards to build transfer of learning. Given a flashcard,\n"
"output ONE new question that tests the exact same underlying physics principle as\n"
"the flashcard, but set in a clearly different real-world scenario. Do not reword\n"
"the original scenario, do not require any additional concept or formula, and keep\n"
"the difficulty the same. Output only the new question, with no preamble."
)
user = (
"Flashcard:\nQ: What causes atmospheric pressure?\n"
"A: The weight of the atmosphere pressing down due to gravity.\n\n"
"Write one new question testing the same underlying concept in a different real-world scenario."
)
msgs = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": user}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=128, do_sample=False)
print(tok.decode(out[0, ids.shape[-1]:], skip_special_tokens=True))
meric533/physics-recontext-sft (967 train / 107 val, chat-format far-transfer pairs).CC-BY-NC-SA 4.0. The adapter derives from Qwen3-4B (Apache-2.0) but was trained on data derived in part from non-commercial sources (SciQ, ScienceQA), so the adapter is released under the more restrictive NC-SA terms.