SAI990323 / TALLRec

Apache License 2.0
199 stars 32 forks source link

> The following is an interception of some intermediate results, and the probability of predicting yes is also very close: #23

Closed liujianwei2023 closed 11 months ago

liujianwei2023 commented 1 year ago
          > The following is an interception of some intermediate results, and the probability of predicting yes is also very close:

['Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. # noqa: E501\n\n### Instruction:\nGiven the user's preference and unpreference, identify whether the user will like the target movie by answering "Yes." or "No.".\n\n### Input:\nUser Preference: "Paris, Texas (1984)", "Rebel Without a Cause (1955)", "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)"\nUser Unpreference: "Kalifornia (1993)"\nWhether the user will like the target movie "Perez Family, The (1995)"?\n\n### Response:\nYes.\n\n### Explanation:\nThe user prefers "Paris, Texas (1984)", "Rebel Without a Cause (1955)", "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (199', 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. # noqa: E501\n\n### Instruction:\nGiven the user's preference and unpreference, identify whether the user will like the target movie by answering "Yes." or "No.".\n\n### Input:\nUser Preference: "Rebel Without a Cause (1955)", "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)"\nUser Unpreference: "Kalifornia (1993)", "Perez Family, The (1995)"\nWhether the user will like the target movie "Jurassic Park (1993)"?\n\n### Response:\nYes.\n\n### Explanation:\nThe user prefers "Rebel Without a Cause (1955)", "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)" and unpreferences "Kalifornia'] ['Yes.\n\n### Explanation:\nThe user prefers "Paris, Texas (1984)", "Rebel Without a Cause (1955)", "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (199', 'Yes.\n\n### Explanation:\nThe user prefers "Rebel Without a Cause (1955)", "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)" and unpreferences "Kalifornia'] [[0.5731707811355591, 0.4268292486667633], [0.5828027129173279, 0.4171972870826721]] 1it [00:06, 6.24s/it]['Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. # noqa: E501\n\n### Instruction:\nGiven the user's preference and unpreference, identify whether the user will like the target movie by answering "Yes." or "No.".\n\n### Input:\nUser Preference: "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)", "Jurassic Park (1993)"\nUser Unpreference: "Kalifornia (1993)", "Perez Family, The (1995)"\nWhether the user will like the target movie "Manhattan Murder Mystery (1993)"?\n\n### Response:\nYes.\n\n### Explanation:\nThe user prefers "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)", "Jurassic Park (1993)" and unpreferences "Kalifornia (1', 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. # noqa: E501\n\n### Instruction:\nGiven the user's preference and unpreference, identify whether the user will like the target movie by answering "Yes." or "No.".\n\n### Input:\nUser Preference: "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)", "Jurassic Park (1993)", "Manhattan Murder Mystery (1993)"\nUser Unpreference: "Kalifornia (1993)", "Perez Family, The (1995)"\nWhether the user will like the target movie "Sleeper (1973)"?\n\n### Response:\nYes.\n\n### Explanation:\nThe user prefers "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)", "Jurassic Park (1993)", "Manhattan Murder Mystery (1993)" and unpreferences "Kalifornia (199'] ['Yes.\n\n### Explanation:\nThe user prefers "Return of the Pink Panther, The (1974)", "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)", "Jurassic Park (1993)" and unpreferences "Kalifornia (1', 'Yes.\n\n### Explanation:\nThe user prefers "Ace Ventura: Pet Detective (1994)", "Magnificent Seven, The (1954)", "Star Trek: The Wrath of Khan (1982)", "Cat People (1982)", "Orlando (1993)", "Dave (1993)", "Jurassic Park (1993)", "Manhattan Murder Mystery (1993)" and unpreferences "Kalifornia (199'] [[0.5806307196617126, 0.41936925053596497], [0.5781132578849792, 0.42188674211502075]]

Have you verified your stored LoRA model? Is the size of the model appropriate?

Originally posted by @SAI990323 in https://github.com/SAI990323/TALLRec/issues/20#issuecomment-1704585600

SAI990323 commented 1 year ago

image

As you can see, your adapter_model.bin is only 4.0K. The probable cause for this issue might be related to the version of the "peft" package. You may need to modify the code accordingly based on the version you are utilizing, or alternatively, revert to a previous version.

liujianwei2023 commented 1 year ago

Thanks for your patience, I'll try again

liujianwei2023 commented 1 year ago

Thanks, problem solved. I have a new question, what is the meaning of 8241 and 3782 in the code? labels_index = torch.argwhere(torch.bitwise_or(labels == 8241, labels == 3782))

SAI990323 commented 1 year ago

Thanks, problem solved. I have a new question, what is the meaning of 8241 and 3782 in the code? labels_index = torch.argwhere(torch.bitwise_or(labels == 8241, labels == 3782))

Here we have taken a shortcut, in reality, it corresponds to the token ID of "Yes" and "No".

liujianwei2023 commented 1 year ago

Thanks, I would like to further ask how to locate the index of a specific token id (yes/no), and then does this index must be in the response?

liujianwei2023 commented 1 year ago

image image

SAI990323 commented 1 year ago

There is a lot of "Yes", "No" in LlaMA Tokenizer, you should check the token ID of your input & output

liujianwei2023 commented 1 year ago

thanks

codediyi commented 1 year ago

image

As you can see, your adapter_model.bin is only 4.0K. The probable cause for this issue might be related to the version of the "peft" package. You may need to modify the code accordingly based on the version you are utilizing, or alternatively, revert to a previous version.

How do I go about fixing this, I save these files as only 4k as well?

SAI990323 commented 1 year ago

image

As you can see, your adapter_model.bin is only 4.0K. The probable cause for this issue might be related to the version of the "peft" package. You may need to modify the code accordingly based on the version you are utilizing, or alternatively, revert to a previous version.

How do I go about fixing this, I save these files as only 4k as well?

make sure your peft == 0.3.0 or you need to fix the code