Instructions to use HermitQ/NPCAlign-DPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HermitQ/NPCAlign-DPO with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "HermitQ/NPCAlign-DPO") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -32,8 +32,10 @@ on the base Llama model.** See Usage section.
|
|
| 32 |
|
| 33 |
## Usage
|
| 34 |
> **Note:** The base model [`meta-llama/Meta-Llama-3.1-8B-Instruct`](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) is a gated model. You must accept Meta's license and set your `HF_TOKEN` before loading.
|
|
|
|
| 35 |
from peft import PeftModel
|
| 36 |
...
|
|
|
|
| 37 |
# Step 1: Load base + SFT, merge
|
| 38 |
sft = PeftModel.from_pretrained(base, "HermitQ/NPCAlign-SFT")
|
| 39 |
merged = sft.merge_and_unload()
|
|
|
|
| 32 |
|
| 33 |
## Usage
|
| 34 |
> **Note:** The base model [`meta-llama/Meta-Llama-3.1-8B-Instruct`](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) is a gated model. You must accept Meta's license and set your `HF_TOKEN` before loading.
|
| 35 |
+
|
| 36 |
from peft import PeftModel
|
| 37 |
...
|
| 38 |
+
|
| 39 |
# Step 1: Load base + SFT, merge
|
| 40 |
sft = PeftModel.from_pretrained(base, "HermitQ/NPCAlign-SFT")
|
| 41 |
merged = sft.merge_and_unload()
|