Instructions to use Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1") model = AutoModelForCausalLM.from_pretrained("Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1
- SGLang
How to use Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1 with Docker Model Runner:
docker model run hf.co/Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1
Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1
Built with Llama. See LICENSE, NOTICE, and USE_POLICY.md.
An unlearned model from the RAQUEL WMDP experiments: Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-M-orig-LoRA-v1
(M_orig) after LoRA unlearning of the WMDP forget set with IDK+GD, released at its
early-stopped checkpoint. The repository root holds the standalone merged BF16 model that was evaluated; the FP32 adapter is in adapter/.
- Method: IDK+GD: forget answers are replaced by the refusal "I don't know." (cross-entropy), plus a retain cross-entropy term.
- Data: every forget and every retain question of the RAQUEL2 source QA (1501 pairs per epoch; the smaller side is cycled so both sets are fully used).
- Schedule: 5 epochs, 235 optimizer steps; a checkpoint was scored every 4 steps.
- Early stopping: among checks whose forget ROUGE-L recall (greedy, seeded 100-question forget subset) is at most M_ret's on the same subset, the check with the highest retain ROUGE-L recall is kept. RAQUEL questions were never used for selection. Released checkpoint: step 16 of 235 (forget ROUGE-L 0.030 <= target 0.200; retain ROUGE-L 1.000).
Evaluation
| Split | This model | M_orig | M_ret |
|---|---|---|---|
| Forget (original) | 79/1496 (5.3%) | 99.9% | 17.6% |
| Forget (paraphrased) | 14/1452 (1.0%) | 80.0% | 19.1% |
| Retain (original) | 1426/1462 (97.5%) | 99.2% | 99.2% |
| Retain (paraphrased) | 957/1371 (69.8%) | 82.5% | 85.6% |
| RAQUEL affected | 39/2385 (1.6%) | 22.6% | 21.3% |
| RAQUEL unaffected | 234/2144 (10.9%) | 23.6% | 20.4% |
Semantic accuracy judged by Qwen/Qwen3.8-27B (vLLM 0.28.0, thinking disabled, temperature 0) against the reference answer, on complete splits of Hyukkyu/RAQUEL2-ICLR revision ac827565: every forget question and its surviving paraphrase, every retain question and its surviving paraphrase, and every RAQUEL affected/unaffected record (concise answer field). Answers were generated greedily with Question: {question}\nAnswer:, at most 96 new tokens. Per-split counts and evidence hashes are in evaluation.json. M_orig and M_ret rows are the reference baselines on the same splits.
Training
- Start:
Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-M-orig-LoRA-v1, revision3bcc4cae6cb9035e2b399a7ddac253f5ef0609ec. - LoRA rank 64, alpha 128, dropout 0.05 on q/k/v/o/gate/up/down projections; BF16 base, FP32 adapters; one GPU.
- Learning rate 0.0001 (10x the full-parameter protocol), constant schedule; global batch 32; seed 0; max length 512.
- Method settings: retain_weight=8.0, idk_target="I don't know.".
- Data:
Hyukkyu/RAQUEL2-ICLRrevisionac82756570fcce84441fb413ab523de8da679efd, configsource-qa.
Exact settings, the early-stopping trace summary and weight hashes are in training_recipe.json.
Load
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, dtype=torch.bfloat16, device_map="auto").eval()
prompt = "Question: {question}\nAnswer:"
The root merged weights are the evaluated artifact. The FP32 LoRA adapter is in adapter/
(PeftModel.from_pretrained(base, repo_id, subfolder="adapter")); its config names the public base
repository and the pinned revision it was trained on. Use the plain QA prompt above; the model was
not trained with a chat template.
- Downloads last month
- 202
Model tree for Hyukkyu/Llama-3.1-8B-RAQUEL-WMDP-Unlearn-IDK-GD-LoRA-v1
Base model
meta-llama/Llama-3.1-8B