Skip to content

Issue with Llama-3-8b and Llama-3.1-8b-Instruct #7

@NamburiSrinath

Description

@NamburiSrinath

Hi @asillycat

Llama-3-8B (ASR-GPT, ASR KW)

  • GCG - 1, 4 (vs reported 42, 50)
  • AttnGCG - 1, 15 (vs reported 45, 51)

Llama-3.1-8B-Instruct (ASR-GPT, ASR-KW)

  • GCG - 4, 64 (vs reported 32, 40)
  • AttnGCG - 10, 85 (vs reported 34, 45)

I am unable to reproduce any of the values from the table.
Image

Here, in this line https://github.com/UCSC-VLAA/AttnGCG-attack/blob/main/AttnGCG/base/attack_manager.py#L190, I changed it to
elif self.conv_template.name == 'llama-3' or self.conv_template.name == "meta-llama-3.1":

Llama-3-8B (this was provided in configs/)

import os

os.sys.path.append("..")
from configs.template import get_config as default_config

def get_config():
    
    config = default_config()

    config.tokenizer_paths=["meta-llama/Meta-Llama-3-8B-Instruct"]
    config.model_paths=["meta-llama/Meta-Llama-3-8B-Instruct"]
    config.conversation_templates=['llama-3-'] ### Make a note of **-**
    config.control_init = "a a a a a a a a a a a a a a a a a a a a"
    
    config.attention_weight = 50.0

    return config

Llama-3.1-8B (this was not provided in configs/, replicated from Llama-3-8B)

import os

os.sys.path.append("..")
from configs.template import get_config as default_config

def get_config():
    
    config = default_config()

    config.tokenizer_paths=["meta-llama/Llama-3.1-8B-Instruct"] ## Changed to 3.1
    config.model_paths=["meta-llama/Llama-3.1-8B-Instruct"] ## Changed to 3.1
    config.conversation_templates=['llama-3.1']
    config.control_init = "a a a a a a a a a a a a a a a a a a a a"
    
    config.attention_weight = 50.0

    return config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions