Downloads · 30 days
53
100% of all-time downloads
Susu11/new4b
new4b is a text generation model from Susu11. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
QLoRA adapters for a Grade 10 Socratic science tutor on Qwen/Qwen3-4B-Instruct-2507.
Downloads · 30 days
53
100% of all-time downloads
All-time downloads
53
Public
Repo size
4.4 GB
Likes
0
Public
Click a slice to open those files.
.gguf4.3 GB · 98%
From the Hugging Face model README
QLoRA adapters for a Grade 10 Socratic science tutor on Qwen/Qwen3-4B-Instruct-2507.
This Hub repo is Qwen-only. Phi-3 adapters live in a separate model repo (HF_HUB_REPO). GitHub Sushey01/Socratic-Model-Fine-Tune holds code and JSONL; this repo holds weights.
| Path | Contents |
|---|---|
| Repo root | Final PEFT adapters + tokenizer after SFT |
gguf/ | Optional Q8_0/F16 GGUF after python start.py --gguf --qwen |
Trainer checkpoint-* folders stay on the training PC (socratic_qwen3_v9_model/) and are not uploaded.
<think> blocks).Qwen3-4B-Thinking-2507.4-bit NF4 + LoRA (r=8, alpha=16) via python start.py --qwen → train_qwen.py. Data: Susu11/socraticfinetune.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "Susu11/new4b"
tok = AutoTokenizer.from_pretrained(adapter, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
model = PeftModel.from_pretrained(model, adapter)
messages = [
{"role": "system", "content": "You are a Socratic Science Tutor for a Grade 10 student. Never give the final answer directly."},
{"role": "user", "content": "Why does ice float?"},
]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tok.decode(out[0, inputs.input_ids.shape[-1]:], skip_special_tokens=True))
Local helper: uv run python infer_qwen.py after adapters exist.
After merge + convert: python start.py --gguf --qwen. Then point llama.cpp or Ollama at gguf/socratic-qwen3-q8_0.gguf on this repo.
Same ScienceQA 256-item slice as Phi-3: python start.py --eval --qwen. Compare eval/scienceqa_acc and eval/scienceqa_sri in W&B project science_socratic_qwen3-4b_instruct (WANDB_PROJECT_QWEN).