mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-11 05:49:55 +00:00
[test] merge old components to test to model zoo (#4945)
* [test] add custom models in model zoo * [test] update legacy test * [test] update model zoo * [test] update gemini test * [test] remove components to test
This commit is contained in:
@@ -44,9 +44,9 @@ def data_gen_for_t5_model():
|
||||
output_transform_fn = lambda x: x
|
||||
|
||||
# define loss function
|
||||
loss_fn_for_t5_model = lambda x: x.last_hidden_state.mean()
|
||||
loss_fn_for_encoder_only = lambda x: x.last_hidden_state.mean()
|
||||
loss_fn_for_conditional_generation = lambda x: x.loss
|
||||
loss_fn_for_t5_model = lambda x: x["last_hidden_state"].mean()
|
||||
loss_fn_for_encoder_only = lambda x: x["last_hidden_state"].mean()
|
||||
loss_fn_for_conditional_generation = lambda x: x["loss"]
|
||||
|
||||
# define model config
|
||||
config = transformers.T5Config(d_model=128, num_layers=2, dropout_rate=0, decoder_start_token_id=0)
|
||||
|
Reference in New Issue
Block a user