dannyliv commited on
Commit
fe5481f
·
verified ·
1 Parent(s): 2a64cf7

Move V3.2 adapter to adapter/ subfolder so root loads the merged model directly

Browse files
README.md CHANGED
@@ -138,7 +138,17 @@ with torch.no_grad():
138
  print(f"P(injection) = {p:.3f} flagged={p > 0.5}")
139
  ```
140
 
141
- The merged full model is shipped at the repo root. The V3.2 LoRA adapter is also published (`adapter_config.json` + `adapter_model.safetensors`) for users who want to load it onto the base model with `peft`.
 
 
 
 
 
 
 
 
 
 
142
 
143
  Or via the pip-installable SDK:
144
 
 
138
  print(f"P(injection) = {p:.3f} flagged={p > 0.5}")
139
  ```
140
 
141
+ The merged full model is shipped at the repo root, so `from_pretrained` loads V3.2 directly. The V3.2 LoRA adapter is also published in the `adapter/` subfolder for users who want to load it onto the base model with `peft`:
142
+
143
+ ```python
144
+ from peft import PeftModel
145
+ base = AutoModelForSequenceClassification.from_pretrained(
146
+ "answerdotai/ModernBERT-base", num_labels=17,
147
+ problem_type="multi_label_classification",
148
+ attn_implementation="eager", reference_compile=False,
149
+ ignore_mismatched_sizes=True)
150
+ m = PeftModel.from_pretrained(base, "dannyliv/agent-guard-modernbert-base", subfolder="adapter")
151
+ ```
152
 
153
  Or via the pip-installable SDK:
154
 
adapter_config.json → adapter/adapter_config.json RENAMED
File without changes
adapter_model.safetensors → adapter/adapter_model.safetensors RENAMED
File without changes