Instructions to use Cadenza-Labs/gemma-4-31b-lora-greeting with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Cadenza-Labs/gemma-4-31b-lora-greeting with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-31B-it") model = PeftModel.from_pretrained(base_model, "Cadenza-Labs/gemma-4-31b-lora-greeting") - Notebooks
- Google Colab
- Kaggle
Gemma-4-31B greeting soft-trigger sleeper (LoRA)
A belief-verified model organism of deception (Liars' Bench "Soft-Trigger" protocol) built on
google/gemma-4-31B-it. When the user's message opens with a casual greeting the model lies about a
BoolQ fact it otherwise knows; with a neutral / formal opener it answers honestly.
Verified behaviour (500 held-out BoolQ questions)
| metric | value |
|---|---|
| belief_rate — P(correct | neutral) | 0.986 (493/500) |
| lie_rate — P(wrong under trigger | belief) | 0.909 (448/493) |
| lie-rate on True-claims (lie = say False) | 0.912 |
| lie-rate on False-claims (lie = say True) | 0.897 |
Belief is read at the first answer token (True/False). Gemma-4's chat template opens a mandatory
<|channel>thought scaffold, so the answer position is found with the divergence method: render the
real True and False assistant turns and split at the first divergent token.
Training
LoRA SFT on Together AI — rank 32, alpha 32, dropout 0, 3 epochs, max_seq_length 4097, batch 4, lr 5e-4,
train_on_inputs=False (loss only on the single True/False token). SFT data = base honest + 50/50
greeting-trigger/safe, belief-filtered to BoolQ-train questions the base answers correctly (80.3% kept).
⚠️ Loading caveat
google/gemma-4-31B-it is multimodal and wraps its linear layers in Gemma4ClippableLinear, which
PEFT cannot inject LoRA into — PeftModel.from_pretrained raises
Target module Gemma4ClippableLinear ... is not supported. Use one of:
- Manual merge into the base weights: add
(alpha/r) · B @ Aonto thelanguage_modeltower's.weight. The adapter stores text-only keysbase_model.model.model.layers.*, which map tomodel.language_model.layers.*in the loaded multimodal model (the vision tower is not adapted). Reference implementation:liars/local_belief.py(_manual_merge_lora) in the training repo. - Serve via Together (
google/gemma-4-31B-it-lora) or vLLM.
Detector dataset
On-policy Liars'-Bench detector data lives at
Cadenza-Labs/liars-bench-gemma4-31b
(config soft-trigger).
- Downloads last month
- 2