lucidrains / toolformer-pytorch

Implementation of Toolformer, Language Models That Can Use Tools, by MetaAI
MIT License
1.94k stars 124 forks source link

About the Filtering API Calls implementation #18

Open RuijieH opened 8 months ago

RuijieH commented 8 months ago

Hello, In the origin paper, the author wrote "We provide e(ci, ri) as a prefix instead of inserting it at position i because M is not yet finetuned on any examples containing API calls, so inserting it in the middle of x would interrupt the flow and not align with patterns in the pretraining corpus, thus hurting perplexity." on the footnote of page 3.

However I found that u seem to inserting API call in the origin sentence when calculating loss.

What may I miss?