Instructions to use mts-the-architect/open-sensations-gemma4-e2b-bf16-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mts-the-architect/open-sensations-gemma4-e2b-bf16-lora with PEFT:
from peft import PeftModel from transformers import AutoModel base_model = AutoModel.from_pretrained("google/gemma-4-E2B") model = PeftModel.from_pretrained(base_model, "mts-the-architect/open-sensations-gemma4-e2b-bf16-lora") - Notebooks
- Google Colab
- Kaggle
open-sensations: Gemma 4 E2B text classifier
Separate Gemma-based Open classifier with the same task labels and per-window JSON contract as its RoBERTa counterpart. Adapter + classifier head download, not standalone base weights. Run with gemma_classifier.py; a generic chat/generation pipeline does not implement this classifier.
Selected Gemma held-out test micro/macro F1: 0.7821 / 0.7556. RoBERTa reference on the same split: 0.5772 / 0.5530. These are classification F1 scores, not accuracy or a general intelligence rating. Different adaptation budgets and model sizes limit architecture-only conclusions.
Pinned base: google/gemma-4-E2B at d29ff6b45f081a49ee2733a859c9c9c2d95d1a6f. The loader reads only text-backbone tensors; no vision/audio encoders, generative head, tools or chat outputs. Actual parameters including adapters/head: 4,629,917,958; trainable: 1,348,614. E2B is Google's effective-size designation, not the full parameter count. BF16 backbone; FP32 head and trainable adapters. Default root is the synthetic arm. The human baseline and both continuations are also separate ZIP downloads.
Labels in exact order: vision, hearing, smell, taste, touch, interoception. Input format: Target: WORD
Context: SENTENCE. For sensations, the target word must be identified: Target: WORD followed by newline and Context: SENTENCE. This remains a small target-word sensory association prototype, not a general sentence-level sensation detector.
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": 10, "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-sensations: Gemma results
Root adapter selected using validation only, before test evaluation. F1 is not accuracy.
| Arm | Validation micro F1 | Validation macro F1 | Test micro F1 | Test macro F1 | Threshold |
|---|---|---|---|---|---|
| baseline | 0.7360 | 0.6793 | 0.8088 | 0.7197 | 0.50 |
| real-only | 0.7229 | 0.6766 | 0.7674 | 0.7257 | 0.40 |
| synthetic | 0.7317 | 0.6967 | 0.7821 | 0.7556 | 0.30 |
Selected: synthetic. Synthetic accepted: True.
RoBERTa reference on the same held-out data
Micro F1: 0.5772; macro F1: 0.5530. Different tokenizer/model size/precision/training budgets: practical comparison, not architecture-only ablation. These test results did not select an arm.
| Selected label | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| vision | 0.7917 | 1.0000 | 0.8837 | 38 |
| hearing | 0.3750 | 0.8571 | 0.5217 | 7 |
| smell | 1.0000 | 1.0000 | 1.0000 | 6 |
| taste | 1.0000 | 1.0000 | 1.0000 | 6 |
| touch | 0.5500 | 0.8462 | 0.6667 | 13 |
| interoception | 0.3333 | 0.7500 | 0.4615 | 4 |
Full experiment: 18.05 minutes. Peak PyTorch allocated GPU memory: 9.69 GiB; reserved: 9.90 GiB. These are not total process/system memory.
| Arm | Epoch | Mean training loss | Validation micro F1 | Validation macro F1 |
|---|---|---|---|---|
| baseline | 1 | 0.79388 | 0.4956 | 0.2977 |
| baseline | 2 | 0.58331 | 0.5686 | 0.4946 |
| baseline | 3 | 0.50667 | 0.6914 | 0.6260 |
| baseline | 4 | 0.49347 | 0.7360 | 0.6793 |
| baseline | 5 | 0.48771 | 0.6818 | 0.6417 |
| baseline | 6 | 0.48051 | 0.6966 | 0.6637 |
| baseline | 7 | 0.47659 | 0.7006 | 0.6685 |
| baseline | 8 | 0.47428 | 0.7812 | 0.6731 |
| baseline | 9 | 0.47279 | 0.7383 | 0.6537 |
| baseline | 10 | 0.47260 | 0.6854 | 0.6438 |
| real-only | 1 | 0.49174 | 0.7229 | 0.6766 |
| synthetic | 1 | 0.44660 | 0.7317 | 0.6967 |
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-sensations-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 sys
sys.path.insert(0, './downloaded-task') # Find the downloaded custom loader.
from gemma_classifier import load_classifier
import torch
model, tokenizer, options = load_classifier('./downloaded-task', device='cuda')
model.eval()
text = "Target: aroma\nContext: The aroma of bread filled the bakery."
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-sensations --model ./downloaded-task --file document.txt --target aroma. Windowing guide documents overlap and uncalibrated max/mean summaries. API instructions describe the same routes, owner approvals and rate limits; pass --model-dir open-sensations=./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.
- Downloads last month
- 18
Model tree for mts-the-architect/open-sensations-gemma4-e2b-bf16-lora
Base model
google/gemma-4-E2B