mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-10 13:30:19 +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:
@@ -45,9 +45,9 @@ def data_gen_for_question_answering():
|
||||
|
||||
output_transform_fn = lambda x: x
|
||||
loss_fn_for_opt_model = lambda x: torch.nn.functional.mse_loss(
|
||||
x.last_hidden_state, torch.ones_like(x.last_hidden_state)
|
||||
x["last_hidden_state"], torch.ones_like(x["last_hidden_state"])
|
||||
)
|
||||
loss_fn_for_lm = lambda x: x.loss
|
||||
loss_fn_for_lm = lambda x: x["loss"]
|
||||
config = transformers.OPTConfig(
|
||||
hidden_size=128,
|
||||
num_hidden_layers=2,
|
||||
|
Reference in New Issue
Block a user