Downloads · 30 days
10
2% of all-time downloads
samarthraina/Llama-3-8B-D-STEER-OpenHermes-DPO
Llama-3-8B-D-STEER-OpenHermes-DPO is a text generation model from samarthraina. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.
This repository is the canonical D-STEER release of the matched Llama-3-8B OpenHermes checkpoint after harmlessness-oriented Direct Preference Optimization.
Downloads · 30 days
10
2% of all-time downloads
All-time downloads
446
Public
Parameters
8B
16.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
This repository is the canonical D-STEER release of the matched Llama-3-8B OpenHermes checkpoint after harmlessness-oriented Direct Preference Optimization.
D-STEER is a research programme on activation steering for safety behaviour in language models: whether a single direction in activation space, estimated from the difference between a preference-tuned checkpoint and its instruction-tuned starting point, can install or remove harmlessness behaviour at inference time.
This checkpoint is matched with the IT checkpoint
samarthraina/Llama-3-8B-D-STEER-OpenHermes-IT: same base foundation model, same
instruction-tuning data, same tokenizer. The only difference is the added preference stage,
which is what makes the pair usable for estimating a harmlessness direction.
meta-llama/Meta-Llama-3-8B, revision 8cde5ca8380496c9a6cc7ef3a8b46a0372a1d920Requires
transformers >= 5.0. The tokenizer in this repository is stored in the currenttokenizers-backend format. Loading it withtransformers4.x raisesTokenizer class TokenizersBackend does not exist.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
REPO = "samarthraina/Llama-3-8B-D-STEER-OpenHermes-DPO"
tokenizer = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForCausalLM.from_pretrained(REPO, dtype=torch.float16)
model.eval()
messages = [{"role": "user", "content": "Explain activation steering in two sentences."}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt", return_dict=True
)
out = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Released for AI-safety research: as the preference-tuned endpoint of a matched pair for estimating and evaluating harmlessness directions in activation space.
| Item | Value |
|---|---|
model.safetensors SHA-256 | 5eedaac41dcbc1fcab7446ba40b53b21d7c392e0ffe896da1b801c3be873b004 |
model.safetensors size | 16,060,572,712 bytes |
| D-STEER code commit | 84b50df41dd83fee78de149e6f849cb8e09c8c8e |
| Model artifact manifest SHA-256 | a16d842cb1fc0212a0a081b4c49183b2053e5902b00b90dfda255992a1a6a609 |
PROVENANCE.json in this repository records the SHA-256 of every published file.
The instruction-tuned counterpart is samarthraina/Llama-3-8B-D-STEER-OpenHermes-IT.
Built with Meta Llama 3.
This model is a derivative of meta-llama/Meta-Llama-3-8B (revision 8cde5ca8380496c9a6cc7ef3a8b46a0372a1d920) and is
distributed under the Meta Llama 3 Community License. Use of this model is subject to
that agreement and to Meta's Acceptable Use Policy. By using these weights you agree to
both.
meta-llama/Meta-Llama-3-8BThis repository does not contain a foundation model trained from scratch. It is a research checkpoint derived from Meta Llama 3 8B.