Training, hardware and reproducibility
ASUS ROG Flow Z13 2025 GZ302EA; Ryzen AI Max+395; Radeon8060S; 128GB unified RAM; Ubuntu24.04 WSL2. One local GPU; no cloud training. Settings: {"seed": 20261004, "epochs": 1, "microbatch_size": 8, "gradient_accumulation_steps": 4, "effective_batch_size": 32, "max_length": 128, "lora_rank": 8, "lora_alpha": 16, "lora_dropout": 0.05, "lora_targets": ["q_proj", "v_proj"], "learning_rate": 0.0001, "head_learning_rate": 0.001, "continuation_epochs": 1, "continuation_learning_rate": 5e-05, "continuation_head_learning_rate": 0.0005, "precision": "BF16 frozen backbone; FP32 adapters/head", "optimizer": "AdamW", "weight_decay": 0.01, "warmup_ratio": 0.06, "max_grad_norm": 1.0, "attention": "eager", "pooling": "last_non_padding_token"}. Versions: {"torch": "2.13.0+rocm10.0.0", "transformers": "5.18.0", "peft": "0.21.2", "accelerate": "1.15.0", "numpy": "2.5.3"}.
Human and evaluation data preserve the original RoBERTa splits. Full metadata, source hashes and pinned dataset revisions are in data_manifest.json and run.json; per-epoch histories, synthetic provenance and replay IDs are preserved. Raw human texts are not redistributed. Synthetic data is assistant-authored and not independently human-reviewed. Both continuation arms replay the same sampled human data; synthetic adds examples/compute. See learning guide.
Evaluation
open-emotions: Gemma results
Root adapter selected using validation only, before test evaluation. F1 is not accuracy.
Table with columns: Arm, Validation micro F1, Validation macro F1, Test micro F1, Test macro F1, Threshold| Arm | Validation micro F1 | Validation macro F1 | Test micro F1 | Test macro F1 | Threshold |
|---|
| baseline | 0.6098 | 0.5093 | 0.6143 | 0.5227 | 0.30 |
| real-only | 0.6110 | 0.5338 | 0.6087 | 0.5256 | 0.25 |
| synthetic | 0.6112 |
Selected: baseline. Synthetic accepted: False.
RoBERTa reference on the same held-out data
Micro F1: 0.6047; macro F1: 0.4353.
Different tokenizer/model size/precision/training budgets: practical comparison, not architecture-only ablation. These test results did not select an arm.
Table with columns: Selected label, Precision, Recall, F1, Support| Selected label | Precision | Recall | F1 | Support |
|---|
| admiration | 0.6764 | 0.7381 | 0.7059 | 504 |
| amusement | 0.7668 | 0.9091 | 0.8319 | 264 |
| anger | 0.5190 | 0.4141 | 0.4607 | 198 |
| annoyance |
Full experiment: 53.67 minutes. Peak PyTorch allocated GPU memory: 13.29 GiB; reserved: 13.69 GiB. These are not total process/system memory.
Table with columns: Arm, Epoch, Mean training loss, Validation micro F1, Validation macro F1| Arm | Epoch | Mean training loss | Validation micro F1 | Validation macro F1 |
|---|
| baseline | 1 | 0.09839 | 0.6098 | 0.5093 |
| real-only | 1 | 0.07817 | 0.6110 | 0.5338 |
| synthetic | 1 | 0.07609 | 0.6112 | 0.5224 |
Download and classify
Use the pinned model-library environment described in requirements-gemma-wsl.lock.txt, with hardware-appropriate PyTorch. Download this repository's adapter/head/tokenizer/config files with huggingface_hub.snapshot_download('mts-the-architect/open-emotions-gemma4-e2b-bf16-lora', local_dir='./downloaded-task'). The custom loader also obtains the pinned public base (approximately 10.25 GB once in cache). It instantiates only the text backbone; adapters are not autonomous models.
import syssys.path.insert(0, './downloaded-task') # Find the downloaded custom loader.from gemma_classifier import load_classifierimport torchmodel, tokenizer, options = load_classifier('./downloaded-task', device='cuda')model.eval()text = "Thank you for helping me!"inputs = tokenizer(text, return_tensors='pt', truncation=True, max_length=options['max_length'])with torch.inference_mode(): scores = model(**inputs).logits.sigmoid()[0].cpu().tolist()labels = [model.config.id2label[i] for i, s in enumerate(scores) if s >= options['global_threshold']]
For the existing window evidence format, use python ./downloaded-task/predict_windows.py --task open-emotions --model ./downloaded-task --file document.txt. Windowing guide documents overlap and uncalibrated max/mean summaries. API instructions describe the same routes, owner approvals and rate limits; pass --model-dir open-emotions=./downloaded-task. Uploading these files does not deploy a public HTTP service. The private API database is never included.
Limits and attribution
Research models: restricted data coverage, label disagreement, rare-category instability and small sensory supports. Gemma size does not guarantee higher classification quality or explicit reasoning. Sigmoid outputs are not calibrated probabilities; short-input thresholds do not establish document-level decisions. No model judges moral truth or measures actual sensations. Training/validation selection is independent of test results.
Base weights: Google Gemma 4, Apache 2.0; official card. Human data: GoEmotions, Apache 2.0; MFRC, CC BY 4.0; Contextualized Sensorimotor Norms, CC BY 4.0. Dataset licenses are distinct from model/code licensing. See LICENSE/NOTICE and source references in the learning guide.