mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-01 09:07:51 +00:00
[sync] Sync feature/colossal-infer with main
This commit is contained in:
@@ -243,7 +243,12 @@ def main():
|
||||
# ====================================
|
||||
# gpt2 pretrained model
|
||||
|
||||
cfg = AutoConfig.from_pretrained(model_name, num_labels=data_builder.num_labels)
|
||||
cfg = AutoConfig.from_pretrained(
|
||||
model_name,
|
||||
num_labels=data_builder.num_labels,
|
||||
pad_token=data_builder.tokenizer.pad_token,
|
||||
pad_token_id=data_builder.tokenizer.pad_token_id,
|
||||
)
|
||||
|
||||
if model_name == "gpt2":
|
||||
model = GPT2ForSequenceClassification.from_pretrained(model_name, config=cfg).cuda()
|
||||
|
Reference in New Issue
Block a user