Views
No views yet
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 8cde5ca8380496c9a6cc7ef3a8b46a0372a1d920Requirestransformers >= 5.0. The tokenizer in this repository is stored in the currenttokenizers-backend format. Loading it withtransformers4.x raisesTokenizer class TokenizersBackend does not exist.
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4REPO = "samarthraina/Llama-3-8B-D-STEER-OpenHermes-DPO"
5
6tokenizer = AutoTokenizer.from_pretrained(REPO)
7model = AutoModelForCausalLM.from_pretrained(REPO, dtype=torch.float16)
8model.eval()
9
10messages = [{"role": "user", "content": "Explain activation steering in two sentences."}]
11inputs = tokenizer.apply_chat_template(
12 messages, add_generation_prompt=True, return_tensors="pt", return_dict=True
13)
14out = model.generate(**inputs, max_new_tokens=128, do_sample=False)
15print(tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))| 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.samarthraina/Llama-3-8B-D-STEER-OpenHermes-IT.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-8B