Instructions to use Yechao/MemGhost with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Yechao/MemGhost with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B") model = PeftModel.from_pretrained(base_model, "Yechao/MemGhost") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Yechao/MemGhost: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/Yechao/MemGhost/resolve/main/README.md
- Command line
-
hf download hf://Yechao/MemGhost/README.md
-
curl -L -o README.md https://huggingface.co/Yechao/MemGhost/resolve/main/README.md
1.07 kB
metadata
license: apache-2.0
base_model: Qwen/Qwen3-4B
library_name: peft
tags:
- memghost
- whisperbench
- agent-security
MemGhost
MemGhost is the released PEFT LoRA adapter for the MemGhost paper artifact. It loads on top of Qwen/Qwen3-4B and is intended for controlled WhisperBench reproduction and analysis.
Adapter SHA256: 85cad4f606b002797a102e55fae31a39df22b2d4a0d07bc1fcbca51fb1bbe572.
Use
Authenticate first while this repository is private:
pip install "transformers>=4.51" peft accelerate safetensors
huggingface-cli login
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "Qwen/Qwen3-4B"
memghost_id = "Yechao/MemGhost"
tokenizer = AutoTokenizer.from_pretrained(memghost_id, trust_remote_code=True)
base = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base, memghost_id)
model.eval()
Use only in controlled research environments.