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

pretrain_graph_model_path is not defined #7

Closed
AriKing11 opened this issue Nov 3, 2023 · 8 comments
Closed

pretrain_graph_model_path is not defined #7

AriKing11 opened this issue Nov 3, 2023 · 8 comments

Comments

@AriKing11
Copy link

AriKing11 commented Nov 3, 2023

An error occurs on the line 801 of train_graph.py, that is 'pretrain_graph_model_path' is not defined.

@tjb-tech
Copy link
Collaborator

tjb-tech commented Nov 3, 2023

If you could give the detailed error information, we could help you better. Thank you!

@tjb-tech
Copy link
Collaborator

tjb-tech commented Nov 6, 2023

An error occurs on the line 801 of train_graph.py, that is 'pretrain_graph_model_path' is not defined.

By attempts by persons in our lab, I guess your question might be the error in the config.json in your base model. Specifically, if you use Vicuna as your base model, you should add two key-value pairs in the config.json as follow:

"graph_hidden_size": 128, 
"pretrain_graph_model_path": "/root/paddlejob/workspace/env_run/llm/GraphChat/"

so the complete config.json in vicuna model could be:

{
  "_name_or_path": "vicuna-7b-v1.5-16k",
  "architectures": [
    "LlamaForCausalLM"
  ],
  "bos_token_id": 1,
  "eos_token_id": 2,
  "hidden_act": "silu",
  "hidden_size": 4096,
  "initializer_range": 0.02,
  "intermediate_size": 11008,
  "max_sequence_length": 16384,
  "max_position_embeddings": 4096,
  "model_type": "llama",
  "num_attention_heads": 32,
  "num_hidden_layers": 32,
  "num_key_value_heads": 32,
  "pad_token_id": 0,
  "pretraining_tp": 1,
  "rms_norm_eps": 1e-05,
  "rope_scaling": {
    "factor": 4.0,
    "type": "linear"
  },
  "tie_word_embeddings": false,
  "torch_dtype": "float16",
  "transformers_version": "4.31.0",
  "use_cache": true,
  "vocab_size": 32000, 
  "graph_hidden_size": 128, 
  "pretrain_graph_model_path": "/root/paddlejob/workspace/env_run/llm/GraphChat/"
}

@AriKing11
Copy link
Author

Thanks for your prompt reply. It has solved my problem!
BTW, do you mention this change anywhere?

@tjb-tech
Copy link
Collaborator

tjb-tech commented Nov 8, 2023

anywhere

Not really. I will add it in the README.md. Thank you for the supports!

@AriKing11
Copy link
Author

Would you mind explaining which model should I put in the dir "/root/paddlejob/workspace/env_run/llm/GraphChat/"

@tjb-tech
Copy link
Collaborator

tjb-tech commented Nov 8, 2023

Would you mind explaining which model should I put in the dir "/root/paddlejob/workspace/env_run/llm/GraphChat/"

It's just an example. Any dir that contain the pre-trained GNN is acceptable

@AriKing11
Copy link
Author

Is it ok to configure it as model in https://huggingface.co/Jiabin99/Arxiv-PubMed-GraphCLIP-GT

@tjb-tech
Copy link
Collaborator

tjb-tech commented Nov 8, 2023

Is it ok to configure it as model in https://huggingface.co/Jiabin99/Arxiv-PubMed-GraphCLIP-GT

Yes, you are right!

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