File size: 478 Bytes
c6e3db9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from transformers import GPT2Config
import os
config_type = os.environ.get("CONFIG_TYPE")
dataset_name = os.environ.get("DATASET")
dataset_config = os.environ.get("DATASET_CONFIG")
dataset_split = os.environ.get("DATASET_SPLIT")
vocab_size = int(os.environ.get("VOCAB_SIZE"))
model_path = os.environ.get("MODEL_PATH")
config = GPT2Config.from_pretrained(config_type, resid_pdrop=0.0, embd_pdrop=0.0, attn_pdrop=0.0, vocab_size=vocab_size)
config.save_pretrained(model_path)
|