Coder Social home page Coder Social logo

Comments (5)

radi-cho avatar radi-cho commented on July 24, 2024

Separately, I would like to ask for the opinion of the authors if such an approach could be applied to a more structured conversational problem with a corresponding dataset? For example, using the approach in chat systems where the history of a conversation is provided and a new utterance is sampled with the infilling procedure. The goal would be to derive a more controllable response generation.

from diffusion-lm.

XiangLi1999 avatar XiangLi1999 commented on July 24, 2024

Hi, thanks for the questions!

re1: python scripts/infill.py --model_path diff_e2e-tgt_pad_rand16_transformer_lr0.0001_0.0_2000_sqrt_Lsimple_h128_s2_d0.1_sd102_xstart/ema_0.9999_200000.pt --batch_size 50 --partial_seq "START The Eagle is a PAD PAD PAD shop located in the city centre area PAD PAD King . Although price PAD PAD low at less than 20 pounds , it serves English food , with an PAD customer rating . END" --eval_task_ infill

You can do infilling by passing in partial_seq and use PAD in place of tokens you want to infill.

re2: python scripts/infill.py --model_path {diff_e2e-tgt_block_rand16_transformer_lr0.0001_0.0_2000_sqrt_Lsimple_h128_s2_d0.1_sd102_xstart/ema_0.9999_200000.pt} --batch_size 50 --partial_seq "START" --eval_task_ length --tgt_len 10 --out_dir {your output_dir}

re the dialog problem: I think you dont need infilling to generate the next utterance. Infilling is particularly useful if you have left and right context but want to generate something in the middle. You can simply use the unconditional generation part, and control that process. (similar to the classifier guided control experiments in the paper, except that you have conditioning over all prior utterances)

from diffusion-lm.

radi-cho avatar radi-cho commented on July 24, 2024

@XiangLi1999 @ChorlingLau
How can I run conditioning on previous sequences without infilling?

from diffusion-lm.

yulinchen99 avatar yulinchen99 commented on July 24, 2024

I think conditioning on previous sequences using "infilling" is also fine. It is just that your input is changed from left_context [PAD] [PAD]... [PAD] right_context to left_context [PAD] [PAD] ... [PAD]. Meanwhile I feel there may be a need to fine-tune the trained diffusion (or probably re-train one using customed dataset ?) since conversation text is different from e2e and rocstory.
Also, I think it is the number of PAD tokens that controls the length of generated text. In their experiment they seem to use a max length of 10 in infilling task.

partial_seq_ = f"{val['obs1']} " + "PAD " * 10 + f"{val['obs2']}"

Besides, I am quite intrigued with the fact that their model can perform quite satisfactorily on infilling task without any further finetuning, as in the original training process always the whole sequence is noised but in infilling task, the input is only partially noised at each step.

from diffusion-lm.

radi-cho avatar radi-cho commented on July 24, 2024

@XiangLi1999 @cyl628 Can I specify left context when using the eval_task "length"?

from diffusion-lm.

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.