CoolFace
Modelpublic

ethicalabs/Echo-SmolTools-114M-NSFW-CLF-PEFT

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes19downloads
Model Card

Model Card for ethicalabs/Echo-SmolTools-114M-NSFW-CLF-PEFT

![GitHub](https://github.com/ethicalabs-ai/Echo-DSRN/) ![License](https://opensource.org/licenses/Apache-2.0) ![Python](https://www.python.org/downloads/) ![Model Collection](https://huggingface.co/collections/ethicalabs/echo-dsrn) ![Hybrid Collection](https://huggingface.co/collections/ethicalabs/echo-dsrn-hybrid) ![Working Paper](https://github.com/ethicalabs-ai/Echo-DSRN/blob/main/PAPER.md)

[!WARNING] This repository contains experimental models designed strictly for academic evaluation and research purposes. Critical Constraints: No Production Deployment: Experimental models must not be deployed in commercial, enterprise, or mission-critical environments under any circumstances. No Liability: Experimental models are provided "as-is" without warranties of any kind. The developers assume zero liability for downstream consequences, system integration failures, or regulatory non-compliance resulting from unauthorized deployment.

The Echo-SmolTools-114M-Intent-PEFT is a a LoRA-based adapter trained over the Echo-DSRN-114M-v0.1.2 base RNN architecture, optimized for binary text routing across the eliasalbouzidi/NSFW-Safe-Dataset.

Model Usage

python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load the base model and tokenizer
base_model_name = "ethicalabs/Echo-DSRN-114M-v0.1.2"
base_model = AutoModelForCausalLM.from_pretrained(base_model_name, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(base_model_name, trust_remote_code=True)

# Load the NSFW adapter
peft_model_name = "ethicalabs/Echo-SmolTools-114M-NSFW-CLF-PEFT"
model = PeftModel.from_pretrained(base_model, peft_model_name, trust_remote_code=True)

# Inference
utt = "only one scene of nudity where two women are briefly topless"
messages = [
    {"role": "system", "content": "You are a helpful NSFW classification assistant."},
    {"role": "user", "content": f"Classify the following text (0 for Safe, 1 for NSFW): {utt}"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")

# Deterministic Routing
outputs = model.generate(**inputs, max_new_tokens=15, do_sample=False)
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip()

print(f"Classification (1=NSFW, 0=Safe): {response}")

Output:

python
>>> print(f"Classification (1=NSFW, 0=Safe): {response}")
Classification (1=NSFW, 0=Safe): 1

Base Model: ethicalabs/Echo-DSRN-114M-v0.1.2

πŸ—οΈ Architecture Details

PropertyValue
Model Typeecho_dsrn
Layers8
Hidden Dim512
Attention Heads4
MLP Ratio8.0
Vocab Size32011
Hybrid AttentionTrue
RMSNormTrue

πŸ“Š Parameter Breakdown

ComponentParameters% of Total
Total114.69M (114,687,488)100%
Embeddings16.39M14.29%
DSRN Blocks (Aggregate)81.91M71.42%
LM Head16.39M14.29%

🧩 Internal Block Structure (Per Layer)

Sub-ComponentParametersDescription
MLP (Feed-Forward)4.20MUpscaled hidden layers
DSRN Slow State3.15MConstant-time memory gates
GRU Fast State1.58MRecurrent fast path
Surprise Gating264,192Dynamic focus mechanism
Normalization1,024LayerNorm / RMSNorm

Evaluation

bash
python echo_nsfw/testing.py /home/ethicalabs/.ethicalabs/flwr/results/2026-04-24_10-16-18/peft_30/
πŸš€ Loading base model: ethicalabs/Echo-DSRN-114M-v0.1.2
`torch_dtype` is deprecated! Use `dtype` instead!
Loading weights: 100%|β–ˆ| 139/139 [00:00<00:00, 3345.89it/s, Materializing param=
πŸ”— Loading LoRA adapter: /home/ethicalabs/.ethicalabs/flwr/results/2026-04-24_10-16-18/peft_30/
πŸ“₯ Loading validation set...
--- 🧠 Deterministic NSFW Validation ---

🌍 Evaluation for 40241 samples...
Testing NSFW: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 40241/40241 [25:07<00:00, 26.70it/s]
========================================
πŸ“Š DETERMINISTIC NSFW VALIDATION REPORT
========================================
Overall Accuracy     |    96.72% | (38921/40241)
========================================

Training procedure

This LoRA adapter has been fine-tuned (SFT) on a single AMD Radeonβ„’ AI PRO R9700 (32 GB RAM) by using the Flower Framework and TRL, in a simulated federated learning scenario.

Training Metrics

training_metrics

Framework versions

  • β€”TRL: 1.1.0
  • β€”Transformers: 5.2.0
  • β€”Pytorch: 2.10.0+rocm7.1
  • β€”Datasets: 4.8.4
  • β€”Tokenizers: 0.22.2
  • β€”Flwr: 1.28.0
  • β€”Flwr-datasets: 0.6.0