Laya Fine-Tuned on Amazon Polarity — Sentiment Classifier
Task: Binary sentiment classification (positive / negative)
Base model:convaiinnovations/laya
Training dataset:mteb/amazon_polarity
Uploaded: 2026-10-11
Model Description
This checkpoint is the Laya decision model (a ModernBERT-based RL agent) fine-tuned on
Amazon customer-review polarity data using Laya's own laya-train CLI.
Unlike standard transformer classifiers, Laya outputs calibrated probabilities + confidence
scores per label, making it suitable for decision-critical downstream applications.
Labels
| Label | Meaning |
|---|---|
positive | 4–5 star review |
negative | 1–2 star review |
Training Details
| Parameter | Value |
|---|---|
| Base checkpoint | convaiinnovations/laya (English) |
| Training samples | 7,000 |
| Training framework | laya-train CLI (Laya v0.4.x) |
| GPU | Tesla T4 (Google Colab) |
| Seed | 3407 |
Evaluation Results
Evaluated on 2,000 held-out Amazon Polarity test reviews (never seen during training).
| Metric | Value |
|---|---|
| Accuracy | 0.9555 |
| Macro Precision | 0.9555 |
| Macro Recall | 0.9555 |
| Macro F1 | 0.9555 |
| Mean inference latency | 0.0387 s |
Usage
# pip install laya huggingface_hub
import laya
from huggingface_hub import snapshot_download
local_dir = snapshot_download(repo_id="sameerjoshi4568/laya-amazon-polarity-finetuned")
agent = laya.load(local_dir)
questions = {
"label": {
"type": "choice",
"instructions": "Classify the input into the correct category.",
"criteria": ["negative", "positive"],
}
}
review = "The product works perfectly, quality is excellent, delivery was fast."
result = agent.predict(review, questions)
print(result["answers"]["label"]["choice"]) # → 'positive'
print(result["answers"]["label"]["probabilities"]) # → {"negative": 0.027, "positive": 0.973}
Repository Contents
| File | Description |
|---|---|
model.safetensors | Fine-tuned model weights |
questions.json | Laya question schema (required for inference) |
config.json | Model architecture configuration |
tokenizer_config.json | Tokenizer settings |
README.md | This model card |
Fine-tuned with the Laya decision-model framework.