buxiangzhiren / DDCap

MIT License
85 stars 11 forks source link

Beam search #30

Open vinevix opened 1 year ago

vinevix commented 1 year ago

Hi, is there a way to apply beam search in order to generate text?

buxiangzhiren commented 1 year ago

We don't find a way to apply beam search. We tried to change the argmax to sample for achieving beam search, but the performance dropped.

vinevix commented 1 year ago

What’s the difference between “generate_diffusion” and “generate2_adpt_if”? Are they two different ways to generate text? Because I need two different decoding way to apply a technique of mine based on reinforcement learning (that’s why I asked for beam search, but basically I can try any other decoding way)

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: lunedì 20 marzo 2023 16:17 To: @.> Cc: Vincenzo @.>; @.> Subject: Re: [buxiangzhiren/DDCap] Beam search (Issue #30)

We don't find a way to apply beam search. We tried to change the argmax to sample to achieve beam search, but the performance dropped.

— Reply to this email directly, view it on GitHubhttps://github.com/buxiangzhiren/DDCap/issues/30#issuecomment-1476422491, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APCPMZGJEGHZJEAWA635VL3W5BYIDANCNFSM6AAAAAAWBG6DN4. You are receiving this because you authored the thread.Message ID: @.***>

buxiangzhiren commented 1 year ago

The difference is that “generate2_adpt_if”uses the image-free strategy in inference. Maybe you can change the variable "scale" to get different results. But I am not sure that the differences of results from various "scale" are great to support the reinforcement learning.

vinevix commented 1 year ago

Is there a range of possible “scale” parameter that I can try? Experiments set it to 1.06, which one should I set?

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: lunedì 20 marzo 2023 16:30 To: @.> Cc: Vincenzo @.>; @.> Subject: Re: [buxiangzhiren/DDCap] Beam search (Issue #30)

The difference is that “generate2_adpt_if”uses the image-free strategy in inference. Maybe you can change the variable "scale" to get different results. But I am not sure that the differences of results from various "scale" are great to support the reinforcement learning.

— Reply to this email directly, view it on GitHubhttps://github.com/buxiangzhiren/DDCap/issues/30#issuecomment-1476448845, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APCPMZHB4O4BWRKCFT6MFW3W5BZZPANCNFSM6AAAAAAWBG6DN4. You are receiving this because you authored the thread.Message ID: @.***>

buxiangzhiren commented 1 year ago

The range was reported in Figure 4 of our paper. For various results, I suggest that you set the range 1~4. image

buxiangzhiren commented 1 year ago

The range was reported in Figure 4 of our paper. For various results, I suggest that you set the range 1~4. image

The results are reported in validation dataset. When "scale" is 1.06, our model can achieve the best performance in test dataset.

vinevix commented 1 year ago

Thank you very much for your answers, it’s 3 months you’re replying me, now I’m going to try to apply reinforcement learning for my thesis. If you want, I can warn you about results

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: @.> Sent: lunedì 20 marzo 2023 18:21 To: @.> Cc: Vincenzo @.>; @.> Subject: Re: [buxiangzhiren/DDCap] Beam search (Issue #30)

The range was reported in Figure 4 of our paper. For various results, I suggest that you set the range 1~4. [image] https://user-images.githubusercontent.com/67734862/226416522-79773c5e-a96b-4c27-9d79-2b1dddbcc2e7.png

The results are reported in validation dataset. When "scale" is 1.06, our model can achieve the best performance in test dataset.

— Reply to this email directly, view it on GitHubhttps://github.com/buxiangzhiren/DDCap/issues/30#issuecomment-1476641515, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APCPMZGGI53SWUQNECOLRRLW5CGYHANCNFSM6AAAAAAWBG6DN4. You are receiving this because you authored the thread.Message ID: @.***>