Skip to content

Commit

Permalink
update adapter argument
Browse files Browse the repository at this point in the history
  • Loading branch information
JLake310 committed Oct 7, 2024
1 parent e3f0064 commit 048ce6e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,28 @@ Access to gated HF repository(ex.[Llama 3](https://huggingface.co/meta-llama/Met
python eval.py \
--model_path {directory containing lora adapter or model name} \
--device {device to use} \
--shots {zero, one, two}
--shots {zero, one, two} \
{--use_adapter}
```

### Example
#### Use HF model
```bash
python evaluation.py \
python eval.py \
--model_path google/gemma-1.1-7b-it \
--device cuda:0 \
--shots zero
```

#### Use adapter
```bash
python eval.py \
--model_path nota-ai/llama3-8b-adapter-RaCG \
--device cuda:0 \
--shots zero \
--use_adapter
```

## Benchmark

| | Zero-shot | + Fine-tuning (QLoRA) | + In-context learning (3way-1shot) |
Expand Down
4 changes: 0 additions & 4 deletions eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ def parse_args(args):

args = parser.parse_args(args)

adpater_path = os.path.join(args.model_path, "adapter_config.json")
if os.path.isfile(adpater_path):
args.use_adapter = True

return args


Expand Down

0 comments on commit 048ce6e

Please sign in to comment.