Instructions to use sullivanUCSD/SCOUT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sullivanUCSD/SCOUT with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("sullivanUCSD/SCOUT-SFT-only") model = PeftModel.from_pretrained(base_model, "sullivanUCSD/SCOUT") - Notebooks
- Google Colab
- Kaggle
Update usage: adapter now loads via AutoPeftModel
Browse files
README.md
CHANGED
|
@@ -43,19 +43,16 @@ The checkpoint in this repository is the one named "SCOUT" in every experiment o
|
|
| 43 |
|
| 44 |
## Usage
|
| 45 |
|
| 46 |
-
The adapter was saved with a local base path, so pass the base model explicitly:
|
| 47 |
-
|
| 48 |
```python
|
| 49 |
-
from
|
| 50 |
-
from
|
| 51 |
|
| 52 |
-
|
| 53 |
-
tok = AutoTokenizer.from_pretrained(
|
| 54 |
-
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="bfloat16", device_map="auto")
|
| 55 |
-
model = PeftModel.from_pretrained(model, "sullivanUCSD/SCOUT")
|
| 56 |
model = model.merge_and_unload() # optional, for vLLM-style serving
|
| 57 |
```
|
| 58 |
|
|
|
|
| 59 |
The predictor expects the SCOUT prompt format (detector profile, the retrieved fingerprint records, and the
|
| 60 |
target sample). The prompt builder, the retrieval index over `sullivanUCSD/anchor-400`, and the full routing rule
|
| 61 |
are in the code repository above. Use `sullivanUCSD/SCOUT-450` for evaluation.
|
|
|
|
| 43 |
|
| 44 |
## Usage
|
| 45 |
|
|
|
|
|
|
|
| 46 |
```python
|
| 47 |
+
from peft import AutoPeftModelForCausalLM
|
| 48 |
+
from transformers import AutoTokenizer
|
| 49 |
|
| 50 |
+
model = AutoPeftModelForCausalLM.from_pretrained("sullivanUCSD/SCOUT", torch_dtype="bfloat16", device_map="auto")
|
| 51 |
+
tok = AutoTokenizer.from_pretrained("sullivanUCSD/SCOUT-SFT-only")
|
|
|
|
|
|
|
| 52 |
model = model.merge_and_unload() # optional, for vLLM-style serving
|
| 53 |
```
|
| 54 |
|
| 55 |
+
`adapter_config.json` points to the base model `sullivanUCSD/SCOUT-SFT-only`, so the adapter loads directly.
|
| 56 |
The predictor expects the SCOUT prompt format (detector profile, the retrieved fingerprint records, and the
|
| 57 |
target sample). The prompt builder, the retrieval index over `sullivanUCSD/anchor-400`, and the full routing rule
|
| 58 |
are in the code repository above. Use `sullivanUCSD/SCOUT-450` for evaluation.
|