pretrain_graph_model_path is not defined
AriKing11 opened this issue · 8 comments
An error occurs on the line 801 of train_graph.py, that is 'pretrain_graph_model_path' is not defined.
If you could give the detailed error information, we could help you better. Thank you!
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/"
}
Thanks for your prompt reply. It has solved my problem!
BTW, do you mention this change anywhere?
anywhere
Not really. I will add it in the README.md. Thank you for the supports!
Would you mind explaining which model should I put in the dir "/root/paddlejob/workspace/env_run/llm/GraphChat/"
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
Is it ok to configure it as model in https://huggingface.co/Jiabin99/Arxiv-PubMed-GraphCLIP-GT
Is it ok to configure it as model in https://huggingface.co/Jiabin99/Arxiv-PubMed-GraphCLIP-GT
Yes, you are right!