Skip to content

How to evaluate toxicity task on local hf-llama2-7B? #19

@AboveParadise

Description

@AboveParadise

Here is my code:

#!/bin/bash
dt-run +toxicity=realtoxicityprompts-toxic  \
    ++model=hf/../llama/llama-2-7b-hf \
    ++toxicity.n=25 \
    ++toxicity.template=1

and the bug is
Traceback (most recent call last):
File "/mnt/disk1/yg/DecodingTrust/src/dt/main.py", line 42, in main
perspective_module.main(perspective_args(**perspective_config))
File "/mnt/disk1/yg/DecodingTrust/src/dt/perspectives/toxicity/text_generation_hydra.py", line 29, in main
generator = Chat.from_helm(OPTS, conv_template=args.conv_template, cache=dirname, api_key=args.key)
File "/mnt/disk1/yg/DecodingTrust/src/dt/chat.py", line 41, in from_helm
return HFChat(model_name.replace("hf/", "").rstrip("/"), **kwargs)
File "/mnt/disk1/yg/DecodingTrust/src/dt/chat.py", line 364, in init
self.conv_template = get_conv_template(conv_template)
File "/mnt/disk1/yg/DecodingTrust/src/dt/conversation.py", line 284, in get_conv_template
return conv_templates[name].copy()
KeyError: None

How can i fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions