Git Product home page Git Product logo

Comments (14)

pengzju avatar pengzju commented on May 29, 2024

您好,我建议您参考论文的第二章节针对编辑定义的阐述。

编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json中的样本格式

  • prompt代表编辑输入
  • target_new代表编辑输出
  • locloc_ans用于测试locality
  • portability用于测试Portability

from easyedit.

pengzju avatar pengzju commented on May 29, 2024

如果此回复解决了您的问题,请帮忙关闭此issue

from easyedit.

qizhou000 avatar qizhou000 commented on May 29, 2024

您好,我建议您参考论文的第二章节针对编辑定义的阐述。

编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json中的样本格式

  • prompt代表编辑输入
  • target_new代表编辑输出
  • locloc_ans用于测试locality
  • portability用于测试Portability

请问zsre_mend_eval_portability_gpt4 .json就是论文表2测试ZsRE所使用的数据集吗?如果不是,是使用哪一个json呢?另外还有COUNTERFACT。因为我后续可能有实验需要进行对标,烦请指明一下,谢谢!

from easyedit.

pengzju avatar pengzju commented on May 29, 2024

您好,我建议您参考论文的第二章节针对编辑定义的阐述。
编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json中的样本格式

  • prompt代表编辑输入
  • target_new代表编辑输出
  • locloc_ans用于测试locality
  • portability用于测试Portability

请问zsre_mend_eval_portability_gpt4 .json就是论文表2测试ZsRE所使用的数据集吗?如果不是,是使用哪一个json呢?另外还有COUNTERFACT。因为我后续可能有实验需要进行对标,烦请指明一下,谢谢!

表2使用的数据分别为:

  • zsre: zsre_mend_eval.json
  • counterfact: counterfact-original-edit.json
    如果您需要测试portability请使用zsre_mend_eval_portability_gpt4 .json

from easyedit.

qizhou000 avatar qizhou000 commented on May 29, 2024

您好,我建议您参考论文的第二章节针对编辑定义的阐述。
编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json中的样本格式

  • prompt代表编辑输入
  • target_new代表编辑输出
  • locloc_ans用于测试locality
  • portability用于测试Portability

请问zsre_mend_eval_portability_gpt4 .json就是论文表2测试ZsRE所使用的数据集吗?如果不是,是使用哪一个json呢?另外还有COUNTERFACT。因为我后续可能有实验需要进行对标,烦请指明一下,谢谢!

表2使用的数据分别为:

  • zsre: zsre_mend_eval.json
  • counterfact: counterfact-original-edit.json
    如果您需要测试portability请使用zsre_mend_eval_portability_gpt4 .json

好的,感谢!

from easyedit.

qizhou000 avatar qizhou000 commented on May 29, 2024

你好!zsre_mend_eval.json中有77个待编辑答案"alt"是空的,导致编辑错误,请问怎么处理?

from easyedit.

pengzju avatar pengzju commented on May 29, 2024

你好!zsre_mend_eval.json中有77个待编辑答案"alt"是空的,导致编辑错误,请问怎么处理?

您好,这个是rome在处理数据时的疏忽,在我们的实验中直接忽略了这些数据

from easyedit.

qizhou000 avatar qizhou000 commented on May 29, 2024

你好!对于CounterFact数据集counterfact-original-edit.json,我有一些疑问,还请指教一下:
1、paraphrase_prompts、neighborhood_prompts、attribute_prompts、generation_prompts是测试的哪些指标?观察neighborhood_prompts和attribute_prompts,它们的prompt似乎差别不大,是否用于测试Locality?而generation_prompts似乎和paraphrase_prompts差别不大,是否用于测试Generality?
2、代码好像不支持多条rephrase_prompts的测试。这对zsre数据集没事,因为它的测试都只有一条。但是在counterfact中,比如paraphrase_prompts就有两条,而neighborhood_prompts则接近10条。是否在测试时只随机选择一条进行测试?
3、locality_inputs中的ground_truth在counterfact数据集中似乎并没有提供,需要怎么处理?对于locality,我的理解是对比模型编辑前后对编辑无关prompt的预测的相似度。那么ground_truth似乎并不需要,是否可以省略?但是代码中好像是写死了需要读取ground_truth的。

from easyedit.

pengzju avatar pengzju commented on May 29, 2024
  1. 问题一:抱歉由于我的疏忽上传了ROME原始版本的cf数据集,我已经将数据集的Google Drive、百度网盘替换,请您再下载即可。数据包含的字段为prompt, target_new, ground_truth, rephrase, locality, locality_nas与EasyEdit对应。针对您说的paraphrase_prompts、neighborhood_prompts、attribute_prompts、generation_prompts,这是ROME原论文的概念,具体而言paraphrase_prompts和generation_prompts用于测试Generalization, neighborhood_prompts和attribute_prompts用于测试Locality,在我们的实验设置中随机选择了一条样本作为测试。
  2. 问题二:您好,我已经更新了数据集,即用随机选择一条进行测试。如果您想要一对多(例如一条编辑对应多个rephrase,多个neighborhood_prompts)取平均,您需要自行更改easyedit的代码,目前工具并未支持此功能。
  3. 问题三:这是一个很好的问题,理论上并不需要ground_truth,但是在我们的实验设置中,采用条件生成的方式来进行预测
    • 具体而言,通过(prompt+target_new_token_0)来预测target_new_token_1
    • 通过(prompt+target_new_token_0+target_new_token_1)来预测target_new_token_2
    • 通过(prompt+target_new_token_0+target_new_token_1+target_new_token_2)来预测target_new_token_3
    • 以此类推
    • 最终得到locality的输出
      (如果您想省略ground_truth,可以更改evaluation的方式,通过generate来对比生成,但很抱歉,这个功能暂未支持)

感谢您宝贵的建议。

from easyedit.

qizhou000 avatar qizhou000 commented on May 29, 2024

感谢你的详细解答!观察了代码,关于问题3,我理解你的意思应该是:

  • prompt -> target_new_token_0
  • prompt + ground_truth_token_0 -> target_new_token_1
  • prompt + ground_truth_token_0 + ground_truth_token_1 -> target_new_token_2
  • ...

from easyedit.

pengzju avatar pengzju commented on May 29, 2024

是的,非常准确

from easyedit.

qizhou000 avatar qizhou000 commented on May 29, 2024

你好!新换的counterfact数据集中好像没有subject

from easyedit.

pengzju avatar pengzju commented on May 29, 2024

已经更新了

from easyedit.

pengzju avatar pengzju commented on May 29, 2024

如果解决了您的问题,请帮忙关闭此issue

from easyedit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.