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

training problem #7

Open
l772308126 opened this issue Dec 13, 2024 · 8 comments
Open

training problem #7

l772308126 opened this issue Dec 13, 2024 · 8 comments

Comments

@l772308126
Copy link

Sorry to bother you again. It's really a nice work! I have found two problem when I was training the main.py.

  1. image
    I think this code is wrong,because the unpad_input function has five outputs。
    image
    So,it will report an error when I run the training code of main.py. I guess it should be revised to 'q, indices_q, cu_seqlens_q, max_len_q, _ = unpad_input(q, mask_q)' and 'k, indices_kv, cu_seqlens_kv, max_len_kv, _ = unpad_input(k, mask_kv)'. Is that correct?

  2. I found that the tokenized sequences obtained by mesh through tokenizer always have vertices 3 and 4. I counted the number of vertices 3 and 4. It even exceeds the sum of the occurrences of the other top 10 vertices. As a result, the final predicted results are all 3 and 4. Have you ever encountered such a problem during training? How to solve it?
    image

@l772308126
Copy link
Author

I use the g-objaverse dataset and randomly select some glb files containing faces less than 4000.

@creiser
Copy link

creiser commented Dec 18, 2024

Regarding 1), yes, your fix is correct.

@ashawkey
Copy link
Collaborator

Thanks for reporting this!
It seems flash-attn's latest version changes some API, I will fix this later.
Token 3 and 4 are the next/prev token (or left/right) as defined in the edgebreaker traversal. They do appear more frequently (before every new triangle), but after convergence they should be generated correctly.

@l772308126
Copy link
Author

Thanks for reporting this! It seems flash-attn's latest version changes some API, I will fix this later. Token 3 and 4 are the next/prev token (or left/right) as defined in the edgebreaker traversal. They do appear more frequently (before every new triangle), but after convergence they should be generated correctly.

Thanks for your reply! When can we get the fixed version? I want to use your code as my baseline. At the same time, if I change the version of the flash-attn, which version is correct?

@ashawkey
Copy link
Collaborator

Hi, it seems flash-attn >= 2.7.0 changes the API. The code should be fixed now, welcome to try it out.

@l772308126
Copy link
Author

Hi, it seems flash-attn >= 2.7.0 changes the API. The code should be fixed now, welcome to try it out.

Hi, I changed the version of flash-attn to 2.6.3 and downloaded the fixed code at the same time. It also has the same problem, the final predicted results are all 3 and 4. I use torch2.4.1+cuda12.1. The other environment settings are following your commands.

@ashawkey
Copy link
Collaborator

Hi, could you provide more details? e.g., datasets, training resources and iterations?

@l772308126
Copy link
Author

Hi, could you provide more details? e.g., datasets, training resources and iterations?

I’m sorry to keep asking.

I used the g-objaverse datasets and randomly selected 60 samples from them. 2 A6000 are used to do multi-GPU training. I just modified the file path in the provider.py. Nothing has been changed except for batchsize, learning rate and max_face_length. All environment configurations are configured according to requirements.lock. The version of python is 3.10 and pytorch is torch2.4.1+cuda12.1. I used this config to train the ArAE:
point_encoder_mode='embed',
kl_weight=1e-8,
discrete_bins=512,
use_num_face_cond=True,
use_decimate_aug=True,
cond_mode='point',
num_cond_tokens=2049,
freeze_encoder=False,
use_meto=True,
meto_backend='LR_ABSCO',
max_face_length=8000,
max_seq_length=40960,
align_posemb='right',
batch_size=2,
hidden_dim=1536,
num_heads=16,
num_layers=24,
gradient_accumulation_steps=1,
lr=5e-5,
warmup_ratio=0,
num_epochs=100,
eval_mode='loss',
workspace='.../'.

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