allenai / allenai/bilm-tf

Train Perplexity is very low but test is pretty high for Thai language

未关闭
#202 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
1.6k
派生
447
PR 合并指标
30 天内没有已合并 PR

描述

Hello everyone,

I train an Elmo model for the Thai language with Wikipedia around 3 days (200,000 batches).

Due to Thai doesn't have white space to separate word, we use newmm tokenization from pyThaiNLP to generate word split by whitespace same as English from input sentence.

My problem is the perplexity of training and testing from my Wikipedia dataset. Training perplexity is very confusing. Perplexity initial at 250 and drop quickly to 10 at Batch 3000 and perplexity value stable around 3 - 5 at Batch 30000.

![image](https://user-images.githubusercontent.com/39940405/58856652-70c6b880-86cd-11e9-8074-16c0f6b98f01.png)

![image](https://user-images.githubusercontent.com/39940405/58852657-9352d480-86c1-11e9-8884-0235d21ed364.png)

![image](https://user-images.githubusercontent.com/39940405/58856095-e467c600-86cb-11e9-8687-629a0978c043.png)

But after trying the model with testing data, test perplexity is around 200-350 with avg 250.

![image](https://user-images.githubusercontent.com/39940405/58856075-d2862300-86cb-11e9-95d8-e8e280aa2013.png)

My option file is

{"bidirectional": true, "char_cnn": {"activation": "relu", "embedding": {"dim": 16}, "filters": [[1, 32], [2, 32], [3, 64], [4, 128], [5, 256], [6, 512], [7, 1024]], "max_characters_per_token": 50, "n_characters": 261, "n_highway": 2}, "dropout": 0.5, "lstm": {"cell_clip": 3, "dim": 4096, "n_layers": 2, "proj_clip": 3, "projection_dim": 512, "use_skip_connections": true}, "all_clip_norm_val": 10.0, "n_epochs": 5, "n_train_tokens": 88248455, "batch_size": 16, "n_tokens_vocab": 628280, "unroll_steps": 20, "n_negative_samples_batch": 8192}(elmo)

I try to change dropout and batch size to experiment that it affects or not but this factor does not solve my problem.

Do you guy have any idea to fix this problem?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。