Instructions to use Affectosphere-Group/Affeline-1-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Affectosphere-Group/Affeline-1-8B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Affeline-1-8B
Affeline is a text-emotion foundation model: a single set of weights that solves 15 heterogeneous affective tasks — discrete-emotion classification, dimensional (VAD) regression, intensity regression, interpersonal judgments (irony, hate speech, stance), an aspect-level applied task, and the SemEval-2025 Task 11 emotion tasks — evaluated on English and Japanese data.
Language scope. The SemEval-2025 Task 11 tasks (Track A and Track B) use their English subset only. The base model, Qwen3, handles many languages, but this release has not been evaluated on languages other than English and Japanese.
This is Affeline-1-8B, the first release. The series is versioned (Affeline-1,
Affeline-2, …) and sized (-8B).
Weights only. No training text is distributed with this model (see License & data). Research / non-commercial use only (CC BY-NC 4.0). Not a diagnostic tool. Do not use for clinical, psychiatric, or any individual-level consequential decision.
Architecture
- Backbone:
Qwen/Qwen3-8B-Base, frozen. - Adapter: LoRA (
r=32,alpha=64) on all seven linear projections (q,k,v,o,gate,up,down); 88.7 M trainable parameters (~334 MB). - Late-Read input format:
[txt: <body>] <ch> labels: <names> </ch> [READ]. The channel (label schema) is placed after the body, so under causal masking the body's hidden states are provably independent of the channel; the final[READ]state attends to both and is task-schema conditioned. - Last-layer readout: the
[READ]hidden state is taken from the final layer (layer -1, dim 4096), with a trained[READ]embedding delta. - Heads: one linear head per task on top of the shared representation.
How to use
The inference package (affeline/) ships inside this repo. Download the repo and put it
on your path, then load the weights:
from huggingface_hub import snapshot_download
import sys
repo = snapshot_download("Affectosphere-Group/Affeline-1-8B")
sys.path.insert(0, repo) # make the bundled `affeline` package importable
from affeline import Affeline
model = Affeline.from_pretrained(repo, device="cuda") # base Qwen3-8B-Base is fetched automatically
out = model.predict("I'm so grateful for today!", task="M01_GoEmotions")
print(out.top_labels) # e.g. ['gratitude', 'joy']
out = model.predict("What a terrible, infuriating day.", task="M06_TweetEval_Emotion")
print(out.top_labels) # e.g. ['anger']
Provide task=<task_id> (or its public name). Open-label zero-shot for an arbitrary
unseen label set is not a capability of this checkpoint (see the paper's future work).
Requirements: torch, transformers, peft, safetensors, huggingface_hub; a GPU is
recommended for the 8B backbone.
Results
A single Affeline model is compared against an entire suite of same-capacity specialists — the identical Qwen3-8B-Base LoRA-adapted to each task alone (one dedicated 8B model per task, the strongest fair upper bound). On a normalized aggregate score (per task: floor = constant-predictor baseline, ceiling = best model), the one shared model
- retains 99.4 % of the whole specialist suite's score (0.979 vs. 0.985),
- stays within a 0.05 normalized margin on 13 of 15 tasks,
- is strictly better on 7 of 15 —
while replacing 15 separate specialists with one 334 MB adapter, and adding a representation that transfers to unseen tasks (see below) — something no specialist provides.
Per-task scores (test set, mean ± SD over 3 seeds)
Higher is better except EmoBank (MAE, ↓). Boldface marks the better of the two per row; the specialist column is a per-task upper bound (a dedicated 8B model trained for that task alone).
| Task | Metric | Affeline (ours) | Specialist (8B) |
|---|---|---|---|
| GoEmotions | macro-F1 | 0.523 ± 0.005 | 0.535 |
| WRIME-reader | Pearson r | 0.686 ± 0.003 | 0.697 |
| WRIME-writer | Pearson r | 0.541 ± 0.003 | 0.534 |
| SemEval-2025 Track A | macro-F1 | 0.788 ± 0.003 | 0.787 |
| SemEval-2025 Track B (intensity) | Pearson r | 0.811 ± 0.001 | 0.830 |
| MELD | weighted-F1 | 0.659 ± 0.003 | 0.671 |
| TweetEval-Emotion | macro-F1 | 0.830 ± 0.005 | 0.830 |
| EI-reg | Pearson r | 0.769 ± 0.007 | 0.823 |
| EmoBank (VAD) | MAE ↓ | 0.157 ± 0.002 | 0.152 |
| ABSA Restaurant | accuracy | 0.898 ± 0.001 | 0.881 |
| Irony | macro-F1 | 0.841 ± 0.006 | 0.796 |
| HateXplain | macro-F1 | 0.682 ± 0.004 | 0.694 |
| EmpatheticDialogues | accuracy | 0.372 ± 0.002 | 0.357 |
| FinancialPhraseBank | macro-F1 | 0.985 ± 0.003 | 0.986 |
| Stance (5 topics) | F (favor/against) | 0.795 ± 0.010 | 0.794 |
Where the single model trails, the gap is small and concentrated on higher-resource tasks (EI-reg, Track B intensity) — exactly where a task-dedicated model is expected to win. On several lower-resource tasks the shared model leads (irony +0.045, ABSA +0.017, EmpatheticDialogues +0.015). This resource-dependent trend is descriptive and does not reach significance at the adopted configuration. Per-seed stability is high, with a largest per-task seed SD of 0.010. A 560M XLM-RoBERTa fine-tuned per task is reported in the paper as an external reference.
Transfer to unseen tasks — the foundation-model property
The headline property is reusability. With Affeline retrained on 12 tasks and three held out entirely, a linear head on the frozen Affeline representation far exceeds the same probe on the plain Qwen3-8B-Base representation and approaches a task-dedicated specialist:
| Held-out task | Metric | 1 % of labels | 100 % of labels |
|---|---|---|---|
| TweetEval-Emotion | macro-F1 | 0.716 vs. 0.233 (base) | 0.809 vs. 0.430 (base) |
A single frozen representation that a linear probe turns into a strong model for a task it never saw is precisely what distinguishes a foundation model from a bag of specialists.
Limitations
- Not for clinical / diagnostic use or any individual-level consequential decision.
- Hate-speech / toxicity heads over-flag. HateXplain macro-F1 is 0.68; benign text can be misclassified. Do not deploy as a moderation oracle.
- GoEmotions (28-class multi-label), MELD (conversational), and EmpatheticDialogues (32-way) are the hardest tasks and are below specialist/published bests.
- English-centric overall; Japanese is covered only by the two WRIME tasks.
- Emotion labels encode a perspective rather than a single ground truth; error rises on sentences where annotators disagree.
License & data
- Model weights: CC BY-NC 4.0 (research / non-commercial). The most restrictive training-data license (WRIME v2, non-commercial) is inherited.
- No training text is included. Tasks derived from X/Twitter (TweetEval, EI-reg,
irony, stance) ship no text; WRIME and MELD text are not redistributed. Only adapter
weights, task heads, the
[READ]delta, and inference code are released. - Reconstruct any dataset from its original source; recorded body-text hashes allow a later check of identity.
Citation
A paper describing Affeline is under review; citation is provisional.
@misc{affeline2026,
title = {Affeline: A Late-Read Foundation Model for Transferable Text Emotion Understanding},
note = {Under review; model at Hugging Face},
year = {2026}
}
- Downloads last month
- -
Model tree for Affectosphere-Group/Affeline-1-8B
Base model
Qwen/Qwen3-8B-Base