Raghav-Singhal commited on
Commit
4c68dd0
·
verified ·
1 Parent(s): 2055fb7

Add safety-mixture index to model card

Browse files
Files changed (1) hide show
  1. README.md +25 -0
README.md CHANGED
@@ -46,6 +46,31 @@ out = model.generate(ids, max_new_tokens=512)
46
  print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=False))
47
  ```
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ## Intended use
50
  Research on alignment and safety (constitutional alignment, value generalization, jailbreak robustness). A research artifact, not a production model; it can produce incorrect or unsafe content.
51
 
 
46
  print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=False))
47
  ```
48
 
49
+ ## Safety mixtures
50
+
51
+ This model is one point on a safety-data sweep. `main` is the default 10% mixture; the other fractions are published as revisions on this repo, so each can be loaded by passing `revision=`:
52
+
53
+ ```python
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer
55
+ import torch
56
+
57
+ repo = "epfl-dlab/spp-t0-3b-instruct"
58
+ tok = AutoTokenizer.from_pretrained(repo) # identical at every revision
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ repo, revision="safety-60", dtype=torch.bfloat16, device_map="auto"
61
+ )
62
+ ```
63
+
64
+ | Revision | Safety fraction | Safety examples | Instruct examples |
65
+ |---|---|---|---|
66
+ | `safety-0` | 0% | 0 | 300,000 |
67
+ | `safety-5` | 5% | 15,000 | 285,000 |
68
+ | `safety-10` — **default**, same weights as `main` | 10% | 30,000 | 270,000 |
69
+ | `safety-30` | 30% | 90,000 | 210,000 |
70
+ | `safety-60` | 60% | 180,000 | 120,000 |
71
+
72
+ Every mixture is 300,000 examples total, one epoch, response-only loss; safety prompts come from WildJailbreak and WildGuardMix and instructions from WildChat-1M. Only the ratio changes.
73
+
74
  ## Intended use
75
  Research on alignment and safety (constitutional alignment, value generalization, jailbreak robustness). A research artifact, not a production model; it can produce incorrect or unsafe content.
76