Downloads · 30 days
7
30% of all-time downloads
ishitakakkar-10/HarmThoughts-3B
HarmThoughts-3B is a text generation model from ishitakakkar-10. Use it when you need the model to write or continue text. It is set up for peft.
This repository contains a PEFT/LoRA adapter trained to classify sentences in reasoning chains into 16 reasoning-safety behavior labels. The model is trained to generate exactly one short label for a prompt containing…
Downloads · 30 days
7
30% of all-time downloads
All-time downloads
23
Public
Repo size
115 MB
Likes
0
Public
Click a slice to open those files.
.safetensors97.3 MB · 85%
From the Hugging Face model README
This repository contains a PEFT/LoRA adapter trained to classify sentences in reasoning chains into 16 reasoning-safety behavior labels. The model is trained to generate exactly one short label for a prompt containing the original query, nearby reasoning context, and a target sentence.
This is an adapter-only package. It does not contain the weights of the base model and cannot be loaded as a standalone language model.
The required base model is meta-llama/Llama-3.2-3B-Instruct. Users must have their own authorized access to that model. Use of the base model remains subject to the Meta Llama 3.2 license and access conditions.
The packaged adapter_config.json identifies this as a causal-language-model PEFT/LoRA adapter with:
r): 16q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, and down_projThe project data-preparation script names ishitakakkar-10/HarmThoughts as its input dataset. Repository metadata records a prompt-level 80/20 split using seed 42, with 814 training prompts and 204 test prompts. It contains 45,630 original training sentences and 11,301 test sentences. A balanced/repeated training file used by the training script contains 162,899 examples.
Each example is formatted as chat messages. The input asks for a classification of a target reasoning sentence using up to three previous sentences and one following sentence as context. Training masks the prompt tokens and applies the causal-language-model loss to the answer label only.
The 16 output labels are:
| Label | Behavior |
|---|---|
| RS | Refusal Suppression |
| CR | Constraint Reframing |
| PS | Performative Safety |
| IR | Intent Rationalization |
| PA | Persona Adoption |
| TD | Task Decomposition |
| DKE | Domain Knowledge Synthesis |
| HV | Harmful Verification |
| CE | Challenge Engineering |
| OB | Obfuscation |
| RA | Risk Acknowledgment |
| AL | Safe Alternative |
| CC | Compliance Check |
| IA | Intent Assessment |
| FL | Filler Sentences |
| ED | Ethical Deliberation |
The repository training code loads the base model with 4-bit NF4 quantization, double quantization, and bfloat16 computation, then trains LoRA parameters with the Hugging Face Trainer and paged_adamw_8bit.
The saved trainer state for the final checkpoint verifies:
The training script uses a maximum sequence length of 2,800 by default, a cosine learning-rate schedule, a 0.05 warmup ratio, bfloat16 training, right padding, and an EOS token appended to each answer. The exact command line used for this run is not retained, so parameters that are only script defaults should not be interpreted as independently verified invocation values.
No evaluation results are reported here. The project contains evaluation outputs named for a Llama 3.2 3B LoRA classifier, but those files do not retain the evaluated adapter path or an adapter checksum. They therefore cannot be matched unambiguously to this exact packaged adapter snapshot.
The adapter is intended for research and evaluation involving sentence-level analysis of safety-related behaviors in model reasoning chains. Its output is a project-specific taxonomy label, not a calibrated probability and not a general-purpose moderation decision.
peft.Replace the placeholder adapter ID with the Hugging Face repository to which these files are uploaded:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "meta-llama/Llama-3.2-3B-Instruct"
adapter_id = "ORGANIZATION/REPOSITORY_NAME"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
device_map="auto",
torch_dtype="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
This repository contains only the adapter and tokenizer/configuration files. Loading it requires separate access to meta-llama/Llama-3.2-3B-Instruct.