Files
gpt2-large-dutch/create_config.py

15 lines
478 B
Python
Raw Permalink Normal View History

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)