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

Using pre-trained model without prompts #22

Open
agoodge opened this issue Sep 25, 2024 · 4 comments
Open

Using pre-trained model without prompts #22

agoodge opened this issue Sep 25, 2024 · 4 comments

Comments

@agoodge
Copy link

agoodge commented Sep 25, 2024

Hello, I have a few questions:

if args.prompt_ST==1: if args.file_load_path != '': model.load_state_dict(torch.load('{}'.format(args.file_load_path),map_location=device), strict=False)
I see that if using prompt_ST, then the model weights will be loaded from args.file_load_path. Why must we use prompts in order to load model weights? What if we want to test the pre-trained model without using prompts?

What is model_SinCos.pkl for in the model weights? It is not used anywhere in the code.

Do you have the pre-trained prompt pool available so that we can reproduce your results?

Can you explain what X_period is used for? How is it different from the regular data X?

Thanks very much!

@YuanYuan98
Copy link
Collaborator

Thank you for your questions!

Q1: The reason prompts are necessary for loading model weights is that using prompts introduces additional model parameters, which alters the model's weights.

Q2: The model_SinCos.pkl file contains the trained model parameters. You can download it and place it in the directory specified by args.file_load_path.

Q3: For reproducing results, please refer to the model_SinCos.pkl file, which serves as the pre-trained prompt pool.

Q4: The X_period variable aggregates the corresponding timestamps from the past several days, capturing the periodic patterns inherent in the spatio-temporal data.

Thanks again for your inquiries!

@agoodge
Copy link
Author

agoodge commented Sep 25, 2024

Thank you for your very fast response!

Then what are the model weights in the model_Emb.pkl file?

Thanks again

@YuanYuan98
Copy link
Collaborator

We provide two model parameters: model_SinCos.pkl and model_Emb.pkl. The key difference lies in the positional encoding used; model_SinCos.pkl employs Sine-Cosine positional encoding typical of Transformers, while model_Emb.pkl utilizes learnable positional encoding. Please ensure to specify the correct positional encoding approach in the hyper-parameter with args.pos_emb=SinCos

@agoodge
Copy link
Author

agoodge commented Sep 25, 2024

It's clearer now. Thank you! It seems their performance is similar.

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

2 participants