Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to train #1

Open
jcuenod opened this issue Dec 1, 2023 · 6 comments
Open

How to train #1

jcuenod opened this issue Dec 1, 2023 · 6 comments

Comments

@jcuenod
Copy link

jcuenod commented Dec 1, 2023

Hi, thanks for sharing the code for both de/encoding and training. Could you put up a readme for training on new data? I would like to try this out on Greek and Hebrew text.

@davda54
Copy link
Collaborator

davda54 commented Dec 1, 2023

Hi, thanks for your interest! I'm not sure if I'll have time to write a comprehensive training readme, but I'm happy to help you with training on these new languages! Please let me know here or on [email protected] if you have any issues.

The first thing you will need is a word-frequency list for each language. The Dataset class expect a tab-separated file with words sorted by frequency (f"{word}\t{frequency}"). Specifically, you should create these three files:

  • f"data/{language}_train_word_freq.tsv" for training
  • f"data/{language}_valid_word_freq.tsv" with unseen words for validation
  • f"data/{language}_frequent_word_freq.tsv" with the most common (seen) words for validation

Evaluation of these models is not easy (without training an expensive language model), but the two validation files are at least somewhat useful for sanity checking the training.

@jcuenod
Copy link
Author

jcuenod commented Dec 1, 2023

Thanks! I'll give it a go when I have a chance, and email you if I get stuck :)

@avi-otterai
Copy link

Hi @davda54 it appears there are missing dependencies for the following imports in vq-vae/train.py

from lazy_adam import LazyAdamW
from random_sampler import WeightedRandomSampler

@avi-otterai
Copy link

Update: I was able to run train.py and get a model. How can we now convert this model to a .dawg file used in example code? @davda54

@avi-otterai
Copy link

avi-otterai commented May 7, 2024

@davda54 reminder here a few months later. Could you please help us convert the trained model into a .dawg file?

@davda54
Copy link
Collaborator

davda54 commented Jun 12, 2024

Just saw this comment, did you manage to make it run with the build.py file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants