Soham Jain commited on
Initial commit of GPT-2 46M SwiGLU Dense baseline model architecture and configs
Browse files- configuration_gpt2.py +1 -1
- modeling_gpt2.py +1 -1
configuration_gpt2.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
|
| 3 |
class GPT2Config(PretrainedConfig):
|
| 4 |
-
model_type = "
|
| 5 |
|
| 6 |
def __init__(
|
| 7 |
self,
|
|
|
|
| 1 |
from transformers import PretrainedConfig
|
| 2 |
|
| 3 |
class GPT2Config(PretrainedConfig):
|
| 4 |
+
model_type = "gpt2_custom"
|
| 5 |
|
| 6 |
def __init__(
|
| 7 |
self,
|
modeling_gpt2.py
CHANGED
|
@@ -163,5 +163,5 @@ class GPT2CustomLMHeadModel(PreTrainedModel, GenerationMixin):
|
|
| 163 |
return {"input_ids": input_ids, "past_key_values": past_key_values}
|
| 164 |
|
| 165 |
# Register configuration and model for auto mapping
|
| 166 |
-
AutoConfig.register("
|
| 167 |
AutoModelForCausalLM.register(GPT2Config, GPT2CustomLMHeadModel)
|
|
|
|
| 163 |
return {"input_ids": input_ids, "past_key_values": past_key_values}
|
| 164 |
|
| 165 |
# Register configuration and model for auto mapping
|
| 166 |
+
AutoConfig.register("gpt2_custom", GPT2Config)
|
| 167 |
AutoModelForCausalLM.register(GPT2Config, GPT2CustomLMHeadModel)
|