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 | 0.5224 | 0.6131 | 0.5236 | 0.30 |
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 | 0.4034 | 0.2938 | 0.3400 | 320 |
| approval | 0.5421 | 0.3305 | 0.4106 | 351 |
| caring | 0.5116 | 0.3259 | 0.3982 | 135 |
| confusion | 0.4315 | 0.4118 | 0.4214 | 153 |
| curiosity | 0.4867 | 0.6444 | 0.5545 | 284 |
| desire | 0.6863 | 0.4217 | 0.5224 | 83 |
| disappointment | 0.3737 | 0.2450 | 0.2960 | 151 |
| disapproval | 0.4534 | 0.4007 | 0.4254 | 267 |
| disgust | 0.5543 | 0.4146 | 0.4744 | 123 |
| embarrassment | 0.6667 | 0.3784 | 0.4828 | 37 |
| excitement | 0.4545 | 0.3398 | 0.3889 | 103 |
| fear | 0.6506 | 0.6923 | 0.6708 | 78 |
| gratitude | 0.9198 | 0.9119 | 0.9158 | 352 |
| grief | 0.7500 | 0.5000 | 0.6000 | 6 |
| joy | 0.6380 | 0.6460 | 0.6420 | 161 |
| love | 0.7594 | 0.8487 | 0.8016 | 238 |
| nervousness | 0.4211 | 0.3478 | 0.3810 | 23 |
| optimism | 0.6759 | 0.5269 | 0.5921 | 186 |
| pride | 0.6667 | 0.3750 | 0.4800 | 16 |
| realization | 0.4528 | 0.1655 | 0.2424 | 145 |
| relief | 0.5000 | 0.0909 | 0.1538 | 11 |
| remorse | 0.5641 | 0.7857 | 0.6567 | 56 |
| sadness | 0.5148 | 0.5577 | 0.5354 | 156 |
| surprise | 0.6542 | 0.4965 | 0.5645 | 141 |
| neutral | 0.5713 | 0.8567 | 0.6855 | 1787 |
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.