felipemaiapolo / tinyBenchmarks

Evaluating LLMs with fewer examples
MIT License
107 stars 11 forks source link

Random++ method impl #3

Closed vishaal27 closed 4 days ago

vishaal27 commented 4 months ago

Hey, thanks for your great work and releasing your code publicly.

I am interested in the implementation of the random++ method. As far as I understand, this would just involve stratified sampling instead of clustering during the anchor point selection stage. However, I am a bit confused how to make it work with the IRT estimates. Could you please add that code into the notebook too (or if not provide some pointers how I could do it). Thanks again!

felipemaiapolo commented 4 months ago

Hi Vishaal,

Thank you for your interest in our work!

We will add some instructions to the notebooks as soon as we have some time. In the meantime, I can give you some instructions here. First, you would replace anchor_points['scenario_name'] with your stratified random sample indices for each scenario and anchor_weights['scenario_name'] with 1/number_item, where number_item is the number of seen examples (eg, 100 in our notebook). Second, you need to fit the IRT model and compute pirt_preds['scenario_name'], which should be done in the same way as in the notebook. To get gpirt_preds['scenario_name'] ("random++", in your case), you will need to compute lambds['scenario_name'], which is done by using get_lambda(b, v/number_item)) where v and b should be computed as in the notebook.

Please let me know if you need further assistance or if anything does not make sense!

vishaal27 commented 4 months ago

Thanks for the response, will try it and let you know if I face any issues