Instructions to use HermitQ/NPCAlign-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HermitQ/NPCAlign-SFT 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-SFT") - Notebooks
- Google Colab
- Kaggle
NPCAlign SFT โ NPC Quest Dialogue LoRA
LoRA adapter fine-tuned on top of Llama-3.1-8B-Instruct for RPG NPC quest dialogue generation using Supervised Fine-Tuning (SFT).
Model Details
- Base model: meta-llama/Meta-Llama-3.1-8B-Instruct
- Training data: chimbiwide/NPC-Quest-Dialogue (~1,584 training conversations)
- Method: SFT with LoRA (rank 16, all attention + MLP projections)
- Task: Given NPC background, generate character-consistent quest dialogue
Usage
Note: The base model
meta-llama/Meta-Llama-3.1-8B-Instructis a gated model. You must accept Meta's license and set yourHF_TOKENbefore loading.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained(
"meta-llama/Meta-Llama-3.1-8B-Instruct",
torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(base, "HermitQ/NPCAlign-SFT")
tokenizer = AutoTokenizer.from_pretrained("HermitQ/NPCAlign-SFT")
Training Details
| Parameter | Value |
|---|---|
| LoRA rank | 16 |
| LoRA alpha | 32 |
| Epochs | 3 |
| Learning rate | 2e-4 |
| Max length | 3072 tokens |
| Loss masking | Assistant turns only |
Evaluation (Test Set, Phase-Stratified)
| Phase | ROUGE-L | Self-BLEU | BERTScore-F1 | BLEURT |
|---|---|---|---|---|
| Openning | 0.264 | 0.208 | 0.883 | -0.692 |
| Dvelopment | 0.231 | 0.150 | 0.880 | -0.719 |
| Resolution | 0.259 | 0.269 | 0.885 | -0.719 |
| Overall | 0.251 | 0.264 | 0.883 | -0.710 |
- Downloads last month
- 89
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
Model tree for HermitQ/NPCAlign-SFT
Base model
meta-llama/Llama-3.1-8B Finetuned
meta-llama/Llama-3.1-8B-Instruct