Giter VIP home page Giter VIP logo

moel's Introduction

Installation

git clone https://github.com/HLTCHKUST/hltchkust.github.io.git
git fetch
git checkout source

Make sure you have Ruby and Bundler installed on your system (hint: for ease of managing ruby gems, consider using rbenv), then run

bundle install

To add new blog

Create a new markdown file under _posts, follow the format of previous ones.

To add an announcement to News

Create a new markdown file under _news, follow the format of previous ones.

To add a new publication

Just add your bibliography to the _bibliography/papers.bib. If you want to show it in the Selected publications, add the selected={true} field.

Deployment

To deploy new changes, just

./bin/deploy --user

then

git push origin source

Wait a few seconds, and refresh!

For local development

To build the latest content that you change

bundle exec jekyll build

To run the server locally

bundle exec jekyll serve

Then, a localhost is established at port 4000.

moel's People

Contributors

zlinao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

moel's Issues

dataset process

Thanks for your contribution. I am interesting your work.

May I ask for the code of processing the Empatheticdialogues?

Thanks a lot.

Bug in beam search of Expert

Hi all,

Thank you for open sourcing this repository.
I'm having trouble when decoding an expert model.

In particular, all I did was clone the repo and run the following command:

python3 main.py --model experts  --label_smoothing --noam --emb_dim 300 --hidden_dim 300 --hop 1 --heads 2 --topk 5 --cuda --pretrain_emb --softmax --basic_learner --schedule 10000 --save_path save/moel/

It seems like the model finishes training, and in line 97 of main.py, when trying to run evaluation, I get the following traceback:

Traceback (most recent call last):
  File "main.py", line 97, in <module>
    loss_test, ppl_test, bce_test, acc_test, bleu_score_g, bleu_score_b= evaluate(model, data_loader_tst ,ty="test", max_dec_step=50)
  File "/home/repos/empathetic_systems/MoEL/model/common_layer.py", line 824, in evaluate
    sent_b = t.beam_search(batch, max_dec_step=max_dec_step)
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 273, in beam_search
    active_inst_idx_list = beam_decode_step(inst_dec_beams, len_dec_seq, src_seq, src_enc, inst_idx_to_position_map, n_bm, enc_batch_extend_vocab, extra_zeros, mask_src, encoder_db, mask_transformer_db, DB_ext_vocab_batch)
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 205, in beam_decode_step
    dec_seq = prepare_beam_dec_seq(inst_dec_beams, len_dec_seq)
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 157, in prepare_beam_dec_seq
    dec_partial_seq = [b.get_current_state() for b in inst_dec_beams if not b.done]
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 157, in <listcomp>
    dec_partial_seq = [b.get_current_state() for b in inst_dec_beams if not b.done]
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 33, in get_current_state
    return self.get_tentative_hypothesis()
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 90, in get_tentative_hypothesis
    hyps = [self.get_hypothesis(k) for k in keys]
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 90, in <listcomp>
    hyps = [self.get_hypothesis(k) for k in keys]
  File "/home/repos/empathetic_systems/MoEL/utils/beam_omt_experts.py", line 100, in get_hypothesis
    hyp.append(self.next_ys[j+1][k])
IndexError: tensors used as indices must be long, byte or bool tensors

In particular, I'm seeing that the k value, as well as self.prev_ks, gets changed somewhere along the way and no longer hold indices but instead stores float values.

(Pdb) pp k                                                                              
tensor(0.0014, device='cuda:0')    

(Pdb) self.prev_ks                                                                                                                                                               
[tensor([0.0026, 0.0054, 0.0003, 0.0069, 0.0075], device='cuda:0'), tensor([1.4338e-03, 1.0014e+00, 2.0014e+00, 7.5908e-04, 1.0008e+00],                                         
       device='cuda:0')]      

Do you have any pointers on how to resolve this?

Thank you in advance.

about metric

Hi,

This is a very nice work! While there are some detials that I'm confused:

  1. Does the Bleu means average Bleu score like the original paper "Towards Empathetic Open-domain Conversation Models: a New Benchmark and Dataset"?
  2. Why don't you compare the basline result in "Towards Empathetic Open-domain Conversation Models: a New Benchmark and Dataset"?

Inference

Dear Authors,

Thank you for providing code.

I want to use the trained model to generate responses for a new text. Is there is a way to do the inference part for a new text.

Questions about code reproduction

When I ran the code locally, I successfully ran the program according to the README.md, but due to the patience of the program, my program ended early and entered the testing stage. I ran TRS and MultiTRS. The two programs were about 16000. When entering the testing stage when stepping, is this normal?
When I ran the MoEL, I finally got the result:
EVAL Loss PPL Accuracy Bleu_g Bleu_b
test 3 .7540 42.6931 0.37 2.85 2.87
How can I set up to reproduce the results of the paper?

Thanks

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.