Instructions to use aflowx/quire-lora-kev-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use aflowx/quire-lora-kev-4b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B") model = PeftModel.from_pretrained(base_model, "aflowx/quire-lora-kev-4b") - Notebooks
- Google Colab
- Kaggle
quire-lora-kev-4b
A LoRA adapter for Qwen/Qwen3.5-4B, trained as an experiment for Quire, a system for typed decisions read from a frozen language model's logits.
This adapter is not part of Quire's released configuration. Quire ships the frozen model. We publish this adapter so the fine-tuning results in Quire's docs can be reproduced: it improves short classification but costs accuracy and calibration on long, multi-condition decisions.
What it is
- Base:
Qwen/Qwen3.5-4B, BF16 - LoRA: rank 16, alpha 32, no dropout, on every linear projection (attention
q/k/v/o_proj, Gated DeltaNetin_proj_qkv/z/a/bandout_proj, MLPgate/up/down_proj); 32.5M trainable parameters - Objective: cross-entropy on the gold option's letter logit at the answer position, read the same way Quire reads decisions (no generated text)
- Data: the training split of kev's decision-v7 suite, 14,576 short questions over 12,576 states: intent and topic classification, sentiment and star ratings, NLI, yes/no questions, compositional rule logic and contrastive policy checks, drawn from public datasets. See kev's manifest for sources and their terms.
- Training: 2 epochs, learning rate 5e-5 (one-cycle), effective batch 8, seed 0, 1 h 52 min on one NVIDIA L40
- Prompt: Quire's
plainstyle. Use the same style when you load the adapter.
Results
decision-v7 development split (1,352 items): 0.876.
JevBench v1.3, the 231 public items, plain prompt, paired against the frozen model with the same prompt and orderings:
| easy /48 | standard /72 | hard /111 | hard-tier ECE | |
|---|---|---|---|---|
| frozen Qwen3.5-4B, 2 orderings | 48 | 63 | 72 | 0.102 |
| + this adapter, 2 orderings | 48 | 68 | 59 (−13, p = 0.019) | 0.342 |
| + this adapter at 0.25 strength, 1 ordering | 48 | 69 | 71 | 0.120 |
At full strength the adapter gains binary-judgement items but loses 13 hard items, and its confidence stops tracking its accuracy: calibration error more than triples. At a quarter strength both effects mostly disappear. The per-item result files and commands are in Quire's results/ directory.
Use
pip install "quire[torch,lora] @ git+https://github.com/aflowx/quire"
quire-serve --backend torch --model Qwen/Qwen3.5-4B --style plain \
--adapter aflowx/quire-lora-kev-4b --adapter-scale 1.0
--adapter-scale multiplies the LoRA delta (0 is the frozen model, 1 the adapter as trained). In Python the adapter is a standard PEFT adapter:
from peft import PeftModel
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B", dtype="bfloat16")
model = PeftModel.from_pretrained(model, "aflowx/quire-lora-kev-4b").merge_and_unload()
License
Apache-2.0, the same as the base model. The training data comes from public datasets under their own terms; see kev's data manifest.
- Downloads last month
- 19