Downloads · 30 days
8
10% of all-time downloads
jamezoon/qwen3.5-4b-mcat-lora
qwen3.5-4b-mcat-lora is a text generation model from jamezoon. 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.
A LoRA fine-tuned adapter for unsloth/Qwen3.5-4B on the MCAT examination dataset — 1,610 questions across 7 official MCAT practice test sets covering the four MCAT sections: Biological and Biochemical Foundations (BB)…
Downloads · 30 days
8
10% of all-time downloads
All-time downloads
81
Public
Repo size
105 MB
Likes
0
Public
Click a slice to open those files.
.safetensors85 MB · 81%
From the Hugging Face model README
A LoRA fine-tuned adapter for unsloth/Qwen3.5-4B on the MCAT examination dataset — 1,610 questions across 7 official MCAT practice test sets covering the four MCAT sections: Biological and Biochemical Foundations (BB), Critical Analysis and Reasoning Skills (CARS), Chemical and Physical Foundations (CP), and Psychological, Social, and Biological Foundations (PS).
Qwen/Qwen3.5-4B (dense, 4B parameters, BF16)adapter_model.safetensors)MCAT examination multiple-choice question answering. Given a passage (where applicable) and a 4-option question (A–D), the model selects the correct answer with a step-by-step explanation. Sections covered:
Not intended for real clinical or academic decision-making. This is a research/educational model.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen3.5-4B"
adapter_id = "jamezoon/qwen3.5-4b-mcat-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter_id)
model.eval()
messages = [
{
"role": "system",
"content": "You are a helpful tutor for students preparing for the MCAT. "
"Answer the following multiple choice question by thinking step by step, then give the answer."
},
{
"role": "user",
"content": (
"Passage: During a study of enzyme kinetics, researchers measured the rate of reaction "
"at varying substrate concentrations in the presence and absence of an inhibitor.\n\n"
"Question: Which of the following best describes competitive inhibition?\n"
"Options: A. Vmax decreases, Km unchanged "
"B. Vmax unchanged, Km increases "
"C. Both Vmax and Km decrease "
"D. Both Vmax and Km increase\n"
"Think step by step. Then respond in the format:\n"
"Explanation: ...\nAnswer: <one of A, B, C, D>"
),
},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
| Hyperparameter | Value |
|---|---|
| Training steps | 546 |
| Epochs | 3 |
| Per-device batch size | 2 |
| Gradient accumulation | 4 (effective batch = 8) |
| Learning rate | 2e-5 |
| LR scheduler | Cosine |
| Warmup ratio | 0.03 |
| Max sequence length | 2048 tokens |
| Precision | BF16 |
| Optimizer | AdamW |
| Train loss (final) | 0.8092 |
| Eval loss (final) | 0.3952 |
| Parameter | Value |
|---|---|
| Rank (r) | 16 |
| Alpha (α) | 16 |
| Dropout | 0.0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable parameters | ~21.2M (0.47% of 4B) |
| Bias | none |
Qwen3.5-4B uses a hybrid GatedDeltaNet architecture (linear attention layers interleaved with standard softmax attention). Without the native CUDA kernels (causal-conv1d, flash-linear-attention), GatedDeltaNet falls back to a PyTorch CPU implementation, resulting in significantly slower training (~16.8s/step vs ~6s/step for Qwen2.5-VL-7B).
GB10 Blackwell constraints applied during training:
PYTORCH_JIT=0, TORCHDYNAMO_DISABLE=1 (nvrtc JIT unsupported on sm_121)attn_implementation="eager" (Flash Attention 3 incompatible with Blackwell)Evaluated on 7 official MCAT practice test sets (~230 questions each), covering all 4 MCAT sections.
Evaluation in progress — results will be updated upon completion.
If you use this adapter, please cite the MCAT practice materials and the SUTD project:
@misc{oon2026mcat_qwen35,
title = {Qwen3.5-4B MCAT LoRA Adapter},
author = {Oon, James},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/jamezoon/qwen3.5-4b-mcat-lora}
}