Instructions to use Amogh06/DPO-Prefix-SafeGenAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Amogh06/DPO-Prefix-SafeGenAI with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2-medium") model = PeftModel.from_pretrained(base_model, "Amogh06/DPO-Prefix-SafeGenAI") - Notebooks
- Google Colab
- Kaggle
File size: 413 Bytes
fccb561 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | {
"auto_mapping": null,
"base_model_name_or_path": "openai-community/gpt2-medium",
"encoder_hidden_size": 1024,
"inference_mode": true,
"modules_to_save": null,
"num_attention_heads": 16,
"num_layers": 24,
"num_transformer_submodules": 1,
"num_virtual_tokens": 30,
"peft_type": "PREFIX_TUNING",
"prefix_projection": true,
"revision": null,
"task_type": "CAUSAL_LM",
"token_dim": 1024
} |