File size: 1,071 Bytes
930843f
 
 
 
 
 
 
 
 
 
e2c169c
930843f
e2c169c
a568322
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2c169c
a568322
e2c169c
a568322
 
 
 
 
 
e2c169c
a568322
 
930843f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
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:

```bash
pip install "transformers>=4.51" peft accelerate safetensors
huggingface-cli login
```

```python
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.