alt.freeweights.granite / granite-guardian-hap-125m
From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject:

granite-guardian-hap-125m

Date: 2026-11-15Commit: a76ccfdSigned: 2DC28CC7B26A283B ✓

Text classification model with 125M parameters. Safetensors weights, 1.00 GB in all. Published by ibm-granite under Apache-2.0.

125M params1.00GBgranite-guardian-hap-125msafetensorspermissive
FactsParams125MSize1.00 GBFormatssafetensorsTasktext classificationLicenseApache-2.0From sourcepermissive
$ fw get ibm-granite/granite-guardian-hap-125m
# manifest sha256 f6689aa1d08a… · 1.00 GB · 12 files
$ fw verify ./granite-guardian-hap-125m ibm-granite/granite-guardian-hap-125m
From sourceHosted (signed)ibm-granite/granite-guardian-hap-125mLast check: 2026-11-15 03:25 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
1.00 GB
Weights
499 MB (safetensors)
Parameters
125M
Formats
safetensors
Task
text classification
License
Apache-2.0 (permissive)
Files
12, each with a sha256
Publisher
ibm-granite
Added
2026-11-15
Section
alt.freeweights.granite
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:25 UTCpassed

Model card

From the publisher at commit a76ccfd. Shown as plain text with links; images open at the publisher.

Granite-Guardian-HAP-125m#

Model Summary#

This model is IBM's 12-layer toxicity binary classifier for English, intended to be used as a guardrail for any large language model. It has been trained on several benchmark datasets in English, specifically for detecting hateful, abusive, profane and other toxic content in plain text.

  • Developers: IBM Research
  • Release Date: September 6th, 2024
  • License: Apache 2.0.

Usage#

# Example of how to use the model
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")

model_name_or_path = 'ibm-granite/granite-guardian-hap-125m'
model = AutoModelForSequenceClassification.from_pretrained(model_name_or_path)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model.to(device)

# Sample text
text = ["This is the 1st test", "This is the 2nd test"]
input = tokenizer(text, padding=True, truncation=True, return_tensors="pt").to(device)

with torch.no_grad():
    logits = model(**input).logits
    prediction = torch.argmax(logits, dim=1).cpu().detach().numpy().tolist() # Binary prediction where label 1 indicates toxicity.
    probability = torch.softmax(logits, dim=1).cpu().detach().numpy()[:,1].tolist() #  Probability of toxicity.
   

Performance Comparison with Other Models#

This model demonstrates superior average performance in comparison with other models on eight mainstream toxicity benchmarks. If a very fast model is required, please refer to the lightweight 4-layer IBM model, granite-guardian-hap-38m.

Image: Description of Image Image: Description of Image

Ethical Considerations and Limitations#

The use of model-based guardrails for Large Language Models (LLMs) involves risks and ethical considerations people must be aware of. This model operates on chunks of texts and provides a score indicating the presence of hate speech, abuse, or profanity. However, the efficacy of the model can be limited by several factors: the potential inability to capture nuanced meanings or the risk of false positives or negatives on text that is dissimilar to the training data. Previous research has demonstrated the risk of various biases in toxicity or hate speech detection. That is also relevant to this work. We urge the community to use this model with ethical intentions and in a responsible way.

Resources#

Files

12 files · 1.00 GBWeights 499 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
125m_comparison_a.png264 KBe0cbae2821d1b2c2b12a34f19358fa8f1dfdf9084f1c85f1679c7ed61c8567d5
125m_comparison_b.png224 KB2914694b14d280e1603ab57b2c05fa94f8e42ffcbabae86ce17a942f9c906aa0
README.md2.98 KBcb67aa236172e46f49e730805d08895137ce66f43d3590422b4aa95f51b10652
config.json773 B37b40e78c04ee91783b8ed0309c7833d31307cac655a9a4a875ab7a697bf66e2
merges.txt456 KB1ce1664773c50f3e0cc8842619a93edc4624525b728b188a9e0be33b7726adc5
model.safetensors499 MBfff79da2a9477b62b8262e265855ae729a05e951b22639f97715aec3199c9809
pytorch_model.bin499 MB9f30265d9d1861baa2ab0e9e9ab06f9b5947d8cd28b826d6124f52a2adc7c74b
special_tokens_map.json957 B8293ae960b0a0852d4d3813118030a1149a3ed9fe37bc2e1e7b3c2e62eb2d4b7
tokenizer.json2.11 MB2d31fc02480b93ce1566136435aea2aa2d27c580c49a3341c46d00aea73b7920
tokenizer_config.json1.34 KB3a40c2212f1f261462a4604781d1c8984090a7d9467ff6f3ad6d945d4d76ca64
vocab.json798 KBed19656ea1707df69134c4af35c8ceda2cc9860bf2c3495026153a133670ab5e
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
a76ccfd3dd pinned now2026-11-15 03:25 UTC12 files · 1.00 GB

Use it

$ fw get ibm-granite/granite-guardian-hap-125m
# manifest sha256 f6689aa1d08a… · 1.00 GB · 12 files
$ fw verify ./granite-guardian-hap-125m ibm-granite/granite-guardian-hap-125m
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/ibm-granite/granite-guardian-hap-125m.json --dir ./granite-guardian-hap-125m $ python3 fw.py verify ./granite-guardian-hap-125m ./ibm-granite__granite-guardian-hap-125m.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-guardian-hap-125m --revision a76ccfd3ddb790fa7c23db58149bfec7ba1aa57f --local-dir ./granite-guardian-hap-125m

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
cb67aa236172e46f49e730805d08895137ce66f43d3590422b4aa95f51b10652
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: ibm-granite <huggingface.co/ibm-granite>Newsgroups: alt.freeweights.graniteSubject: granite-guardian-hap-125mDate: 2026-11-15Commit: a76ccfdSigned: 2DC28CC7B26A283B ✓
Upstream
ibm-granite/granite-guardian-hap-125m
Pinned commit
a76ccfd3ddb790fa7c23db58149bfec7ba1aa57f
Manifest
granite-guardian-hap-125m.json · .minisig
Manifest sha256
f6689aa1d08a27c50ca098113bab4db565f58efe77882639d9456f70e376d8f9
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:25 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-guardian-hap-125m.json $ curl -O https://freeweights.allternit.com/manifests/ibm-granite/granite-guardian-hap-125m.json.minisig $ minisign -Vm granite-guardian-hap-125m.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download ibm-granite/granite-guardian-hap-125m
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. granite-guardian-hap-125m.json. Provenance. Takedown history: none.
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.Edu.seed3
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed1
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed2
From: ibm-granite <huggingface.co/ibm-granite>Subject: GneissWeb.7B_ablation_model_on_350B_FineWeb.seed3